Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Re: diffstat wierdness with 'git format-patch' output

From: Greg KH <hidden>
Date: 2016-06-15 22:42:19
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

On Mon, Feb 13, 2006 at 10:34:20PM -0800, Greg KH wrote:
quoted
I personally find it useful to see the trend of version of tools
people use on the public mailing list, and that was the primary
reason it is there.
Why not just add a "X-Git-Version: 1.2.0" flag to the message instead?
And here's a patch that does just that.

-----------------

Subject: change git-format-patch to put the git version in the mail header

This is more like other tools that create mail messages, and fixes an
issue of the diffstat program thinking that an extra line was removed
from the patch.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/git-format-patch.sh b/git-format-patch.sh
index e54c9e4..5f6a921 100755
--- a/git-format-patch.sh
+++ b/git-format-patch.sh
@@ -216,6 +216,7 @@ while (<FH>) {
 
 	    print "From: $author_ident\n";
 	    print "Date: $author_date\n";
+	    print "X-Git-Version: @@GIT_VERSION@@\n";
 	}
 	next;
     }
@@ -250,8 +251,6 @@ close FH or die "close $commsg pipe";
 	git-diff-tree -p $diff_opts "$commit" | git-apply --stat --summary
 	echo
 	git-diff-tree -p $diff_opts "$commit"
-	echo "-- "
-	echo "@@GIT_VERSION@@"
 
 	echo
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help