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
Phil Hord <phil.hord@gmail.com>
Date
Apr 16, 2013, 16:50 UTC
Message-ID
<CABURp0qgxtcf_RCrobWr5Q_yiBraVOMDq9hWHrzP=EbZV46xiQ@mail.gmail.com>
In-Reply-To
<CALkWK0ndk7hPYk4pN8gmLxLOJR0XsLo1gwHB=n0QkK6DHgLzKQ@mail.gmail.com>

On Tue, Apr 16, 2013 at 5:20 AM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:

Show 14 quoted lines
> Matthieu Moy wrote:
> No.  Ultimately, the entry point of all these invocations is
> git-rebase.sh.  The plan is to refactor calls from git-rebase.sh to
> git-rebase--*.sh scripts so that those scripts return control to
> git-rebase.sh, which will be the final exit point.  The logic is very
> simple: On the very first invocation of rebase (ie. no existing rebase
> in progress), stash.  If the return statement from the specific rebase
> script is 1 (which means that there are conflicts to be resolved),
> exit as usual.  If it is 0 (which means that the rebase completely
> successfully), pop the stash before exiting as usual.
>
> What's so complicated about that?  I'm against leaking the autostash
> implementation detail into specific rebases, because I value a clean
> and pleasant implementation over everything else.
It can be more complex than you realize.
   $ git pull --rebase --stash
    It seems that there is already a .git/rebase-apply directory, and
    I wonder if you are in the middle of another rebase.  If that is the
    case, please try
            git rebase (--continue | --abort | --skip)
    If that is not the case, please
            rm -fr .git/rebase-apply
    and run me again.  I am stopping in case you still have something
    valuable there.

If I follow the latter advice about 'rm -rf', who will remember that 'rebase' had something stashed, and what will they do with it when they do?

What if it is weeks or months later? I would be surprised to see long-forgotten wip show up in my workspace all of a sudden.

Phil
Previous: Junio C HamanoNext: Ramkumar Ramachandra
Message 43 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.