{"thread":{"id":"23581","subject":"[PATCH] Documentation improvements for the description of short format.","startedAt":"2010-04-23T17:40:15Z","lastAt":"2010-04-23T17:40:15Z","messageCount":1,"participants":["Eric Raymond"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"140228","messageId":"20100423174517.8342D479E92@snark.thyrsus.com","threadId":"23581","inReplyTo":null,"subject":"[PATCH] Documentation improvements for the description of short format.","fromName":"Eric Raymond","fromEmail":"esr@snark.thyrsus.com","sentAt":"2010-04-23T17:40:15Z","receivedAt":"2010-04-23T17:40:15Z","isPatch":true,"sender":{"key":"esr@snark.thyrsus.com","avatar":null},"body":"Incorporates the detailed explanation from Jeff King in\n<20100410040959.GA11977@coredump.intra.peff.net> and fixes\nthe bug noted by Junio C Hamano in\n<7vmxxc1i8g.fsf@alter.siamese.dyndns.org>.\n\nSigned-off-by: Eric S. Raymond <esr@thyrsus.com>\n---\n Documentation/git-status.txt |   43 +++++++++++++++++++++++++++++++++--------\n 1 files changed, 34 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/git-status.txt b/Documentation/git-status.txt\nindex 1cab91b..2d4bbfc 100644\n--- a/Documentation/git-status.txt\n+++ b/Documentation/git-status.txt\n@@ -72,21 +72,37 @@ In short-format, the status of each path is shown as\n \n where `PATH1` is the path in the `HEAD`, and ` -> PATH2` part is\n shown only when `PATH1` corresponds to a different path in the\n-index/worktree (i.e. renamed).\n-\n-For unmerged entries, `X` shows the status of stage #2 (i.e. ours) and `Y`\n-shows the status of stage #3 (i.e. theirs).\n-\n-For entries that do not have conflicts, `X` shows the status of the index,\n-and `Y` shows the status of the work tree.  For untracked paths, `XY` are\n-`??`.\n+index/worktree (i.e. the file is renamed). The 'XY' is a two-letter\n+status code.\n+\n+The fields (including the `->`) are separated from each other by a\n+single space. If a filename contains whitespace or other nonprintable\n+characters, that field will be quoted in the manner of a C string\n+literal: surrounded by ASCII double quote (34) characters, and with\n+interior special characters backslash-escaped.\n+\n+For paths with merge conflicts, `X` and 'Y' show the modification\n+states of each side of the merge. For paths that do not have merge\n+conflicts, `X` shows the status of the index, and `Y` shows the status\n+of the work tree.  For untracked paths, `XY` are `??`.  Other status\n+codes can be interpreted as follows:\n+\n+* ' ' = unmodified\n+* 'M' = modified\n+* 'A' = added\n+* 'D' = deleted\n+* 'R' = renamed\n+* 'C' = copied\n+* 'U' = updated but unmerged\n+\n+Ignored files are not listed.\n \n     X          Y     Meaning\n     -------------------------------------------------\n               [MD]   not updated\n     M        [ MD]   updated in index\n     A        [ MD]   added to index\n-    D        [ MD]   deleted from index\n+    D         [ M]   deleted from index\n     R        [ MD]   renamed in index\n     C        [ MD]   copied in index\n     [MARC]           index and work tree matches\n@@ -104,6 +120,15 @@ and `Y` shows the status of the work tree.  For untracked paths, `XY` are\n     ?           ?    untracked\n     -------------------------------------------------\n \n+There is an alternate -z format recommended for machine parsing.  In\n+that format, the status field is the same, but some other things\n+change.  First, the '->' is omitted from rename entries and the field\n+order is reversed (e.g 'from -> to' becomes 'to from'). Second, a NUL\n+(ASCII 0) follows each filename, replacing space as a field separator\n+and the terminating newline (but a space still separates the status\n+field from the first filename).  Third, filenames containing special\n+characters are not specially formatted; no quoting or\n+backslash-escaping is performed.\n \n CONFIGURATION\n -------------\n-- \n1.7.1.rc2.12.gf7bd8\n\n\n\n\n-- \n\t\t<a href=\"http://www.catb.org/~esr/\">Eric S. Raymond</a>\n\nHe that would make his own liberty secure must guard even his enemy from\noppression: for if he violates this duty, he establishes a precedent that\nwill reach unto himself.\t-- Thomas Paine\n"}]}