Add reference for status letters in documentation.
Also fix error in diff_filepair::status documentation, and point to the in-code reference as well as the doc. Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Yann Dirson committed
Nov 2, 2008 at 14:37 UTC
a5a323f33cd25829e0dde3939b196cf743d7d9d8
2 files changed
+17
-1
Documentation/diff-format.txt
+16
@@ -46,6 +46,22 @@ That is, from the left to the right:
46
. path for "dst"; only exists for C or R.
47
. an LF or a NUL when '-z' option is used, to terminate the record.
48
49
+Possible status letters are:
50
+
51
+- A: addition of a file
52
+- C: copy of a file into a new one
53
+- D: deletion of a file
54
+- M: modification of the contents or mode of a file
55
+- R: renaming of a file
56
+- T: change in the type of the file
57
+- U: file is unmerged (you must complete the merge before it can
58
+be committed)
59
+- X: "unknown" change type (most probably a bug, please report it)
60
+
61
+Status letters C and M are always followed by a score (denoting the
62
+percentage of similarity between the source and target of the move or
63
+copy), and are the only ones to be so.
64
+
65
<sha1> is shown as all 0's if a file is new on the filesystem
66
and it is out of sync with the index.
67
diffcore.h
+1
-1
@@ -58,7 +58,7 @@ struct diff_filepair {
58
struct diff_filespec *one;
59
struct diff_filespec *two;
60
unsigned short int score;
61
- char status; /* M C R N D U (see Documentation/diff-format.txt) */
61
+ char status; /* M C R A D U etc. (see Documentation/diff-format.txt or DIFF_STATUS_* in diff.h) */
62
unsigned broken_pair : 1;
63
unsigned renamed_pair : 1;
64
unsigned is_unmerged : 1;