All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: Jason Gunthorpe <jgg@ziepe.ca>
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:21:54 -0400	[thread overview]
Message-ID: <20210922182154.zqtuvmcsjd4ivfgp@meerkat.local> (raw)
In-Reply-To: <20210922173803.GV3544071@ziepe.ca>

On Wed, Sep 22, 2021 at 02:38:03PM -0300, Jason Gunthorpe wrote:
> > - 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)

We could, theoretically, do that, but you'd have to remember to pass the -F
--edit flags to "git merge". My concern is mostly that cover letters are very
much free-form and there isn't a sane approach we can take to automatically
generate good merge commit messages from them, short of quoting them fully,
which will be overkill 9 times out of 10.

One thing I will probably do is edit .git/FETCH_HEAD to change the unhelpful
/tmp/tmpfoobar to say something like:

    [sha]\t\tpatch series from https://lore.kernel.org/r/msgid

This way the default "git merge" message will contain a clickable link for the
person doing the merge where they can see the cover letter and maybe
copy-paste from it.

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

This is where I have to defer to feedback. I expect it would depend on the
size of the series -- for smaller ones people will probably want to rebase and
not 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 :)

Well, doing it via FETCH_HEAD was also an easy way to use base-commit info
(whether real or deduced) without asking for things like "what would you like
the branch to be named" etc.

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

I'll be happy to consider any feedback here.

-K

  reply	other threads:[~2021-09-22 18:21 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
2021-09-22 18:21   ` Konstantin Ryabitsev [this message]
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=20210922182154.zqtuvmcsjd4ivfgp@meerkat.local \
    --to=konstantin@linuxfoundation.org \
    --cc=jgg@ziepe.ca \
    --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.