All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: tools@linux.kernel.org, users@linux.kernel.org
Subject: Re: b4: introducing b4 shazam (like b4 am -o- | git am)
Date: Wed, 22 Sep 2021 14:38:03 -0300	[thread overview]
Message-ID: <20210922173803.GV3544071@ziepe.ca> (raw)
In-Reply-To: <20210921202526.mk2meetobbtl3tvi@meerkat.local>

On Tue, Sep 21, 2021 at 04:25:26PM -0400, Konstantin Ryabitsev wrote:
> 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

Does it prep the merge message too? ie pull in the text from the cover
letter, make the ==== markers/etc? (ie look what davem does:
d1bf73387b5adbc12c6a59c1fbaa69e05ee265ed)

> 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".

It might be interesting to detect which to do based on what the
submitter has done.. No useful base-commit = no merge?

I'm generally of the feeling that git is a VCS and it is completely
fine for a tool to do whatever to the tree because I can quickly undo
it. So I think b4 is possibly overly cautious here :)

> 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.

I would be nice to have some process guidance when maintainers should
be using merges and when am'd patches..

Jason

  reply	other threads:[~2021-09-22 17:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 20:25 b4: introducing b4 shazam (like b4 am -o- | git am) Konstantin Ryabitsev
2021-09-22 17:38 ` Jason Gunthorpe [this message]
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=20210922173803.GV3544071@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=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.