Subject: Re: Bug? diff.submodule=log adds text to commit -v message

From: Jens Lehmann <[email-masked]>
Date: Mon, 11 Nov 2013 21:41:25 +0100

Hi Ari,

Am 10.11.2013 22:49, schrieb Ari Pollak:
> I'm using git 1.8.4.2, and I've set the "diff.submodule = log" option 
> globally. If I change the revision that a submodule is set to, then run
> "git commit -av", The submodule shortlog is appended to the log message without 
> any #s before it, so the log messages get included in my own log message. 
> This seems like a bug and not a feature, as diffs aren't normally included in 
> the commit message with -v.

Thanks for your report, I can reproduce that here. But first I think
this is unrelated to the "diff.submodule = log" setting, as without it
you'll just see the submodule commit hash diff instead of the shortlog
(which is perfectly consistent with what I'd expect from this setting).
And secondly what you describe looks like documented behavior, the man
page of "git commit" states:

 -v, --verbose
     Show unified diff between the HEAD commit and what would be
     committed at the bottom of the commit message template. Note that
     this diff output doesn't have its lines prefixed with #.

And after adding a modified file the log message also shows the diff of
that file (and without leading "# "s too), so I doubt that diffs aren't
normally included in the commit message with -v. What am I missing?

Thanks
Jens