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

Re: [PATCH v2] stash: expose untracked modes in create

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 5, 2026, 16:43 UTC
Message-ID
<xmqq1pa4ksiw.fsf@gitster.g>
In-Reply-To
<CANUHOw3gynMRGN7A-wOnL3PQtgFbMtsB2gyZxaq+0Z5bHp-H8A@mail.gmail.com>
重田一聖 <kazumasa.shigeta@kanamei.com> writes:
> Your question made me realize that I had focused too narrowly on the
> untracked modes. The larger issue is not simply that `do_create_stash()`
> has capabilities that `git stash create` does not expose.
Brilliant.  I agree that is the right way to frame the issue.
> Making more of those capabilities available through `create` would
> therefore mean either changing that contract or designing around it.
> That is a much larger interface decision than I appreciated when I sent
> the patch.

Perhaps, but I do not think it is too huge a backward-compatibility breakage to forbid giving a message lazily (i.e., all strings in argv[] after 'git stash create' gets concatenated and becomes a single message) that begins with "-", with an escape hatch that a leading "-m" will take the next argv[] element as the message, for example.

> 2. Add a new stash subcommand for the creation functionality.

This is essentially how 'git stash save' came about, to give us ways to control how a new stash entry is created and how the working tree is cleared with command line options. In the beginning, you did not even have to say 'save', because 'git stash <message>' was invented as a way to say "the boss is here and tells me to work on something unrelated. clear the slate with minimum number of keystrokes to continue working on what I have been working on later." And that later became 'git stash push'.

> 3. Add something like `--create-only` to `git stash push`.
This also would work and sounds the safest.
Previous: Phillip Wood
Message 16 of 16 in “stash: expose untracked modes in create”
  1. stash: expose untracked modes in createKazumasa Shigeta, Sep 29, 2026
  2. Phillip WoodSep 29, 2026
  3. 重田一聖Oct 1, 2026
  4. Phillip WoodOct 5, 2026
  5. stash: expose untracked modes in createKazumasa Shigeta, Oct 1, 2026
  6. Patrick SteinhardtOct 1, 2026
  7. 重田一聖Oct 1, 2026
  8. Junio C HamanoOct 1, 2026
  9. Junio C HamanoOct 1, 2026
  10. 重田一聖Oct 2, 2026
  11. 重田一聖Oct 2, 2026
  12. 重田一聖Oct 5, 2026
  13. Phillip WoodOct 5, 2026
  14. 重田一聖Oct 6, 2026
  15. Phillip WoodOct 6, 2026
  16. Junio C HamanoOct 5, 2026

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.