git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Greg KH <greg@kroah.com>
Date
Feb 14, 2006, 06:52 UTC
Message-ID
<20060214065224.GA20541@kroah.com>
In-Reply-To
<20060214064256.GA19667@kroah.com>
On Mon, Feb 13, 2006 at 10:42:56PM -0800, Greg KH wrote:
Show 28 quoted lines
> On Mon, Feb 13, 2006 at 10:34:20PM -0800, Greg KH wrote:
> > > 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";

Hm, git-send-email doesn't see this, so it doesn't get sent out if you use that tool.

I can fix that to just put the version number in the message too, like it adds the "X-Mailer" field, if people think this is really worth it...

thanks,
greg k-h
Previous: Greg KHNext: Junio C Hamano
Message 8 of 11 in “diffstat wierdness with 'git format-patch' output”
  1. Greg KHFeb 14, 2006
  2. Greg KHFeb 14, 2006
  3. Junio C HamanoFeb 14, 2006
  4. Greg KHFeb 14, 2006
  5. Junio C HamanoFeb 14, 2006
  6. Greg KHFeb 14, 2006
  7. Greg KHFeb 14, 2006
  8. Greg KHFeb 14, 2006
  9. Junio C HamanoFeb 14, 2006
  10. Greg KHFeb 18, 2006
  11. Fredrik KuivinenFeb 14, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.