Re: [PATCH] Adds 'stash.index' configuration option
- From
David Pisoni <dpisoni@gmail.com>
- Date
- May 12, 2011, 00:48 UTC
- Message-ID
- <30791C70-81D4-44D7-B2E7-814D001F3E12@gmail.com>
- In-Reply-To
- <7vboz8epbp.fsf@alter.siamese.dyndns.org>
On May 11, 2011, at 17.26 , Junio C Hamano wrote:
Show 8 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > >>> Setting 'stash.index' config option changes 'git-stash pop|apply' >>> to behave >>> as if '--index' switch is always supplied. > > One thing I forgot to say. "stash.index" invites "index _what_?" > Naming it to "stash.useIndex" may avoid such reaction.
No objection. I want the feature (scratching my own itch here), but I don't really care what it's called. :)
Show 10 quoted lines
> > Also, the current code has this comment: > > # INDEX_OPTION is set to --index if --index is specified. > > but it probably makes sense to change it (in the first patch in the > series > that adds --no-index support) to a boolean whose value can be either > true > or empty.
It seemed a little wonky to me also, but this is my first foray into hacking on git and was concerned someone was depending on this, strange though it may be. git-blame fingers ef763129d for this oddity, dating August 2010.
Show 7 quoted lines
> > The reason why the very original code used INDEX_OPTION=--index may be > because it did something like "git some-cmd $INDEX_OPTION", but that > is > not what the current code does, and using "either '--index' or ''" > as a > form of boolean is confusing.
I agree. I like your change, also. Does this feature make sense to you overall?
<SNIP>
Thanks, David