* [PATCH v2] Add reference for status letters in documentation.
@ 2008-11-02 13:37 Yann Dirson
0 siblings, 0 replies; only message in thread
From: Yann Dirson @ 2008-11-02 13:37 UTC (permalink / raw)
To: git
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>
---
Since diffcore.h is for devs anyway, it is IMHO a good idea to let it
also point to the in-code doc.
Documentation/diff-format.txt | 16 ++++++++++++++++
diffcore.h | 2 +-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
index 400cbb3..aafd3a3 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 713cca7..5b63458 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -62,7 +62,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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-02 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-02 13:37 [PATCH v2] Add reference for status letters in documentation Yann Dirson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).