aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Dirson <ydirson@altern.org>2008-11-02 14:37:28 +0100
committerJunio C Hamano <gitster@pobox.com>2008-11-02 15:57:10 -0800
commita5a323f33cd25829e0dde3939b196cf743d7d9d8 (patch)
treefcab3161b7077c7897f35fb7d0c512fd6c8694c9
parent7756ba74c04caf03d47718d581439a48bae7ed73 (diff)
downloadgit-a5a323f33cd25829e0dde3939b196cf743d7d9d8.tar.gz
git-a5a323f33cd25829e0dde3939b196cf743d7d9d8.tar.xz
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>
-rw-r--r--Documentation/diff-format.txt16
-rw-r--r--diffcore.h2
2 files changed, 17 insertions, 1 deletions
diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
index 400cbb3b1..aafd3a394 100644
--- a/Documentation/diff-format.txt
+++ b/Documentation/diff-format.txt
@@ -46,6 +46,22 @@ That is, from the left to the right:
. path for "dst"; only exists for C or R.
. an LF or a NUL when '-z' option is used, to terminate the record.
+Possible status letters are:
+
+- A: addition of a file
+- C: copy of a file into a new one
+- D: deletion of a file
+- M: modification of the contents or mode of a file
+- R: renaming of a file
+- T: change in the type of the file
+- U: file is unmerged (you must complete the merge before it can
+be committed)
+- X: "unknown" change type (most probably a bug, please report it)
+
+Status letters C and M are always followed by a score (denoting the
+percentage of similarity between the source and target of the move or
+copy), and are the only ones to be so.
+
<sha1> is shown as all 0's if a file is new on the filesystem
and it is out of sync with the index.
diff --git a/diffcore.h b/diffcore.h
index 8ae35785f..1ebfdae8b 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -58,7 +58,7 @@ struct diff_filepair {
struct diff_filespec *one;
struct diff_filespec *two;
unsigned short int score;
- char status; /* M C R N D U (see Documentation/diff-format.txt) */
+ char status; /* M C R A D U etc. (see Documentation/diff-format.txt or DIFF_STATUS_* in diff.h) */
unsigned broken_pair : 1;
unsigned renamed_pair : 1;
unsigned is_unmerged : 1;