{"thread":{"id":"43641","subject":"[PATCH 2/2] Align section headers of 'git status' to new 'git add'.","startedAt":"2006-12-16T02:53:13Z","lastAt":"2006-12-16T02:53:13Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"296207","messageId":"20061216025313.GB19955@spearce.org","threadId":"43641","inReplyTo":"0191094fd2ac0afb27b31b9a90d98dfa4ec03b17.1166237566.git.spearce@spearce.org","subject":"[PATCH 2/2] Align section headers of 'git status' to new 'git add'.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-12-16T02:53:13Z","receivedAt":"2006-12-16T02:53:13Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Now that 'git add' is considered a first-class UI for 'update-index'\nand that the 'git add' documentation states \"Even modified files\nmust be added to the set of changes about to be committed\" we should\nmake the output of 'git status' align with that documentation and\ncommon usage.\n\nSo now we see a status output such as:\n\n  # Added but not yet committed:\n  #   (will commit)\n  #\n  #       new file: x\n  #\n  # Changed but not added:\n  #   (use \"git add file1 file2\" to include for commit)\n  #\n  #       modified:   x\n  #\n  # Untracked files:\n  #   (use \"git add\" on files to include for commit)\n  #\n  #       y\n\nwhich just reads better in the context of using 'git add' to\nmanipulate a commit (and not a checkin, whatever the heck that is).\n\nWe also now support 'color.status.added' as an alias for the existing\n'color.status.updated', as this alias more closely aligns with the\ncurrent output and documentation.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n Documentation/config.txt     |    4 ++--\n Documentation/git-reset.txt  |    2 +-\n Documentation/tutorial-2.txt |   10 +++++-----\n wt-status.c                  |    9 +++++----\n 4 files changed, 13 insertions(+), 12 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex a3587f8..9154804 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -166,8 +166,8 @@ color.status::\n color.status.<slot>::\n \tUse customized color for status colorization. `<slot>` is\n \tone of `header` (the header text of the status message),\n-\t`updated` (files which are updated but not committed),\n-\t`changed` (files which are changed but not updated in the index),\n+\t`added` or `updated` (files which are added but not committed),\n+\t`changed` (files which are changed but not added in the index),\n \tor `untracked` (files which are not tracked by git). The values of\n \tthese variables may be specified as in color.diff.<slot>.\n \ndiff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt\nindex 73a0ffc..4a4ceb6 100644\n--- a/Documentation/git-reset.txt\n+++ b/Documentation/git-reset.txt\n@@ -31,7 +31,7 @@ OPTIONS\n --soft::\n \tDoes not touch the index file nor the working tree at all, but\n \trequires them to be in a good order. This leaves all your changed\n-\tfiles \"Updated but not checked in\", as gitlink:git-status[1] would\n+\tfiles \"Added but not yet committed\", as gitlink:git-status[1] would\n \tput it.\n \n --hard::\ndiff --git a/Documentation/tutorial-2.txt b/Documentation/tutorial-2.txt\nindex 6389de5..eb2ba6b 100644\n--- a/Documentation/tutorial-2.txt\n+++ b/Documentation/tutorial-2.txt\n@@ -342,23 +342,23 @@ situation:\n ------------------------------------------------\n $ git status\n #\n-# Updated but not checked in:\n+# Added but not yet committed:\n #   (will commit)\n #\n #       new file: closing.txt\n #\n #\n-# Changed but not updated:\n-#   (use git-update-index to mark for commit)\n+# Changed but not added:\n+#   (use \"git add file1 file2\" to include for commit)\n #\n #       modified: file.txt\n #\n ------------------------------------------------\n \n Since the current state of closing.txt is cached in the index file,\n-it is listed as \"updated but not checked in\".  Since file.txt has\n+it is listed as \"added but not yet committed\".  Since file.txt has\n changes in the working directory that aren't reflected in the index,\n-it is marked \"changed but not updated\".  At this point, running \"git\n+it is marked \"changed but not added\".  At this point, running \"git\n commit\" would create a commit that added closing.txt (with its new\n contents), but that didn't modify file.txt.\n \ndiff --git a/wt-status.c b/wt-status.c\nindex 2173d4f..c388ce1 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -21,7 +21,8 @@ static int parse_status_slot(const char *var, int offset)\n {\n \tif (!strcasecmp(var+offset, \"header\"))\n \t\treturn WT_STATUS_HEADER;\n-\tif (!strcasecmp(var+offset, \"updated\"))\n+\tif (!strcasecmp(var+offset, \"updated\")\n+\t\t|| !strcasecmp(var+offset, \"added\"))\n \t\treturn WT_STATUS_UPDATED;\n \tif (!strcasecmp(var+offset, \"changed\"))\n \t\treturn WT_STATUS_CHANGED;\n@@ -146,7 +147,7 @@ static void wt_status_print_updated_cb(struct diff_queue_struct *q,\n \t\tif (q->queue[i]->status == 'U')\n \t\t\tcontinue;\n \t\tif (!shown_header) {\n-\t\t\twt_status_print_header(\"Updated but not checked in\",\n+\t\t\twt_status_print_header(\"Added but not yet committed\",\n \t\t\t\t\t\"will commit\");\n \t\t\ts->commitable = 1;\n \t\t\tshown_header = 1;\n@@ -163,7 +164,7 @@ static void wt_status_print_changed_cb(struct diff_queue_struct *q,\n {\n \tint i;\n \tif (q->nr)\n-\t\twt_status_print_header(\"Changed but not updated\", use_add_msg);\n+\t\twt_status_print_header(\"Changed but not added\", use_add_msg);\n \tfor (i = 0; i < q->nr; i++)\n \t\twt_status_print_filepair(WT_STATUS_CHANGED, q->queue[i]);\n \tif (q->nr)\n@@ -178,7 +179,7 @@ void wt_status_print_initial(struct wt_status *s)\n \tread_cache();\n \tif (active_nr) {\n \t\ts->commitable = 1;\n-\t\twt_status_print_header(\"Updated but not checked in\",\n+\t\twt_status_print_header(\"Added but not yet committed\",\n \t\t\t\t\"will commit\");\n \t}\n \tfor (i = 0; i < active_nr; i++) {\n-- \n"}]}