Merge branch 'dl/diff-usage-comment-update' into jch

An in-code comment in "git diff" has been updated.

* dl/diff-usage-comment-update:
  builtin/diff: update usage comment
This commit is contained in:
Junio C Hamano
2020-06-19 14:52:24 -07:00

View File

@ -376,18 +376,30 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
/*
* We could get N tree-ish in the rev.pending_objects list.
* Also there could be M blobs there, and P pathspecs.
* Also there could be M blobs there, and P pathspecs. --cached may
* also be present.
*
* N=0, M=0:
* cache vs files (diff-files)
*
* N=0, M=0, --cached:
* HEAD vs cache (diff-index --cached)
*
* N=0, M=2:
* compare two random blobs. P must be zero.
*
* N=0, M=1, P=1:
* compare a blob with a working tree file.
*
* N=1, M=0:
* tree vs files (diff-index)
*
* N=1, M=0:
* tree vs cache (diff-index --cached)
*
* N=1, M=0, --cached:
* tree vs files (diff-index)
*
* N=2, M=0:
* tree vs tree (diff-tree)
*