Re: is there a canonical doc about how to deal with whitespace issues?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 8, 2018 at 10:15 AM Derrick Stolee <stolee@xxxxxxxxx> 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?



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux