Re: [PATCH] prune: mark rebase autostash and orig-head as reachable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Thu, Feb 8, 2024 at 10:08 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
> "Phillip Wood via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
> > Rebase records the oid of HEAD before rebasing and the commit created by
> > "--autostash" in files in the rebase state directory. This means that
> I do not like this kind of special casing in general, but because
> these are our tools' droppings, I am OK to grandfather them in, as
> long as we promise ourselves that we will not add more of these
> ad-hoc "text files" that record object names, loss of which affects
> correctness.  They should, like "git bisect", be using proper
> references to protect these objects instead, of course.

I have long wanted to have a special ref named "AUTOSTASH" since it
supports my workflow of applying workdir changes to previous commits
during a rebase.  For example, I often do this:

     $ git rebase -i
     Created autostash: c0ffeebea0
     <stopped to edit some commit in my history>
     $ git stash apply c0ffeebea0
     $ git commit --amend && git rebase --continue

But it requires me to find the text output after "Created autostash:"
from the original rebase command which may have scrolled a lot by now.
It would be easier to say:
     $ git stash apply AUTOSTASH

I see that MERGE_AUTOSTASH has been added lately. And I am inferring
that there's a desire to remove (eventually) these file-based info
trackers such as "rebase-apply/autostash". Is there any reason not to
raise the rebase/autostash notation to a proper ref now?  Should it be
named REBASE_AUTOSTASH if I add this?

Even if we don't remove the file-based notation immediately
"rebase-apply/autostash", I would like to add a ref that duplicates
the information for my workflow. Maybe we can deprecate the file
itself and remove it in some future version.

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux