]> git.ipfire.org Git - thirdparty/git.git/commitdiff
diff-format.txt: dst can be 0* SHA-1 when path is deleted, too
authorPhilippe Blain <levraiphilippeblain@gmail.com>
Mon, 13 Jun 2022 12:29:41 +0000 (12:29 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Jun 2022 18:23:13 +0000 (11:23 -0700)
"dst" can legitimately be "0\{40\}" for a creation patch, e.g. when
the stat information is stale, but it falls into "look at work tree"
case.  The original description in b6d8f309 ([PATCH] diff-raw format
update take #2., 2005-05-23) forgot that deletion also makes the
"dst" 0* SHA-1.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/diff-format.txt

index 7a9c3b6ff4c6a2231da829edb3414a9c80533cd3..b8319eeb41da3f310caa13c9b5c841cbf1472107 100644 (file)
@@ -43,7 +43,7 @@ That is, from the left to the right:
 . a space.
 . sha1 for "src"; 0\{40\} if creation or unmerged.
 . a space.
-. sha1 for "dst"; 0\{40\} if creation, unmerged or "look at work tree".
+. sha1 for "dst"; 0\{40\} if deletion, unmerged or "look at work tree".
 . a space.
 . status, followed by optional "score" number.
 . a tab or a NUL when `-z` option is used.