Skip to content

Commit a77a922

Browse files
author
Junio C Hamano
committed
Document git-patch-id a bit better.
Pavel Roskin wondered what the SHA1 output at the beginning of git-diff-tree was about. The only consumer of that information so far is this git-patch-id command, which was inadequately documented. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 6d0de31 commit a77a922

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Documentation/git-patch-id.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ ID" are almost guaranteed to be the same thing.
1818

1919
IOW, you can use this thing to look for likely duplicate commits.
2020

21+
When dealing with git-diff-tree output, it takes advantage of
22+
the fact that the patch is prefixed with the object name of the
23+
commit, and outputs two 40-byte hexadecimal string. The first
24+
string is the patch ID, and the second string is the commit ID.
25+
This can be used to make a mapping from patch ID to commit ID.
26+
2127
OPTIONS
2228
-------
2329
<patch>::

0 commit comments

Comments
 (0)