Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Phil Hord <>
To: Junio C Hamano <>
Cc: Phillip Wood via GitGitGadget <>,,  Orgad Shaneh <>,
	Phillip Wood <>
Subject: Re: [PATCH] prune: mark rebase autostash and orig-head as reachable
Date: Tue, 14 May 2024 12:37:28 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <xmqqmssan841.fsf@gitster.g>

On Thu, Feb 8, 2024 at 10:08 AM Junio C Hamano <> wrote:
> "Phillip Wood via GitGitGadget" <> 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.

  parent reply	other threads:[~2024-05-14 19:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08 17:00 [PATCH] prune: mark rebase autostash and orig-head as reachable Phillip Wood via GitGitGadget
2024-02-08 17:25 ` Eric Sunshine
2024-02-09 11:08   ` Phillip Wood
2024-02-08 18:06 ` Junio C Hamano
2024-02-09 14:15   ` Phillip Wood
2024-05-14 19:37   ` Phil Hord [this message]
2024-02-09 16:19 ` [PATCH v2] " Phillip Wood via GitGitGadget
2024-02-09 18:04   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).