Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Adds 'stash.index' configuration option

From: David Pisoni <hidden>
Date: 2016-06-15 22:51:13

Possibly related (same subject, not in this thread)

On May 11, 2011, at 17.26 , Junio C Hamano wrote:
Junio C Hamano [off-list ref] writes:
quoted
quoted
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. :)
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.
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help