Git Mailing List Archive on lore.kernel.org
 help / color / Atom feed
* Getting clean diff data from git-mailinfo
@ 2020-02-21 17:14 Konstantin Ryabitsev
  2020-02-22 16:47 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Ryabitsev @ 2020-02-21 17:14 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-21 17:14 Getting clean diff data from git-mailinfo Konstantin Ryabitsev
2020-02-22 16:47 ` Junio C Hamano
2020-02-22 16:56   ` Junio C Hamano
2020-02-22 18:00     ` Andreas Schwab

Git Mailing List Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/git/0 git/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 git git/ https://lore.kernel.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.git


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git