From: Peter Williams <pwil3058@bigpond.net.au>
To: Junio C Hamano <junkio@cox.net>
Cc: Andrew Morton <akpm@osdl.org>, git@vger.kernel.org
Subject: Re: the war on trailing whitespace
Date: Tue, 28 Feb 2006 10:29:55 +1100 [thread overview]
Message-ID: <44038B73.4030004@bigpond.net.au> (raw)
In-Reply-To: <7vhd6kxuea.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> Andrew Morton <akpm@osdl.org> writes:
>
>
>>That's not a good reason. People will discover that git has started
>>shouting at them and they'll work out how to make it stop.
>>
>>The problem is getting C users to turn the check on, not in getting python
>>users to turn it off.
>
>
> This whitespace policy should be at least per-project (people
> working on both kernel and other things may have legitimate
> reason to want trailing whitespace in the other project),
I'd be interested to hear these reasons. My experience is that people
don't put trailing white space in deliberately (or even tolerate it if
they notice it) and it's usually there as a side effect of the way their
text editor works (and that's also the reason that they don't usually
notice it). But if my experience is misleading me and there are valid
reasons for having trailing white space I'm genuinely interested in
knowing what they are.
> so we
> would need some configurability; the problem is *both*.
>
> We could do one of two things, at least.
>
> - I modify the git-apply that is in the "next" branch further
> to make --whitespace=error the default, and push it out. You
> convince people who feed things to you to update to *that*
> version or later.
>
> - I already have the added whitespace detection hook (a fixed
> one that actually matches what I use) shipped with git. You
> convince people who feed things to you to update to *that*
> version or later, and to enable that hook.
>
> I think you are arguing for the first one. I am reluctant to do
> so because it would not help by itself *anyway*. In any case
> you need to convince people who feed things to you to do
> something to prevent later changes fed to you from being
> contaminated with trailing whitespaces.
>
> Having said that, I have a third solution, which consists of two
> patches that come on top of what are already in "next" branch:
>
> - apply: squelch excessive errors and --whitespace=error-all
> - apply --whitespace: configuration option.
>
> With these, git-apply used by git-applymbox and git-am would
> refuse to apply a patch that adds trailing whitespaces, when the
> per-repository configuration is set like this:
>
> [apply]
> whitespace = error
>
> (Alternatively,
>
> $ git repo-config apply.whitespace error
>
> would set these lines there for you).
>
> I think there are three kinds of git users.
>
> * Linus, you, and the kernel subsystem maintainers. The
> whitespace policy with this version of git-apply (with the
> configuration option set to apply.whitespace=error) gives
> would help these people by enforcing the SubmittingPatches
> and your "perfect patch" requirements.
>
> * People who feed patches to the above people. They are helped
> by enabling the pre-commit hook that comes with git to
> conform to the kernel whitespace policy -- they need to be
> educated to do so.
>
> * People outside of kernel community, using git in projects to
> which the kernel whitespace policy does not have any
> relevance.
>
> While I do consider the kernel folks a lot more important
> customers than other users, I have to take flak from the third
> kind of users, and to them, authority by Linus or you does not
> weigh as much as the first two classes of people. Making the
> default to --whitespace=error means that you are making me
> justify this kernel project policy as something applicable to
> projects outside the kernel. That is simply not fair to me.
>
> You have to convince people you work with to update to at least
> to this version anyway, so I do not think it is too much to ask
> from you, while you are at it, to tell the higher echelon folks
> to do:
>
> $ git repo-config apply.whitespace error
>
> in their repositories (and/or set that in their templates so new
> repositories created with git-init-db would inherit it).
>
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Peter Williams pwil3058@bigpond.net.au
"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
next prev parent reply other threads:[~2006-02-27 23:30 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-26 1:40 the war on trailing whitespace Andrew Morton
2006-02-26 3:38 ` Junio C Hamano
2006-02-26 5:07 ` Andrew Morton
2006-02-26 17:29 ` Linus Torvalds
2006-02-26 18:36 ` Andrew Morton
2006-02-26 20:16 ` Linus Torvalds
2006-02-26 20:26 ` Dave Jones
2006-02-26 20:31 ` Dave Jones
2006-02-27 2:50 ` MIke Galbraith
2006-02-27 9:07 ` Johannes Schindelin
2006-02-27 9:18 ` Andrew Morton
2006-02-27 23:18 ` Junio C Hamano
2006-02-27 23:29 ` Peter Williams [this message]
2006-02-28 0:10 ` Junio C Hamano
2006-02-27 23:37 ` Andrew Morton
2006-02-28 9:13 ` [PATCH] git-apply: war on whitespace -- finishing touches Junio C Hamano
2006-02-28 1:13 ` [PATCH 1/3] apply: squelch excessive errors and --whitespace=error-all Junio C Hamano
2006-02-28 1:13 ` [PATCH 2/3] apply --whitespace: configuration option Junio C Hamano
2006-02-28 9:16 ` Andreas Ericsson
2006-02-28 9:38 ` Junio C Hamano
2006-02-28 9:46 ` Andreas Ericsson
2006-02-28 1:13 ` [PATCH 3/3] git-apply --whitespace=nowarn Junio C Hamano
2006-02-28 3:26 ` A Large Angry SCM
2006-02-28 5:08 ` Junio C Hamano
2006-02-27 11:26 ` the war on trailing whitespace Adrien Beau
2006-02-27 11:41 ` Andreas Ericsson
2006-02-27 13:31 ` Uwe Zeisberger
2006-02-27 14:10 ` Andreas Ericsson
2006-02-27 14:31 ` Peter Hagervall
2006-02-27 14:40 ` Johannes Schindelin
2006-02-27 15:22 ` Randal L. Schwartz
2006-02-27 16:08 ` Josef Weidendorfer
2006-02-27 16:22 ` Adrien Beau
2006-02-27 16:37 ` Uwe Zeisberger
2006-02-27 16:41 ` Andreas Ericsson
2006-02-27 11:55 ` Johannes Schindelin
2006-02-27 0:45 ` Junio C Hamano
2006-02-27 2:14 ` [PATCH] apply --whitespace fixes and enhancements Junio C Hamano
2006-02-26 20:29 ` the war on trailing whitespace Junio C Hamano
2006-02-26 19:45 ` Sam Ravnborg
-- strict thread matches above, loose matches on Subject: below --
2006-02-28 1:07 linux
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=44038B73.4030004@bigpond.net.au \
--to=pwil3058@bigpond.net.au \
--cc=akpm@osdl.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).