git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 14 in “Adds 'stash.index' configuration option”
  1. Adds 'stash.index' configuration optionDavid Pisoni, May 11, 2011
  2. Junio C HamanoMay 11, 2011
  3. Junio C HamanoMay 12, 2011
  4. David PisoniMay 12, 2011
  5. Junio C HamanoMay 12, 2011
  6. Michael J GruberMay 12, 2011
  7. Jeff KingMay 12, 2011
  8. Michael J GruberMay 12, 2011
  9. Jeff KingMay 12, 2011
  10. RFC proposal: set git defaults options from configMichael J Gruber, May 12, 2011
  11. David PisoniMay 12, 2011
  12. Jeff KingMay 16, 2011
  13. Jeff KingMay 16, 2011
  14. Michael J GruberMay 16, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.