From: Stefan Beller <sbeller@google.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>, git <git@vger.kernel.org>
Subject: Re: is there a canonical doc about how to deal with whitespace issues?
Date: Mon, 11 Jun 2018 14:45:59 -0700 [thread overview]
Message-ID: <CAGZ79kazegY-udjKfbkfw=ox82cfxhO5E3AEjLKkSt3LMY-DFw@mail.gmail.com> (raw)
In-Reply-To: <b8801d73-71c4-15c8-4b29-8e4edb3faec9@gmail.com>
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?
next prev parent reply other threads:[~2018-06-11 21:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-06-13 12:26 ` Robert P. J. Day
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGZ79kazegY-udjKfbkfw=ox82cfxhO5E3AEjLKkSt3LMY-DFw@mail.gmail.com' \
--to=sbeller@google.com \
--cc=git@vger.kernel.org \
--cc=rpjday@crashcourse.ca \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).