{"thread":{"id":"16129","subject":"[PATCH v2] Add reference for status letters in documentation.","startedAt":"2008-11-02T13:37:28Z","lastAt":"2008-11-02T13:37:28Z","messageCount":1,"participants":["Yann Dirson"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"94657","messageId":"20081102133611.6115.51449.stgit@gandelf.nowhere.earth","threadId":"16129","inReplyTo":null,"subject":"[PATCH v2] Add reference for status letters in documentation.","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2008-11-02T13:37:28Z","receivedAt":"2008-11-02T13:37:28Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"Also fix error in diff_filepair::status documentation, and point to\nthe in-code reference as well as the doc.\n\nSigned-off-by: Yann Dirson <ydirson@altern.org>\n---\n\nSince diffcore.h is for devs anyway, it is IMHO a good idea to let it\nalso point to the in-code doc.\n\n Documentation/diff-format.txt |   16 ++++++++++++++++\n diffcore.h                    |    2 +-\n 2 files changed, 17 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt\nindex 400cbb3..aafd3a3 100644\n--- a/Documentation/diff-format.txt\n+++ b/Documentation/diff-format.txt\n@@ -46,6 +46,22 @@ That is, from the left to the right:\n . path for \"dst\"; only exists for C or R.\n . an LF or a NUL when '-z' option is used, to terminate the record.\n \n+Possible status letters are:\n+\n+- A: addition of a file\n+- C: copy of a file into a new one\n+- D: deletion of a file\n+- M: modification of the contents or mode of a file\n+- R: renaming of a file\n+- T: change in the type of the file\n+- U: file is unmerged (you must complete the merge before it can\n+be committed)\n+- X: \"unknown\" change type (most probably a bug, please report it)\n+\n+Status letters C and M are always followed by a score (denoting the\n+percentage of similarity between the source and target of the move or\n+copy), and are the only ones to be so.\n+\n <sha1> is shown as all 0's if a file is new on the filesystem\n and it is out of sync with the index.\n \ndiff --git a/diffcore.h b/diffcore.h\nindex 713cca7..5b63458 100644\n--- a/diffcore.h\n+++ b/diffcore.h\n@@ -62,7 +62,7 @@ struct diff_filepair {\n \tstruct diff_filespec *one;\n \tstruct diff_filespec *two;\n \tunsigned short int score;\n-\tchar status; /* M C R N D U (see Documentation/diff-format.txt) */\n+\tchar status; /* M C R A D U etc. (see Documentation/diff-format.txt or DIFF_STATUS_* in diff.h) */\n \tunsigned broken_pair : 1;\n \tunsigned renamed_pair : 1;\n \tunsigned is_unmerged : 1;\n"}]}