git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/3] apply --whitespace: configuration option.
Date: Tue, 28 Feb 2006 10:46:45 +0100	[thread overview]
Message-ID: <44041C05.3030103@op5.se> (raw)
In-Reply-To: <7vzmkbn7qx.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> Andreas Ericsson <ae@op5.se> writes:
> 
> 
>>Junio C Hamano wrote:
>>
>>>The new configuration option apply.whitespace can take one of
>>>"warn", "error", "error-all", or "strip".  When git-apply is run
>>>to apply the patch to the index, they are used as the default
>>>value if there is no command line --whitespace option.
>>
>>I would think "warn-all" would be the logical thing, since "error"
>>either breaks out early or prints all warnings before denying the
>>patch anyway.
> 
> 
> Actually there is some thinking behind why I did not do warn-all.
> I did consider it at first but rejected.
> 
>  * If you are a busy top echelon person but cares about tree
>    cleanliness, --whitespace=error is good enough.  The patch is
>    rejected on WS basis whether it introduces one such trailing
>    WS or hundreds.  The patch is returned to the submitter and
>    the tree remains clean.
> 
>  * --whitespace=warn-all, if existed, would apply the patch
>    _anyway_, so if you notice you got warnings, and if that
>    bothers you enough that you would want to do something about
>    it, you will have to rewind the HEAD, fix up .dotest/patch
>    and reapply.  This means you are willing to clean up other
>    peoples' patches.
> 
>  * But if you are that kind of person, --whitespace=error-all is
>    a better choice for you.  Your tree stays clean and you do
>    not have to rewind.  Instead, you get all the errors you can
>    go through with your editor (e.g. Emacs users can use C-x `;
>    I hope vim users have similar macros) and fix things.
> 

Good Thinking. Thanks for explaining.

> 
> The last one is somewhat risky, and the output may need to be
> examined carefully depending on the contents (e.g. programming
> language) the project is dealing with.
> 
> 

echo Makefile >> .git/no-ws-strip
echo '*.[ch]' >> .git/ws-strip

Perhaps not viable, and probably stupid as well. Mixed content repos 
would likely just keep the 'warn' policy.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  reply	other threads:[~2006-02-28  9:46 UTC|newest]

Thread overview: 40+ 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
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 [this message]
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

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=44041C05.3030103@op5.se \
    --to=ae@op5.se \
    --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).