All of lore.kernel.org
 help / color / mirror / Atom feed
* is there a canonical doc about how to deal with whitespace issues?
@ 2018-06-08 13:18 Robert P. J. Day
  2018-06-08 17:15 ` Derrick Stolee
  0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2018-06-08 13:18 UTC (permalink / raw)
  To: Git Mailing list


  for one of my courses, i wanted to write a section about the various
techniques for dealing with whitespace issues in git, so i started
making a list, things like:

  - running "git diff --check"
  - "git commit --cleanup=" possibilities
  - config options like core.{eol,safecrlf,autocrlf}
  - i'm sure there are client-side hooks that can be mentioned

etc, etc.

  has anyone ever written a doc that collects these things in one
place? if not, i guess i have to write one.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: is there a canonical doc about how to deal with whitespace issues?
  2018-06-08 13:18 is there a canonical doc about how to deal with whitespace issues? Robert P. J. Day
@ 2018-06-08 17:15 ` Derrick Stolee
  2018-06-11 21:45   ` Stefan Beller
  0 siblings, 1 reply; 4+ messages in thread
From: Derrick Stolee @ 2018-06-08 17:15 UTC (permalink / raw)
  To: Robert P. J. Day, Git Mailing list

On 6/8/2018 9:18 AM, Robert P. J. Day wrote:
>    for one of my courses, i wanted to write a section about the various
> techniques for dealing with whitespace issues in git, so i started
> making a list, things like:
>
>    - running "git diff --check"
>    - "git commit --cleanup=" possibilities
>    - config options like core.{eol,safecrlf,autocrlf}
>    - i'm sure there are client-side hooks that can be mentioned
>
> etc, etc.
>
>    has anyone ever written a doc that collects these things in one
> place? if not, i guess i have to write one.
>
> rday
>

I don't know of a doc for whitespace issues, but the contributing guide 
on GitForWindows [1] recommends `git rebase --whitespace=fix`.

Thanks,
-Stolee

[1] 
https://github.com/git-for-windows/git/blob/master/CONTRIBUTING.md#polish-your-commits

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: is there a canonical doc about how to deal with whitespace issues?
  2018-06-08 17:15 ` Derrick Stolee
@ 2018-06-11 21:45   ` Stefan Beller
  2018-06-13 12:26     ` Robert P. J. Day
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Beller @ 2018-06-11 21:45 UTC (permalink / raw)
  To: Derrick Stolee; +Cc: Robert P. J. Day, git

On Fri, Jun 8, 2018 at 10:15 AM Derrick Stolee <stolee@gmail.com> wrote:
>
> On 6/8/2018 9:18 AM, Robert P. J. Day wrote:
> >    for one of my courses, i wanted to write a section about the various
> > techniques for dealing with whitespace issues in git, so i started

What do you mean by white space issues?
That in itself is a complex topic:
* There are 3 different modes to ignore white space changes:
  - trailing whitespaces,
  - conversion of tab to space and back
    These two are caught by the default in 'git diff --check'
  - any white space change
    This is interesting to ignore in git-blame[1], but sometimes
    it is actually interesting.

[1] See also
https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/git-hyper-blame.html



> > making a list, things like:
> >
> >    - running "git diff --check"
> >    - "git commit --cleanup=" possibilities
> >    - config options like core.{eol,safecrlf,autocrlf}

This sounds more like line ending or cross platform issues
than whitespaces (except .eol)

> >    - i'm sure there are client-side hooks that can be mentioned

Personally I use the defaults when contributing to git.git
and have an editor setting that removes trailing white spaces.

That has served me well so far; the only time I was bitten by
white spaces is when sending patches using an email client
other than git-send-email as the white spaces might get mangled
there.

Is sending patches by email part of your course?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: is there a canonical doc about how to deal with whitespace issues?
  2018-06-11 21:45   ` Stefan Beller
@ 2018-06-13 12:26     ` Robert P. J. Day
  0 siblings, 0 replies; 4+ messages in thread
From: Robert P. J. Day @ 2018-06-13 12:26 UTC (permalink / raw)
  To: Stefan Beller; +Cc: Derrick Stolee, git

On Mon, 11 Jun 2018, Stefan Beller wrote:

> On Fri, Jun 8, 2018 at 10:15 AM Derrick Stolee <stolee@gmail.com> wrote:
> >
> > On 6/8/2018 9:18 AM, Robert P. J. Day wrote:
> > >    for one of my courses, i wanted to write a section about the
> > > various techniques for dealing with whitespace issues in git, so
> > > i started
>
> What do you mean by white space issues?
> That in itself is a complex topic:

  i know ... it's not even clear that just dealing with EOL
standardization shouldn't be a topic all by itself.

> * There are 3 different modes to ignore white space changes:
>   - trailing whitespaces,
>   - conversion of tab to space and back
>     These two are caught by the default in 'git diff --check'
>   - any white space change
>     This is interesting to ignore in git-blame[1], but sometimes
>     it is actually interesting.
>
> [1] See also
> https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/git-hyper-blame.html
>
>
>
> > > making a list, things like:
> > >
> > >    - running "git diff --check"
> > >    - "git commit --cleanup=" possibilities
> > >    - config options like core.{eol,safecrlf,autocrlf}
>
> This sounds more like line ending or cross platform issues
> than whitespaces (except .eol)

  i just started a quick-and-dirty wiki page as a reference to things
that relate to whitespace:

  http://crashcourse.ca/dokuwiki/doku.php?id=git_whitespace

it's not even *remotely* close to comprehensive, i just wanted to
start making a list. feel free to make other suggestions as i keep
adding to that page.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-13 12:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-08 13:18 is there a canonical doc about how to deal with whitespace issues? Robert P. J. Day
2018-06-08 17:15 ` Derrick Stolee
2018-06-11 21:45   ` Stefan Beller
2018-06-13 12:26     ` Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.