From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: git@vger.kernel.org
Subject: Getting clean diff data from git-mailinfo
Date: Fri, 21 Feb 2020 12:14:01 -0500 [thread overview]
Message-ID: <20200221171312.xyzsrvebuwiw6pgj@chatter.i7.local> (raw)
Hello:
Git-mailinfo is a handy utility to quickly parse the contents of a
message containing a patch. However, I'm curious why there isn't a way
to get just the diff data, without all the surrounding junk. E.g.:
curl https://lore.kernel.org/driverdev-devel/20200221123817.16643-1-ajay.kathat@microchip.com/raw \
| git mailinfo msg patch > info
The contents of "msg" are already munged to reduce it to exactly what
would be in the commit message (properly processing the extra From:
header), but the contents of "patch" contain all the junk from around
the diff, like the diffstat, git version info, and the list trailer.
Is there a git-native command to further clean up the "patch" file to
get just diff contents (i.e. as returned by "git diff" after this patch
is applied)?
-K
next reply other threads:[~2020-02-21 17:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-21 17:14 Konstantin Ryabitsev [this message]
2020-02-22 16:47 ` Getting clean diff data from git-mailinfo Junio C Hamano
2020-02-22 16:56 ` Junio C Hamano
2020-02-22 18:00 ` Andreas Schwab
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=20200221171312.xyzsrvebuwiw6pgj@chatter.i7.local \
--to=konstantin@linuxfoundation.org \
--cc=git@vger.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).