{"thread":{"id":"24668","subject":"git log --stat FILE","startedAt":"2010-08-08T11:29:29Z","lastAt":"2010-08-09T19:57:51Z","messageCount":11,"participants":["Marcus Comstedt","Jakub Narebski","Lars Hjemli","Michael J Gruber","Matthieu Moy","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"147431","messageId":"yf9wrs1fili.fsf@chiyo.mc.pp.se","threadId":"24668","inReplyTo":null,"subject":"git log --stat FILE","fromName":"Marcus Comstedt","fromEmail":"marcus@mc.pp.se","sentAt":"2010-08-08T11:29:29Z","receivedAt":"2010-08-08T11:29:29Z","isPatch":false,"sender":{"key":"marcus@mc.pp.se","avatar":"https://avatars.githubusercontent.com/u/411296?v=4"},"body":"\nHi guys.\n\nI'm probably just missing something here, but I've run across a rather\nannoying behavior of log.\n\nWhen I do \"git log --stat FILE\", then only commits which touch FILE\nare displayed, as expected.  However, contrary to expectation (well,\nmy expectation at least), the stat shows that only one file (FILE) is\nmodified by the commits, even if they actually modified multiple files.\nThat's not what I wanted; I used FILE to select commits, not to\ncontrol how they are presented.  In fact, the information which is\nhidden is exactly that which I wanted to see; the whole reason for the\n--stat was that I wanted to know what _other_ files were modified\ntogether with FILE.\n\nWhat's worse, I could not find how to circumvent this behavior, short\nof using\n\n git log --format=format:'%H' FILE | xargs git show --stat\n\nwhich isn't especially convenient...\n\nSo, if this behavior is intentional, how can it be turned off?\n\n\n  // Marcus\n"},{"id":"147432","messageId":"m339up48vz.fsf@localhost.localdomain","threadId":"24668","inReplyTo":"yf9wrs1fili.fsf@chiyo.mc.pp.se","subject":"Re: git log --stat FILE","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-08-08T11:54:48Z","receivedAt":"2010-08-08T11:54:48Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Marcus Comstedt <marcus@mc.pp.se> writes:\n\n> Hi guys.\n> \n> I'm probably just missing something here, but I've run across a rather\n> annoying behavior of log.\n> \n> When I do \"git log --stat FILE\", then only commits which touch FILE\n> are displayed, as expected.  However, contrary to expectation (well,\n> my expectation at least), the stat shows that only one file (FILE) is\n> modified by the commits, even if they actually modified multiple files.\n> That's not what I wanted; I used FILE to select commits, not to\n> control how they are presented.  In fact, the information which is\n> hidden is exactly that which I wanted to see; the whole reason for the\n> --stat was that I wanted to know what _other_ files were modified\n> together with FILE.\n> \n> What's worse, I could not find how to circumvent this behavior, [...]\n\nSee --full-diff option to git-log.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"147433","messageId":"AANLkTikKwp9gS9nt=JnsdyXMgx+PxrhHhNFftYFqX+M_@mail.gmail.com","threadId":"24668","inReplyTo":"yf9wrs1fili.fsf@chiyo.mc.pp.se","subject":"Re: git log --stat FILE","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2010-08-08T11:54:59Z","receivedAt":"2010-08-08T11:54:59Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On Sun, Aug 8, 2010 at 13:29, Marcus Comstedt <marcus@mc.pp.se> wrote:\n> When I do \"git log --stat FILE\", then only commits which touch FILE\n> are displayed, as expected.  However, contrary to expectation (well,\n> my expectation at least), the stat shows that only one file (FILE) is\n> modified by the commits, even if they actually modified multiple files.\n> That's not what I wanted;\n\nTry adding --full-diff to your `git log` incantation.\n\n--\nlarsh\n"},{"id":"147434","messageId":"yf9d3tts438.fsf@chiyo.mc.pp.se","threadId":"24668","inReplyTo":"AANLkTikKwp9gS9nt=JnsdyXMgx+PxrhHhNFftYFqX+M_@mail.gmail.com","subject":"Re: git log --stat FILE","fromName":"Marcus Comstedt","fromEmail":"marcus@mc.pp.se","sentAt":"2010-08-08T12:04:27Z","receivedAt":"2010-08-08T12:04:27Z","isPatch":false,"sender":{"key":"marcus@mc.pp.se","avatar":"https://avatars.githubusercontent.com/u/411296?v=4"},"body":"\nThanks guys.\n\nI suspected there was some option I had missed.  :-)\n\nBoth the option name and the documentaion mention only diffs, not\nstats, which makes it a bit hard to find...\n\n\n  // Marcus\n"},{"id":"147435","messageId":"201008081426.21705.jnareb@gmail.com","threadId":"24668","inReplyTo":"yf9d3tts438.fsf@chiyo.mc.pp.se","subject":"Re: git log --stat FILE","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-08-08T12:26:21Z","receivedAt":"2010-08-08T12:26:21Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Sun, 8 Aug 2010, Marcus Comstedt wrote:\n> \n> Thanks guys.\n> \n> I suspected there was some option I had missed.  :-)\n> \n> Both the option name and the documentaion mention only diffs, not\n> stats, which makes it a bit hard to find...\n\nDiffstat is just a diff format (a way of presenting diff); '--stat'\nis described in \"Common _diff_ options\" of git-log(1) manpage.\n\nBut whats obvoud to me might not be obvious to everyone.\n-- \nJakub Narebski\nPoland\n"},{"id":"147436","messageId":"yf9bp9ds2mz.fsf@chiyo.mc.pp.se","threadId":"24668","inReplyTo":"201008081426.21705.jnareb@gmail.com","subject":"Re: git log --stat FILE","fromName":"Marcus Comstedt","fromEmail":"marcus@mc.pp.se","sentAt":"2010-08-08T12:35:48Z","receivedAt":"2010-08-08T12:35:48Z","isPatch":false,"sender":{"key":"marcus@mc.pp.se","avatar":"https://avatars.githubusercontent.com/u/411296?v=4"},"body":"\nJakub Narebski <jnareb@gmail.com> writes:\n\n> Diffstat is just a diff format (a way of presenting diff); '--stat'\n> is described in \"Common _diff_ options\" of git-log(1) manpage.\n>\n> But whats obvoud to me might not be obvious to everyone.\n\nTo me (and probably many others), a \"diff\" is the output of the\ncommand \"/usr/bin/diff\".  I notice that git seems to refer to this as\na \"patch\" instead.  Nevertheless, the documentation of --full-diff\nexplicitly talks about \"log -p\", rather than \"diffs\" in general.  So\nit's not clear from the documentation that it affects other types of\ndiffs than those produced by -p (\"patches\").\n\n\n  // Marcus\n"},{"id":"147438","messageId":"201008081508.53732.jnareb@gmail.com","threadId":"24668","inReplyTo":"yf9bp9ds2mz.fsf@chiyo.mc.pp.se","subject":"Re: git log --stat FILE","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-08-08T13:08:53Z","receivedAt":"2010-08-08T13:08:53Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Marcus Comstedt wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n> > Diffstat is just a diff format (a way of presenting diff); '--stat'\n> > is described in \"Common _diff_ options\" of git-log(1) manpage.\n> >\n> > But whats obvious to me might not be obvious to everyone.\n> \n> To me (and probably many others), a \"diff\" is the output of the\n> command \"/usr/bin/diff\".  I notice that git seems to refer to this as\n> a \"patch\" instead.  Nevertheless, the documentation of --full-diff\n> explicitly talks about \"log -p\", rather than \"diffs\" in general.  So\n> it's not clear from the documentation that it affects other types of\n> diffs than those produced by -p (\"patches\").\n\nTo me (and probably many others), a \"diff\" is something that describe\ndifferences between two versions (compares two version).  Note that\n'GNU diff' (and other \"/usr/bin/diff\") supports three output formats:\ned based, context and unified formats.  git-diff supports patch format\n(unified, with some extensions), raw aka diff-tree format, and various\nversions of diffstat format.\n\nThe '--full-diff' is a git-log option, not diff option, as it affects\nhow git-log uses path limiter.  \"git log -p <path>...\" is an example\nof copmmand that shows diffs with commits, as \"git log <path>...\" alone\ndoesn't show diffs (in any format).  But perhaps the description of\n'--full-diff' option could be improved.\n\nThe '--stat' is git-diff option, as you can see by running e.g.\n\"git diff --stat HEAD^!\"\n\n-- \nJakub Narebski\nPoland\n"},{"id":"147441","messageId":"yf9ocddut4h.fsf@chiyo.mc.pp.se","threadId":"24668","inReplyTo":"201008081508.53732.jnareb@gmail.com","subject":"Re: git log --stat FILE","fromName":"Marcus Comstedt","fromEmail":"marcus@mc.pp.se","sentAt":"2010-08-08T13:33:02Z","receivedAt":"2010-08-08T13:33:02Z","isPatch":false,"sender":{"key":"marcus@mc.pp.se","avatar":"https://avatars.githubusercontent.com/u/411296?v=4"},"body":"\nJakub Narebski <jnareb@gmail.com> writes:\n\n> To me (and probably many others), a \"diff\" is something that describe\n> differences between two versions (compares two version).\n\nJakub, there is no need for you to explain or justify why this is\nobvious to you.  I have no problem accepting that at face value.\nI'm simply trying to explain why this was not obvious to me, in the\nhope of aiding any effort in improving the documentation.  After all,\nwriting documentation for something you feel is obvious is very\ndifficult.  But if you feel that the documentation is fine as it is,\nthat is also your privilege.\n\n\n> Note that 'GNU diff' (and other \"/usr/bin/diff\") supports three\n> output formats:  ed based, context and unified formats.\n\nIndeed, and all those qualify as \"diffs\" in my mindset.  I would\nhowever not consider the output of \"diff -q\" as a true \"diff\", and\nnaturally not the output of \"diff --version\".\n\n\n  // Marcus\n"},{"id":"147449","messageId":"4acdfd58d0ff4aa6b55dab4d4233f55c1b753b5e.1281281303.git.git@drmicha.warpmail.net","threadId":"24668","inReplyTo":"yf9ocddut4h.fsf@chiyo.mc.pp.se","subject":"[PATCH] Documentation/git-log: Clarify --full-diff","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-08-08T15:31:34Z","receivedAt":"2010-08-08T15:31:34Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"The current description gives the impression that \"--full-diff\" affects\n\"log -p\" only.\n\nMake it clearer that it affects all diff-based output types.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/git-log.txt |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex e970664..c213bdb 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -55,6 +55,9 @@ OPTIONS\n \tpaths.  With this, the full diff is shown for commits that touch\n \tthe specified paths; this means that \"<path>...\" limits only\n \tcommits, and doesn't limit diff for those commits.\n++\n+Note that this affects all diff-based output types, e.g. those\n+produced by --stat etc.\n \n --log-size::\n \tBefore the log message print out its size in bytes. Intended\n-- \n1.7.2.1.52.g7f7860\n"},{"id":"147487","messageId":"vpqy6cgdybg.fsf@bauges.imag.fr","threadId":"24668","inReplyTo":"4acdfd58d0ff4aa6b55dab4d4233f55c1b753b5e.1281281303.git.git@drmicha.warpmail.net","subject":"Re: [PATCH] Documentation/git-log: Clarify --full-diff","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-08-09T07:45:07Z","receivedAt":"2010-08-09T07:45:07Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> --- a/Documentation/git-log.txt\n> +++ b/Documentation/git-log.txt\n> @@ -55,6 +55,9 @@ OPTIONS\n>  \tpaths.  With this, the full diff is shown for commits that touch\n>  \tthe specified paths; this means that \"<path>...\" limits only\n>  \tcommits, and doesn't limit diff for those commits.\n> ++\n> +Note that this affects all diff-based output types, e.g. those\n> +produced by --stat etc.\n\n+1.\n\nThis also help people grepping for \"--stat\" to find \"--full-diff\".\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"147543","messageId":"7vmxsv4kzk.fsf@alter.siamese.dyndns.org","threadId":"24668","inReplyTo":"vpqy6cgdybg.fsf@bauges.imag.fr","subject":"Re: [PATCH] Documentation/git-log: Clarify --full-diff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-08-09T19:57:51Z","receivedAt":"2010-08-09T19:57:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n>\n>> --- a/Documentation/git-log.txt\n>> +++ b/Documentation/git-log.txt\n>> @@ -55,6 +55,9 @@ OPTIONS\n>>  \tpaths.  With this, the full diff is shown for commits that touch\n>>  \tthe specified paths; this means that \"<path>...\" limits only\n>>  \tcommits, and doesn't limit diff for those commits.\n>> ++\n>> +Note that this affects all diff-based output types, e.g. those\n>> +produced by --stat etc.\n>\n> +1.\n>\n> This also help people grepping for \"--stat\" to find \"--full-diff\".\n\nYeah, I think this is a good change especially to help new people that\ncome to git community every day.\n\nThanks.\n"}]}