From: "Michal Kubeček" <mkubecek@suse.cz>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jakub Kicinski <kuba@kernel.org>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
toke@toke.dk,
Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
users@linux.kernel.org, tools@linux.kernel.org,
Jens Axboe <axboe@kernel.dk>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [kernel.org users] b4: encouraging using the cover letter in merge commits?
Date: Mon, 21 Dec 2020 22:13:49 +0100 [thread overview]
Message-ID: <20201221211349.3iz76dmx76v4dmhc@lion.mk-sys.cz> (raw)
In-Reply-To: <20201221190552.GS5487@ziepe.ca>
On Mon, Dec 21, 2020 at 03:05:52PM -0400, Jason Gunthorpe wrote:
> My biggest problem with the cover letters is while the are in the
> repository, someplace, I've never actually found one while hunting
> around in the git history for clues, eg with 'git blame' or 'git log
> log -p'
>
> In fact more often than not I find the netdev cover letters through
> hunting in lore, not through git.
>
> Is there some git sequence to make it visible?
>
> The Link header is a nicer because no matter how I end up at a commit
> I can go back to an email discussion..
If you have a commit in merged branch, the corresponding merge commit
should be the last shown by
git rev-list --ancestry-path --merges --topo-order --pretty=full \
${id}..${branch}
Or first if you also add "--reverse". Unfortunately "-n 1" cannot be
used to show just that merge commit as it would be applied to the list
before "--reverse".
In a script, you could either postprocess the output with sed or count
the merge commits first:
count=$(git rev-list --ancestry-path --merges --topo-order \
"${id}..${branch}" | wc -l)
git rev-list --ancestry-path --merges --topo-order --skip $[count - 1] \
--pretty=full "${id}..${branch}"
Michal
next prev parent reply other threads:[~2020-12-21 21:13 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 21:32 b4: encouraging using the cover letter in merge commits? Toke Høiland-Jørgensen
2020-12-18 22:09 ` Konstantin Ryabitsev
2020-12-19 12:29 ` Toke Høiland-Jørgensen
2020-12-18 22:38 ` [kernel.org users] " James Bottomley
2020-12-19 12:34 ` Toke Høiland-Jørgensen
2020-12-19 17:03 ` James Bottomley
2020-12-19 17:21 ` Jakub Kicinski
2020-12-19 17:32 ` James Bottomley
2020-12-21 19:05 ` Jason Gunthorpe
2020-12-21 21:13 ` Michal Kubeček [this message]
2020-12-21 21:30 ` Arnaldo Carvalho de Melo
2020-12-22 6:30 ` Leon Romanovsky
2020-12-22 8:14 ` Geert Uytterhoeven
2020-12-22 12:36 ` Leon Romanovsky
2021-01-05 13:38 ` Jason Gunthorpe
2020-12-19 18:45 ` Jonathan Corbet
2020-12-19 18:49 ` James Bottomley
2020-12-19 18:57 ` Jonathan Corbet
2020-12-19 19:03 ` James Bottomley
2020-12-19 20:48 ` Arnaldo Carvalho de Melo
2020-12-19 21:01 ` James Bottomley
2020-12-19 21:43 ` Arnaldo Carvalho de Melo
2020-12-19 21:57 ` James Bottomley
2020-12-19 22:17 ` Arnaldo Carvalho de Melo
2020-12-19 23:34 ` James Bottomley
2020-12-21 17:34 ` [tools] " Mark Brown
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=20201221211349.3iz76dmx76v4dmhc@lion.mk-sys.cz \
--to=mkubecek@suse.cz \
--cc=James.Bottomley@HansenPartnership.com \
--cc=acme@kernel.org \
--cc=axboe@kernel.dk \
--cc=jgg@ziepe.ca \
--cc=konstantin@linuxfoundation.org \
--cc=kuba@kernel.org \
--cc=toke@toke.dk \
--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 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).