From: Junio C Hamano <gitster@pobox.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Daniel Barkalow <barkalow@iabervon.org>, git@vger.kernel.org
Subject: Re: [PATCH] Add gitattributes file making whitespace checking pickier
Date: Sat, 09 Feb 2008 12:57:46 -0800 [thread overview]
Message-ID: <7vr6fletkl.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080209185038.GB25533@fieldses.org> (J. Bruce Fields's message of "Sat, 9 Feb 2008 13:50:38 -0500")
"J. Bruce Fields" <bfields@fieldses.org> writes:
> Yeah, fair enough. Hard to know where to start, though. OK, just to
> get an idea, I committed a completely empty tree, made a diff (with
> --binary), then applied with --whitespace=fix and compared to the
> original. In some cases these seem to be accidental, in some cases
> (git-p4) I assume they're intended to use the different style.
I personally have this in .git/config
[core]
whitespace = indent,trail,space
and the following three lines in contrib/.gitattributes (untracked)
*.py whitespace=!indent,trail,space
*.el whitespace=!indent,trail,space
fast-import/git-p4 whitespace=!indent,trail,space
The latter I added after receiving a fix-up patch from Toby
Allsopp a few days ago. I applied git-p4 patch with the
strictest rule.
As you argued correctly earlier, when we made the whitespace
rules per-path using the attributes mechanism, the whitespace
policy should be project wide, just like coding style, so I
think it is a good idea to have in-tree .gitattributes files
that spell out what the policy is more explicitly.
At least I think we can all agree that this one entry in the
toplevel .gitattributes is a safe and good idea.
*.[ch] whitespace
I am not sure about the AsciiDoc Documentation. I've always
assumed that the docs would format exactly the same before and
after running expand and/or unexpand on Documentation/*.txt, and
if that is indeed the case we should add
*.txt whitespace
to Documentation/.gitattributes as well.
Then I should _discard_ the one in my .git/config and the
untracked contrib/.gitattributes file.
next prev parent reply other threads:[~2008-02-09 20:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 16:22 [PATCH] Add gitattributes file making whitespace checking pickier J. Bruce Fields
2008-02-09 17:56 ` Daniel Barkalow
2008-02-09 18:50 ` J. Bruce Fields
2008-02-09 19:05 ` J. Bruce Fields
2008-02-09 19:36 ` Jakub Narebski
2008-02-09 20:04 ` J. Bruce Fields
2008-02-09 20:22 ` Jakub Narebski
2008-02-09 23:39 ` J. Bruce Fields
2008-02-09 20:57 ` Junio C Hamano [this message]
2008-02-09 23:36 ` J. Bruce Fields
2008-02-09 23:45 ` Jakub Narebski
2008-02-10 4:01 ` Junio C Hamano
2008-02-10 11:31 ` Jakub Narebski
2008-02-10 21:52 ` Junio C Hamano
2008-02-10 10:52 ` Junio C Hamano
2008-02-10 18:56 ` J. Bruce Fields
2008-02-10 20:22 ` Daniel Barkalow
2008-02-10 21:47 ` Junio C Hamano
2008-02-10 22:34 ` Daniel Barkalow
2008-02-11 3:34 ` Junio C Hamano
2008-02-12 7:43 ` Brian Downing
2008-02-12 21:42 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vr6fletkl.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=barkalow@iabervon.org \
--cc=bfields@fieldses.org \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).