Skip to content

Commit 1ea1f93

Browse files
committed
Merge branch 'dl/diff-usage-comment-update'
An in-code comment in "git diff" has been updated. * dl/diff-usage-comment-update: builtin/diff: fix botched update of usage comment builtin/diff: update usage comment
2 parents 1033b98 + c592fd4 commit 1ea1f93

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

builtin/diff.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,25 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
376376

377377
/*
378378
* We could get N tree-ish in the rev.pending_objects list.
379-
* Also there could be M blobs there, and P pathspecs.
379+
* Also there could be M blobs there, and P pathspecs. --cached may
380+
* also be present.
380381
*
381382
* N=0, M=0:
382-
* cache vs files (diff-files)
383+
* cache vs files (diff-files)
384+
*
385+
* N=0, M=0, --cached:
386+
* HEAD vs cache (diff-index --cached)
387+
*
383388
* N=0, M=2:
384389
* compare two random blobs. P must be zero.
390+
*
385391
* N=0, M=1, P=1:
386-
* compare a blob with a working tree file.
392+
* compare a blob with a working tree file.
387393
*
388394
* N=1, M=0:
395+
* tree vs files (diff-index)
396+
*
397+
* N=1, M=0, --cached:
389398
* tree vs cache (diff-index --cached)
390399
*
391400
* N=2, M=0:

0 commit comments

Comments
 (0)