{"thread":{"id":"32389","subject":"Incorrect man page for git-diff","startedAt":"2012-12-18T17:40:08Z","lastAt":"2012-12-18T19:32:57Z","messageCount":4,"participants":["Manlio Perillo","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"205137","messageId":"50D0AA78.5090603@gmail.com","threadId":"32389","inReplyTo":null,"subject":"Incorrect man page for git-diff","fromName":"Manlio Perillo","fromEmail":"manlio.perillo@gmail.com","sentAt":"2012-12-18T17:40:08Z","receivedAt":"2012-12-18T17:40:08Z","isPatch":false,"sender":{"key":"manlio.perillo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6217088?v=4"},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nHi.\n\nDocumentation seems to suggest this is supported, but it is not true:\n\n  $ git diff HEAD:git.c HEAD~100:git.c -- git.c\n  usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]\n\nunless I'm missing something.\n\n\n\nManlio\n\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.10 (GNU/Linux)\nComment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/\n\niEYEARECAAYFAlDQqncACgkQscQJ24LbaUT9XwCfV40P7lGulSWw+dzVo17EhcDQ\nYFoAnRb46025qYsKWp9mg6ZTRyuuaG3x\n=0gO1\n-----END PGP SIGNATURE-----\n"},{"id":"205140","messageId":"7vwqwffcxp.fsf@alter.siamese.dyndns.org","threadId":"32389","inReplyTo":"50D0AA78.5090603@gmail.com","subject":"Re: Incorrect man page for git-diff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-12-18T18:11:14Z","receivedAt":"2012-12-18T18:11:14Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Manlio Perillo <manlio.perillo@gmail.com> writes:\n\n> Documentation seems to suggest this is supported, but it is not true:\n>\n>   $ git diff HEAD:git.c HEAD~100:git.c -- git.c\n>   usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]\n>\n> unless I'm missing something.\n\nNeither HEAD:git.c nor HEAD~100:git.c are commits.  You are\ncomparing two blob objects in their raw forms without textconv nor\nfilter.\n"},{"id":"205147","messageId":"50D0BF8D.5050004@gmail.com","threadId":"32389","inReplyTo":"7vwqwffcxp.fsf@alter.siamese.dyndns.org","subject":"Re: Incorrect man page for git-diff","fromName":"Manlio Perillo","fromEmail":"manlio.perillo@gmail.com","sentAt":"2012-12-18T19:10:05Z","receivedAt":"2012-12-18T19:10:05Z","isPatch":false,"sender":{"key":"manlio.perillo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6217088?v=4"},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nIl 18/12/2012 19:11, Junio C Hamano ha scritto:\n> Manlio Perillo <manlio.perillo@gmail.com> writes:\n> \n>> Documentation seems to suggest this is supported, but it is not true:\n>>\n>>   $ git diff HEAD:git.c HEAD~100:git.c -- git.c\n>>   usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]\n>>\n>> unless I'm missing something.\n> \n> Neither HEAD:git.c nor HEAD~100:git.c are commits.\n\nWell, the documentation calls these parameter \"commit\", later saying\n\"For a more complete list of ways to spell <commit>, see \"SPECIFYING\nREVISIONS\".\n\n>  You are\n> comparing two blob objects in their raw forms without textconv nor\n> filter.\n> \n\nNote that I was not missing the fact that git diff does not apply\ntexconv and filters.\n\nI'm not sure the man page is wrong and should be changed:\n\n  -- usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]\n  ++ usage: git diff [<options>] [<commit> [<commit>]]\n\n\nRegards  Manlio\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.10 (GNU/Linux)\nComment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/\n\niEYEARECAAYFAlDQv40ACgkQscQJ24LbaUT+vwCgj0rjaZbc+/x0+jvAGZydbVKB\n244An2pWLj7t4nG3lZzx+LGyH3mjTujS\n=TmVI\n-----END PGP SIGNATURE-----\n"},{"id":"205150","messageId":"7vehinf95i.fsf@alter.siamese.dyndns.org","threadId":"32389","inReplyTo":"50D0BF8D.5050004@gmail.com","subject":"Re: Incorrect man page for git-diff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-12-18T19:32:57Z","receivedAt":"2012-12-18T19:32:57Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Manlio Perillo <manlio.perillo@gmail.com> writes:\n\n> I'm not sure the man page is wrong and should be changed:\n>\n>   -- usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]\n>   ++ usage: git diff [<options>] [<commit> [<commit>]]\n\nComparison of two blob objects works entirely in different way (it\nis not even recursively comparing two tree-shaped things).\n\nI do not think this mode is common enough to deserve to be in the\nshort help text, but it should be in the documentation, perhaps like\nthis patch, I think.\n\n Documentation/git-diff.txt | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git c/Documentation/git-diff.txt w/Documentation/git-diff.txt\nindex f8d0819..f8c0601 100644\n--- c/Documentation/git-diff.txt\n+++ w/Documentation/git-diff.txt\n@@ -12,6 +12,7 @@ SYNOPSIS\n 'git diff' [options] [<commit>] [--] [<path>...]\n 'git diff' [options] --cached [<commit>] [--] [<path>...]\n 'git diff' [options] <commit> <commit> [--] [<path>...]\n+'git diff' [options] <blob> <blob>\n 'git diff' [options] [--no-index] [--] <path> <path>\n \n DESCRIPTION\n@@ -55,6 +56,11 @@ directories. This behavior can be forced by --no-index.\n \tThis is to view the changes between two arbitrary\n \t<commit>.\n \n+'git diff' [options] <blob> <blob>::\n+\n+\tThis form is to view the differences between the raw\n+\tcontents of two blob objects.\n+\n 'git diff' [--options] <commit>..<commit> [--] [<path>...]::\n \n \tThis is synonymous to the previous form.  If <commit> on\n@@ -72,8 +78,7 @@ directories. This behavior can be forced by --no-index.\n Just in case if you are doing something exotic, it should be\n noted that all of the <commit> in the above description, except\n in the last two forms that use \"..\" notations, can be any\n-<tree>.  The third form ('git diff <commit> <commit>') can also\n-be used to compare two <blob> objects.\n+<tree>.\n \n For a more complete list of ways to spell <commit>, see\n \"SPECIFYING REVISIONS\" section in linkgit:gitrevisions[7].\n"}]}