tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: tools@kernel.org
Subject: Re: small b4 feature request
Date: Wed, 11 Dec 2024 13:06:51 -0500	[thread overview]
Message-ID: <855e61050b56ff8da80bd78768d9ab577b21e595.camel@kernel.org> (raw)
In-Reply-To: <vkmfuwodnsmnrjwhypewv2a43fu3erjsokr357srj2a2edn54a@xtzh62xmrn4p>

On Tue, 2024-12-10 at 17:16 -0500, Konstantin Ryabitsev wrote:
> On Mon, Dec 09, 2024 at 05:13:31PM -0500, Jeff Layton wrote:
> > First, let me say that I love b4. It's great for managing a patch
> > series over time.
> 
> Great to hear, thanks!
> 
> > I often carry around the b4 commit at the base of my patch pile and end
> > up having to rebase on top of it. It would be great to have a way to
> > specify the b4 tracking commit symbolically to git so I could do this
> > without having to lookup the commit ID of the b4 head:
> > 
> >     $ git rebase -i B4_HEAD
> 
> I'm having a hard time wrapping my head around this (pun not intended). Is the
> commit in question the tip of the b4 branch, or the base commit?
> 
> In either case there is already a way to obtain this information with b4,
> e.g.:
> 
>     b4 prep --show-info base-commit
>     b4 prep --show-info end-commit
>     b4 prep --show-info series-range
> 
> So, e.g. if you want to rebase one prep-managed branch on top of another, you
> could do [1]:
> 
>     git rebase -i $(b4 prep --show-info b4/some-branch:end-commit)
> 
> Does this do what you need, or am I misunderstanding the situation?
> 
> [1]: apparently, show-info for a non-current branch was broken in master and
> 0.14.y, so you'll need the latest master or stable-0.14.y.
> 

That does help.

I was thinking that B4_HEAD to be the empty commit at the bottom of the
series-range that b4 uses to track the series. IOW:

    b4 prep --show-info series-range | cut -d'.' -f1

...but now that I look at the b4 innards, I see that there are
different cover-letter tracking strategies. Maybe just using "base-
commit" would be simplest. So I guess I can do what I need with:

    $ git rebase -i $(b4 prep --show-info base-commit)

It has the empty tracking commit in my setup, but I can live with that.

Thanks!
-- 
Jeff Layton <jlayton@kernel.org>

      reply	other threads:[~2024-12-11 18:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <p8ViV3yfc4oH3IgmIkXuiuhx92Va2KrVMYttHaXXGDsnnqtVmaqllPhcfSp-nYuqIL5udMcc8W-7_Vm8JlSPyQ==@protonmail.internalid>
2024-12-09 22:13 ` small b4 feature request Jeff Layton
2024-12-09 22:33   ` Vishal Verma
2024-12-10 22:16   ` Konstantin Ryabitsev
2024-12-11 18:06     ` Jeff Layton [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=855e61050b56ff8da80bd78768d9ab577b21e595.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=tools@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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 NNTP newsgroup(s).