]> git.ipfire.org Git - thirdparty/git.git/commitdiff
builtin/diff: update usage comment
authorDenton Liu <liu.denton@gmail.com>
Thu, 18 Jun 2020 10:43:34 +0000 (06:43 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Jun 2020 22:01:15 +0000 (15:01 -0700)
A comment in cmd_diff() states that if one tree-ish and no blobs are
provided, (the "N=1, M=0" case), it will provide a diff between the tree
and the cache. This is incorrect because a diff happens between the
tree-ish and the working tree. Remove the `--cached` in the comment so
that the correct behavior is shown. Add a new section describing the
"N=1, M=0, --cached" behavior.

Next, describe the "N=0, M=0, --cached" case, similar to the above since
it is undocumented.

Finally, fix some spacing issues. Add spaces between each section for
consistency and readability. Also, change tabs within the comment into
spaces.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

No differences found