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

Re: [PATCH RFC v1] stash: implement '--staged' option for 'push' and 'save'

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 13, 2021, 04:48 UTC
Message-ID
<xmqqo87til8b.fsf@gitster.g>
In-Reply-To
<87lf2yqevj.fsf@osv.gnss.ru>
Sergey Organov <sorganov@gmail.com> writes:
> I didn't ask you what --staged is suitable for, sorry. I asked how do
> you solve the problem of saving an *entirely unrelated* subset of
> changes for future use?

Ah, OK. I do not think I would "git add" unrelated pieces in the first place, so "add -p && stash --staged" as a way to stash away such a change would be quite foreign concept in my workflow.

IOW, I'd concentrate on finishing the step I am working on, leaving unrelated changes in the working tree, and when I came to a good stopping point, I'd do the "stash -k && test && commit" dance, followed by "stash pop". At that point,the working tree would have only unrelated changes that I can stash away with "stash save".

So I guess perhaps your "no such problem for me" is the closest?
Thanks.
Previous: Sergey OrganovNext: Sergey Organov
Message 12 of 26 in “stash: implement '--staged' option for 'push' and 'save'”
  1. stash: implement '--staged' option for 'push' and 'save'Sergey Organov, Oct 1, 2021
  2. stash: implement '--staged' option for 'push' and 'save'Sergey Organov, Oct 11, 2021
  3. Eric SunshineOct 11, 2021
  4. Sergey OrganovOct 11, 2021
  5. Ævar Arnfjörð BjarmasonOct 12, 2021
  6. Sergey OrganovOct 12, 2021
  7. Junio C HamanoOct 12, 2021
  8. Junio C HamanoOct 12, 2021
  9. Sergey OrganovOct 12, 2021
  10. Junio C HamanoOct 12, 2021
  11. Sergey OrganovOct 12, 2021
  12. Junio C HamanoOct 13, 2021
  13. Sergey OrganovOct 13, 2021
  14. stash: implement '--staged' option for 'push' and 'save'Sergey Organov, Oct 15, 2021
  15. Junio C HamanoOct 15, 2021
  16. Sergey OrganovOct 15, 2021
  17. Junio C HamanoOct 15, 2021
  18. Sergey OrganovOct 15, 2021
  19. Sergey OrganovOct 15, 2021
  20. stash: implement '--staged' option for 'push' and 'save'Sergey Organov, Oct 18, 2021
  21. Jeff KingOct 26, 2021
  22. Sergey OrganovOct 27, 2021
  23. stash: implement '--staged' option for 'push' and 'save'Sergey Organov, Oct 27, 2021
  24. Junio C HamanoOct 27, 2021
  25. stash: get rid of unused argument in stash_staged()Sergey Organov, Oct 28, 2021
  26. Junio C HamanoOct 28, 2021

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.