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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On May 11, 2011, at 17.26 , Junio C Hamano wrote:

Junio C Hamano <gitster@xxxxxxxxx> 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. :)


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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]