Re: [PATCHv3] git apply: option to ignore whitespace differences
- From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
- Date
- Jul 31, 2009, 19:22 UTC
- Message-ID
- <cb7bb73a0907311222h49caf016pb9b4a4fd2bd766a@mail.gmail.com>
- 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:
Show 16 quoted lines
> 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.
Show 5 quoted lines
> 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