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

Re: [PATCH] doc: emphasize stash "--keep-index" stashes staged content

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2017, 00:38 UTC
Message-ID
<xmqq376p42ul.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<alpine.LFD.2.21.1710110443360.11205@localhost.localdomain>
"Robert P. J. Day" <rpjday@crashcourse.ca> writes:
> -If the `--keep-index` option is used, all changes already added to the
> -index are left intact.
> +If the `--keep-index` option is used, all changes already staged in the
> +index are left intact in the index, while still being added to the stash.

I do not think "left intact in the index" is an improvement. The primary reason why people use --keep-index is to get a working tree that has _only_ the changes that are already added to the index and nothing else, so that the state in the index can be built and/or tested. So if you want to add anything to that sentence, it should stress the fact that changes are left intact "in the working tree". Adding "in the index" without doing so makes the result even more confusing, not less, by allowing a mis-read "left intact _only_ in the index? so the working tree files are reverted to the HEAD's version?"

I am still undecided as to the value of saying ", while still being added...".

Previous: Robert P. J. DayNext: Jonathan Nieder
Message 2 of 4 in “doc: emphasize stash "--keep-index" stashes staged content”
  1. doc: emphasize stash "--keep-index" stashes staged contentRobert P. J. Day, Oct 11, 2017
  2. Junio C HamanoOct 12, 2017
  3. Jonathan NiederOct 12, 2017
  4. Robert P. J. DayOct 12, 2017

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.