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 9, 2026, 19:05 UTC
Message-ID
<xmqqqzhyoftg.fsf@gitster.g>
In-Reply-To
<CANUHOw3N+_yWnh7=2-5fD+XxgYC9-M9fqL8GEjfEC6kN+CD=gg@mail.gmail.com>
重田一聖 <kazumasa.shigeta@kanamei.com> writes:
Show 17 quoted lines
> I realized that I had been treating two decisions as one:
> whether to introduce option parsing in `stash create`, and how much
> of what `do_create_stash()` already supports to expose now.
>
> I think adding option parsing and `-m/--message` now would be useful,
> even if we only expose a few options. That is because we should not
> need to revisit the basic parsing and message compatibility question
> just to add another script-oriented option later.
>
> That makes me think we don't need to expose everything
> `do_create_stash()` already supports in this patch. I now think
> we don't need to settle the public rules for other options and
> their interactions until there is a concrete need.
>
> In particular, I would prioritize leaving out options for which
> I haven't found a concrete request and whose interaction rules
> might make future additions harder if fixed now.

Stepping back a bit, I think the long-term goal should be to extend the 'create' and 'store' pair sufficiently to allow script writers to write their own 'git stash push' on top of them if they wanted to. 'git stash create' does not have to be fully capable of doing so with the current topic alone, but do you agree that improving 'create' in such a way should be our long-term goal?

With that future vision in mind, I am not sure I follow what you said above. Shouldn't 'stash create --foo' work the same way as 'stash push --foo' while creating the stash entry, if '--foo' is not an option relevant only to 'stash store'? Under what circumstances does a '--foo' option that 'push' has (and for which you have not seen a request) have to behave differently when added to 'create', leaving a stash entry of a different shape from the one 'push --foo' would create?

If the wish is "we want to start small because thinking about each and every one of them and making sure they work correctly is too much work for my liking", I would understand. But I do not understand how "we worry we may overspecify without knowing the need" would apply to this particular case, even though it is a good thing to keep in mind in other situations.

Thanks.
Previous: 重田一聖Next: 重田一聖
Message 19 of 20 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. 重田一聖Oct 8, 2026
  17. Junio C HamanoOct 5, 2026
  18. 重田一聖Oct 8, 2026
  19. Junio C HamanoOct 9, 2026
  20. 重田一聖Oct 10, 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.