git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Felipe Contreras <felipe.contreras@gmail.com>,
	Nanako Shiraishi <nanako3@lavabit.com>,
	git@vger.kernel.org
Subject: Re: [PATCHv3] git apply: option to ignore whitespace differences
Date: Fri, 31 Jul 2009 21:22:09 +0200	[thread overview]
Message-ID: <cb7bb73a0907311222h49caf016pb9b4a4fd2bd766a@mail.gmail.com> (raw)
In-Reply-To: <7v1vnwsreu.fsf@alter.siamese.dyndns.org>

On Fri, Jul 31, 2009 at 7:17 PM, Junio C Hamano<gitster@pobox.com> wrote:
> Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:
>
>> Before I go on with the next revision of the patch, I would like to
>> have some kind of agreed convention to implement.
>>
>> My suggestion would be the following:
>> (1) implement options --ignore-space-change, --ignore-all-space
>> mirroring their 'git diff' meaning.
>> (2) add --ignore-whitespace as a synonym to --ignore-space-change, for
>> consistency with 'patch'
>> (3) apply.ignore-whitespace accepts values
>>      * false,no,none,0 to mean no whitespace ignoring
>>      * true,yes,change,1 to mean ignore whitespace change
>>      * all,2 to mean ignore all whitespace
>
> I'd suggest taking one small bite at a time.

Sure.

> A later follow-up patch would complete your (1) and (2) by supporting
> ignore-all-space.  And perhaps you would give it --ignore-all-whitespace
> synonym perhaps?  You may want to ask "GNU patch" people if they are
> interested in ignoring all whitespaces, and if so what their plan is to
> name that option, so that you can use the same name.

I was thinking about making --ignore-whitespace (I'd rather keep the
-- because that's what patch goes for) accept an optional argument,
allowing e.g. --ignore-whitespace=no to overrule the config option. In
this case we would have --ignore-whitespace=all as synonym to
-ignore-all-space. It would also make the --ignore-whitespace option
more in line with the ignorewhitespace config

-- 
Giuseppe "Oblomov" Bilotta

      reply	other threads:[~2009-07-31 19:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 21:00 [PATCHv3] git apply: option to ignore whitespace differences Giuseppe Bilotta
2009-07-28 21:29 ` Junio C Hamano
2009-07-29  6:33   ` Giuseppe Bilotta
2009-07-29  7:09     ` Junio C Hamano
2009-07-29  8:20       ` Giuseppe Bilotta
2009-07-29  8:39         ` Junio C Hamano
2009-07-29  9:05           ` Giuseppe Bilotta
2009-07-29  8:40     ` Nanako Shiraishi
2009-07-29  9:09       ` Giuseppe Bilotta
2009-07-31  0:27       ` Felipe Contreras
2009-07-31  0:48         ` Junio C Hamano
2009-07-31 15:38           ` Felipe Contreras
2009-07-31 16:16             ` Giuseppe Bilotta
2009-07-31 17:17               ` Junio C Hamano
2009-07-31 19:22                 ` Giuseppe Bilotta [this message]

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=cb7bb73a0907311222h49caf016pb9b4a4fd2bd766a@mail.gmail.com \
    --to=giuseppe.bilotta@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nanako3@lavabit.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.
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).