git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Jun 13, 2018, 12:26 UTC
Message-ID
<alpine.LFD.2.21.1806130824110.12332@localhost.localdomain>
In-Reply-To
<CAGZ79kazegY-udjKfbkfw=ox82cfxhO5E3AEjLKkSt3LMY-DFw@mail.gmail.com>
On Mon, 11 Jun 2018, Stefan Beller wrote:
Show 9 quoted lines
> 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.
Show 21 quoted lines
> * 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
========================================================================
Previous: Stefan Beller
Message 4 of 4 in “is there a canonical doc about how to deal with whitespace issues?”
  1. Robert P. J. DayJun 8, 2018
  2. Derrick StoleeJun 8, 2018
  3. Stefan BellerJun 11, 2018
  4. Robert P. J. DayJun 13, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.