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
Sergey Organov <sorganov@gmail.com>
Date
Oct 12, 2021, 16:07 UTC
Message-ID
<87k0ii446g.fsf@osv.gnss.ru>
In-Reply-To
<xmqqo87u777d.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> More importantly...
>>
>> Whenever I think about a new "feature", I try to come up with a
>> story in which the feature effectively improves the end-user's life,
>> how it fits in the larger picture, and enables something that is
>> hard to do by combining other tools.
>>
>> The kind of "story" I would aim for is like this.  Suppose we were
>> selling not "git stash -S" but "git stash -k". ...
>
[...]
> So in short, I do not think I am strongly opposed to "git stash -S"
> existing, since I did find one use case story that it could be used,
> but I do think it is redundant and unnecessary.
Redundant? Yes. Unnecessary? Yes. Useful? Yes. ;-)

I took the steps to propose the new feature after yet another round of "how do I quickly store this tiny bit of changes I just figured I need for later, out of bunch of VIWIP changes?"

  git stash --staged

is exactly the (currently missing) answer for me, as I have pretty interactive tool to stage diff chunks always handy.

What's your answer, I wonder?

That said, I'm also curious what story, if any, do you have for 'git stash --patch', as exactly the same story should be applicable to proposed 'git stash --staged', as far as I can see.

Thanks, -- Sergey Organov

Previous: Junio C HamanoNext: Junio C Hamano
Message 9 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.