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

Re: [RFC] stash: support filename argument

From
Stephan Beyer <s-beyer@gmx.net>
Date
Jan 16, 2017, 00:41 UTC
Message-ID
<c0d46a97-b1c0-d9c9-e475-28e0368ac61f@gmx.net>
In-Reply-To
<xmqqvatfc0rt.fsf@gitster.mtv.corp.google.com>
Hi,
On 01/16/2017 01:21 AM, Junio C Hamano wrote:
Show 6 quoted lines
> I haven't spent enough time to think if it even makes sense to
> "stash" partially, leaving the working tree still dirty.  My initial
> reaction was "then stashing away the dirty WIP state to get a spiffy
> clean working environment becomes impossible", and I still need time
> to recover from that ;-)  So as to the desirablity of this "feature",
> I have no strong opinion for or against yet.

I do remember that I simulated that feature a few times (either by adding the to-be-keep stuff (hunks, not only files) to the index and use --keep-index, and sometimes by making a temporary commit (to make sure to not lose anything) and then stash). So I think there is a valid desire of the feature.

However, going further, the next feature to be requested could be "git stash --patch" ;D This leads me to think that the mentioned simulation of partial stashes might be something everyone might come up with who has basic understanding of git features and "git stash", and might be the more flexible and probably better solution to the problem.

Best
  Stephan
Previous: Junio C HamanoNext: Marc Strapetz
Message 3 of 8 in “[RFC] stash: support filename argument”
  1. Thomas GummererJan 15, 2017
  2. Junio C HamanoJan 16, 2017
  3. Stephan BeyerJan 16, 2017
  4. Marc StrapetzJan 16, 2017
  5. Jeff KingJan 16, 2017
  6. Johannes SchindelinJan 16, 2017
  7. Johannes SchindelinJan 16, 2017
  8. Thomas GummererJan 16, 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.