All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: tools@linux.kernel.org, users@linux.kernel.org
Subject: b4: introducing b4 shazam (like b4 am -o- | git am)
Date: Tue, 21 Sep 2021 16:25:26 -0400	[thread overview]
Message-ID: <20210921202526.mk2meetobbtl3tvi@meerkat.local> (raw)

Hi, all:

The current master branch landed a new feature that implements a new
subcommand "shazam". It is the functional equivalent of piping "b4 am" to "git
am", with some extra safety padding.

See "b4 shazam --help" to see the available options. You will notice that many
of them are exactly the same as for "b4 am".

The default operation still tries to be the safest possible:

- we'll create a temporary sparse worktree that will only contain the files
  being modified
- we'll use the base-commit sha, if we find it, or we'll try to guess the base
  commit from git index info
- we'll run "git am" against that temporary worktree
- if successful, we'll fetch from the worktree into your current repo and
  delete the temporary sparse checkout
- you can then "git checkout -b foo FETCH_HEAD" or "git merge FETCH_HEAD"
  or "git rebase" as necessary

Alternatively, if you run "git shazam -A", we'll just run "git am" on the
current HEAD, which is the exact equivalent of "b4 am -o- | git am".

This feature is fairly "raw" and lightly tested, so please expect things to
potentially blow up all over the place. :)

If the default operation with getting things ready in FETCH_HEAD is not
useful, please let me know how you would prefer to see things work instead.

Best regards,
-K

             reply	other threads:[~2021-09-21 20:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 20:25 Konstantin Ryabitsev [this message]
2021-09-22 17:38 ` b4: introducing b4 shazam (like b4 am -o- | git am) Jason Gunthorpe
2021-09-22 18:21   ` Konstantin Ryabitsev
2021-09-28 17:46     ` Jason Gunthorpe
2021-09-29 21:18       ` Konstantin Ryabitsev
2021-09-29 23:30         ` Jason Gunthorpe
2021-09-30 14:45           ` Konstantin Ryabitsev
2021-10-01 16:20         ` Mark Brown
2021-09-23  8:51 ` Geert Uytterhoeven
2021-09-24 21:08   ` Konstantin Ryabitsev
2021-09-28 18:22     ` Geert Uytterhoeven
2021-09-29 13:39       ` Rob Herring
2021-09-29 17:54         ` Geert Uytterhoeven
2021-09-29 18:07         ` Jason Gunthorpe
2021-09-29 14:27       ` Konstantin Ryabitsev
2021-10-19 14:49 ` Rob Herring
2021-10-19 16:30   ` Konstantin Ryabitsev

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=20210921202526.mk2meetobbtl3tvi@meerkat.local \
    --to=konstantin@linuxfoundation.org \
    --cc=tools@linux.kernel.org \
    --cc=users@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.