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

Re: [PATCH 3/3] pull: introduce --[no-]autostash and pull.autostash

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 16, 2013, 17:42 UTC
Message-ID
<7vsj2qmkwv.fsf@alter.siamese.dyndns.org>
In-Reply-To
<vpqvc7mdd3x.fsf@grenoble-inp.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 12 quoted lines
> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>
>> If it is 0 (which means that the rebase completely successfully), pop
>> the stash before exiting as usual.
>
> And you're going to pop the stash even if no stash were triggered when
> starting the rebase.
>
> Really, think about it again: you're not going to guess whether you have
> to unstash without storing this information somewhere. You may argue
> about storing it outside the todolist, you can't unstash
> unconditionally.
Yes, it can be part of todo, but it does not have to be.

Regardless of where the information is stored, implementing the last step as "stash pop" will add a small inconsistency the end user needs to be aware of.

Imagine "git rebase" stops, asks you to help with conflicts, and you look at it, play with the working tree, and made a mess. If this was the last "stash pop" invocation, the way to go back and start again is "reset --hard && stash pop". For all the other steps, that is not how the user goes back to the originally conflicted state in order to retry from scratch.

Makes me wonder if the world were a better place if the rebase-todo list were implemented as a dedicated stash and "rebase --continue" were a mere "stash pop" followed by a commit if pop goes smoothly.

I am not suggesting to actually do so, but it is an intriguing thought from the perspective of end user experience, isn't it?

In any case, I am not saying that it is a _bad_ thing to implement the last "restore the WIP" stage as "stash pop". I am just pointing out that the messaging needs to be done carefully to make sure the user understands which one is which, as the way to deal with the situation where it stops and asks the user for help would be different from normal step in the rebase sequence that replays a commit.

Previous: Matthieu MoyNext: Phil Hord
Message 42 of 44 in “Introduce pull.autostash”
  1. 0/3 Introduce pull.autostashRamkumar Ramachandra, Apr 13, 2013
  2. 1/3 pull: prefer invoking "git <command>" over "git-<command>"Ramkumar Ramachandra, Apr 13, 2013
  3. Philip OakleyApr 14, 2013
  4. 2/3 t5521 (pull-options): use test_commit() where appropriateRamkumar Ramachandra, Apr 13, 2013
  5. 3/3 pull: introduce --[no-]autostash and pull.autostashRamkumar Ramachandra, Apr 13, 2013
  6. Junio C HamanoApr 15, 2013
  7. Ramkumar RamachandraApr 15, 2013
  8. Junio C HamanoApr 15, 2013
  9. Ramkumar RamachandraApr 15, 2013
  10. Matthieu MoyApr 15, 2013
  11. Junio C HamanoApr 15, 2013
  12. Matthieu MoyApr 15, 2013
  13. Ramkumar RamachandraApr 15, 2013
  14. Matthieu MoyApr 15, 2013
  15. Ramkumar RamachandraApr 15, 2013
  16. Matthieu MoyApr 15, 2013
  17. Ramkumar RamachandraApr 15, 2013
  18. Jonathan NiederApr 16, 2013
  19. Ramkumar RamachandraApr 15, 2013
  20. Matthieu MoyApr 15, 2013
  21. Ramkumar RamachandraApr 15, 2013
  22. Ramkumar RamachandraApr 15, 2013
  23. Matthieu MoyApr 15, 2013
  24. Junio C HamanoApr 15, 2013
  25. Ramkumar RamachandraApr 15, 2013
  26. John KeepingApr 15, 2013
  27. Ramkumar RamachandraApr 15, 2013
  28. Jonathan NiederApr 16, 2013
  29. Ramkumar RamachandraApr 16, 2013
  30. Jonathan NiederApr 16, 2013
  31. Junio C HamanoApr 15, 2013
  32. Ramkumar RamachandraApr 15, 2013
  33. Junio C HamanoApr 15, 2013
  34. Ramkumar RamachandraApr 15, 2013
  35. John KeepingApr 15, 2013
  36. Matthieu MoyApr 15, 2013
  37. Ramkumar RamachandraApr 16, 2013
  38. Matthieu MoyApr 16, 2013
  39. Ramkumar RamachandraApr 16, 2013
  40. Matthieu MoyApr 16, 2013
  41. Matthieu MoyApr 16, 2013
  42. Junio C HamanoApr 16, 2013
  43. Phil HordApr 16, 2013
  44. Ramkumar RamachandraApr 16, 2013

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.