{"thread":{"id":"6197","subject":"[PATCH/RFC] Assorted small changes to runstatus","startedAt":"2007-01-02T19:26:19Z","lastAt":"2007-01-08T14:27:31Z","messageCount":15,"participants":["Juergen Ruehle","Junio C Hamano","Andy Whitcroft"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"30683","messageId":"1167765983316-git-send-email-j.ruehle@bmiag.de","threadId":"6197","inReplyTo":null,"subject":"[PATCH/RFC] Assorted small changes to runstatus","fromName":"Juergen Ruehle","fromEmail":"j.ruehle@bmiag.de","sentAt":"2007-01-02T19:26:19Z","receivedAt":"2007-01-02T19:26:19Z","isPatch":true,"sender":{"key":"j.ruehle@bmiag.de","avatar":null},"body":"As a regular user of git-status I'd like to propose some small changes and a\nfix:\n\n - wording changes to the section headers\n\n - more context awareness in the nothing-to-commit line\n\n - fix runstatus breakage when amending a root commit\n\nAdditional Notes:\n\n - if git-reset <commit> <path> provided the ability to remove path from the\n   index (if not present in commit) runstatus could advertise reset as the\n   universal unstaging tool (in the non-initial-commit case)\n\n   (this is similar to the recent request on the list to allow\n    git-commit -o <path> to commit removal of path)\n\n - IMO git-rm without -f should not remove anything if HEAD doesn't exist\n   (i.e. from the initial commit); this might be a bug\n"},{"id":"30684","messageId":"11677659863797-git-send-email-j.ruehle@bmiag.de","threadId":"6197","inReplyTo":"1167765983316-git-send-email-j.ruehle@bmiag.de","subject":"[PATCH 1/4] Clarify syntax and role of git-add in status output","fromName":"Juergen Ruehle","fromEmail":"j.ruehle@bmiag.de","sentAt":"2007-01-02T19:26:20Z","receivedAt":"2007-01-02T19:26:20Z","isPatch":true,"sender":{"key":"j.ruehle@bmiag.de","avatar":null},"body":"From: =?iso-8859-1?q?J=FCrgen_R=FChle?= <j-r@online.de>\n\nThis uses the actual (simplified) synopsis line from the git-add man page and\nadvertises its incremental nature.\n\nSigned-off-by: Jürgen Rühle <j-r@online.de>\n---\n wt-status.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex db42738..34be91b 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -15,7 +15,7 @@ static char wt_status_colors[][COLOR_MAXLEN] = {\n \t\"\\033[31m\", /* WT_STATUS_CHANGED: red */\n \t\"\\033[31m\", /* WT_STATUS_UNTRACKED: red */\n };\n-static const char* use_add_msg = \"use \\\"git add file1 file2\\\" to include for commit\";\n+static const char* use_add_msg = \"use \\\"git add <file>...\\\" to incrementally add content to commit\";\n \n static int parse_status_slot(const char *var, int offset)\n {\n-- \n1.5.0.rc0.g31e2\n"},{"id":"30686","messageId":"11677659921833-git-send-email-j.ruehle@bmiag.de","threadId":"6197","inReplyTo":"1167765983316-git-send-email-j.ruehle@bmiag.de","subject":"[PATCH 2/4] Improve cached content header of status output","fromName":"Juergen Ruehle","fromEmail":"j.ruehle@bmiag.de","sentAt":"2007-01-02T19:26:21Z","receivedAt":"2007-01-02T19:26:21Z","isPatch":true,"sender":{"key":"j.ruehle@bmiag.de","avatar":null},"body":"From: =?iso-8859-1?q?J=FCrgen_R=FChle?= <j-r@online.de>\n\nThis tries to be more to the point while also including a pointer on how to\nunstage changes from the index.\n\nSince this header is printed in two different code paths and the name of the\nreference commit is needed for the unstage part, provide a new printing\nfunction.\n\nSigned-off-by: Jürgen Rühle <j-r@online.de>\n---\n wt-status.c |   18 ++++++++++++++----\n 1 files changed, 14 insertions(+), 4 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 34be91b..98ca135 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -53,6 +53,18 @@ void wt_status_prepare(struct wt_status *s)\n \ts->untracked = 0;\n }\n \n+static void wt_status_print_cached_header(const char *reference)\n+{\n+\tconst char *c = color(WT_STATUS_HEADER);\n+\tcolor_printf_ln(c, \"# Cached changes to be committed:\");\n+\tif (reference) {\n+\t\tcolor_printf_ln(c, \"#   (use \\\"git reset %s <file>...\\\" and \\\"git rm --cached <file>...\\\" to unstage)\", reference);\n+\t} else {\n+\t\tcolor_printf_ln(c, \"#   (use \\\"git rm --cached <file>...\\\" to unstage)\");\n+\t}\n+\tcolor_printf_ln(c, \"#\");\n+}\n+\n static void wt_status_print_header(const char *main, const char *sub)\n {\n \tconst char *c = color(WT_STATUS_HEADER);\n@@ -147,8 +159,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(\"Added but not yet committed\",\n-\t\t\t\t\t\"will commit\");\n+\t\t\twt_status_print_cached_header(s->reference);\n \t\t\ts->commitable = 1;\n \t\t\tshown_header = 1;\n \t\t}\n@@ -179,8 +190,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(\"Added but not yet committed\",\n-\t\t\t\t\"will commit\");\n+\t\twt_status_print_cached_header(NULL);\n \t}\n \tfor (i = 0; i < active_nr; i++) {\n \t\tcolor_printf(color(WT_STATUS_HEADER), \"#\\t\");\n-- \n1.5.0.rc0.g31e2\n"},{"id":"30685","messageId":"11677659941419-git-send-email-j.ruehle@bmiag.de","threadId":"6197","inReplyTo":"1167765983316-git-send-email-j.ruehle@bmiag.de","subject":"[PATCH 3/4] Improve \"nothing to commit\" part of status output","fromName":"Juergen Ruehle","fromEmail":"j.ruehle@bmiag.de","sentAt":"2007-01-02T19:26:22Z","receivedAt":"2007-01-02T19:26:22Z","isPatch":true,"sender":{"key":"j.ruehle@bmiag.de","avatar":null},"body":"From: =?iso-8859-1?q?J=FCrgen_R=FChle?= <j-r@online.de>\n\nPreviously git-status in a clean working directory would advice the user to use\ngit add. This isn't very helpful when there is nothing to add in the working\ndirectory, therefore note a clean working directory while displaying the other\nsections and print the appropriate message for each case.\n\nSigned-off-by: Jürgen Rühle <j-r@online.de>\n---\n wt-status.c |   20 +++++++++++++++-----\n wt-status.h |    1 +\n 2 files changed, 16 insertions(+), 5 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 98ca135..302f7ee 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -51,6 +51,8 @@ void wt_status_prepare(struct wt_status *s)\n \ts->verbose = 0;\n \ts->commitable = 0;\n \ts->untracked = 0;\n+\n+\ts->workdir_clean = 1;\n }\n \n static void wt_status_print_cached_header(const char *reference)\n@@ -173,9 +175,12 @@ static void wt_status_print_changed_cb(struct diff_queue_struct *q,\n                         struct diff_options *options,\n                         void *data)\n {\n+\tstruct wt_status *s = data;\n \tint i;\n-\tif (q->nr)\n+\tif (q->nr) {\n+\t\ts->workdir_clean = 0;\n \t\twt_status_print_header(\"Changed but not added\", use_add_msg);\n+\t}\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@@ -225,7 +230,7 @@ static void wt_status_print_changed(struct wt_status *s)\n \trun_diff_files(&rev, 0);\n }\n \n-static void wt_status_print_untracked(const struct wt_status *s)\n+static void wt_status_print_untracked(struct wt_status *s)\n {\n \tstruct dir_struct dir;\n \tconst char *x;\n@@ -260,6 +265,7 @@ static void wt_status_print_untracked(const struct wt_status *s)\n \t\t\t\tcontinue;\n \t\t}\n \t\tif (!shown_header) {\n+\t\t\ts->workdir_clean = 0;\n \t\t\twt_status_print_header(\"Untracked files\", use_add_msg);\n \t\t\tshown_header = 1;\n \t\t}\n@@ -302,9 +308,13 @@ void wt_status_print(struct wt_status *s)\n \tif (s->verbose && !s->is_initial)\n \t\twt_status_print_verbose(s);\n \tif (!s->commitable)\n-\t\tprintf(\"%s (%s)\\n\",\n-\t\t\ts->amend ? \"# No changes\" : \"nothing to commit\",\n-\t\t\tuse_add_msg);\n+\t\tif (s->amend)\n+\t\t\tprintf(\"# No changes\\n\");\n+\t\telse if (s->workdir_clean)\n+\t\t\tprintf(s->is_initial ? \"nothing to commit\\n\"\n+\t\t\t\t: \"nothing to commit (working directory matches HEAD)\\n\");\n+\t\telse\n+\t\t\tprintf(\"no changes added to commit (use \\\"git add\\\" and/or \\\"git commit [-a|-i|-o]\\\")\\n\");\n }\n \n int git_status_config(const char *k, const char *v)\ndiff --git a/wt-status.h b/wt-status.h\nindex 0a5a5b7..892a86c 100644\n--- a/wt-status.h\n+++ b/wt-status.h\n@@ -16,6 +16,7 @@ struct wt_status {\n \tint verbose;\n \tint amend;\n \tint untracked;\n+\tint workdir_clean;\n };\n \n int git_status_config(const char *var, const char *value);\n-- \n1.5.0.rc0.g31e2\n"},{"id":"30687","messageId":"11677659961794-git-send-email-j.ruehle@bmiag.de","threadId":"6197","inReplyTo":"1167765983316-git-send-email-j.ruehle@bmiag.de","subject":"[PATCH 4/4] Support --amend on initial commit in status output","fromName":"Juergen Ruehle","fromEmail":"j.ruehle@bmiag.de","sentAt":"2007-01-02T19:26:23Z","receivedAt":"2007-01-02T19:26:23Z","isPatch":true,"sender":{"key":"j.ruehle@bmiag.de","avatar":null},"body":"From: =?iso-8859-1?q?J=FCrgen_R=FChle?= <j-r@online.de>\n\nWe check the existence of the parent commit to determine whether the status is\nrequested for an initial commit. Since the parent commit depends on the\npresence of the --amend switch do initial commit detection after command line\narguments have been handled.\n\nSigned-off-by: Jürgen Rühle <j-r@online.de>\n---\n wt-status.c |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 302f7ee..166d0e3 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -41,8 +41,6 @@ void wt_status_prepare(struct wt_status *s)\n \tunsigned char sha1[20];\n \tconst char *head;\n \n-\ts->is_initial = get_sha1(\"HEAD\", sha1) ? 1 : 0;\n-\n \thead = resolve_ref(\"HEAD\", sha1, 0, NULL);\n \ts->branch = head ? xstrdup(head) : NULL;\n \n@@ -287,6 +285,9 @@ static void wt_status_print_verbose(struct wt_status *s)\n \n void wt_status_print(struct wt_status *s)\n {\n+\tunsigned char sha1[20];\n+\ts->is_initial = get_sha1(s->reference, sha1) ? 1 : 0;\n+\n \tif (s->branch)\n \t\tcolor_printf_ln(color(WT_STATUS_HEADER),\n \t\t\t\"# On branch %s\", s->branch);\n-- \n1.5.0.rc0.g31e2\n"},{"id":"30722","messageId":"7v8xgkstzt.fsf@assigned-by-dhcp.cox.net","threadId":"6197","inReplyTo":"1167765983316-git-send-email-j.ruehle@bmiag.de","subject":"Re: [PATCH/RFC] Assorted small changes to runstatus","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-03T02:51:18Z","receivedAt":"2007-01-03T02:51:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.  3 and 4 are obviously good, 1 is probably good although\nI do not have much preference either way myself.  The part that\nadds helpful messages of 2 is nice but I am not sure about the\nwording \"Cached changes\".\n\nMaybe people who were in the update-index and git-add discussion\nhave better input than I can give.\n"},{"id":"30725","messageId":"17819.16485.756000.15186@lapjr.intranet.kiel.bmiag.de","threadId":"6197","inReplyTo":"7v8xgkstzt.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH/RFC] Assorted small changes to runstatus","fromName":"Juergen Ruehle","fromEmail":"j.ruehle@bmiag.de","sentAt":"2007-01-03T05:34:29Z","receivedAt":"2007-01-03T05:34:29Z","isPatch":true,"sender":{"key":"j.ruehle@bmiag.de","avatar":null},"body":"Junio C Hamano writes:\n > Thanks.  3 and 4 are obviously good, 1 is probably good although\n > I do not have much preference either way myself.  The part that\n > adds helpful messages of 2 is nice but I am not sure about the\n > wording \"Cached changes\".\n > \n > Maybe people who were in the update-index and git-add discussion\n > have better input than I can give.\n\nYes, that was the intention. Thanks for looking at the proposal.\n"},{"id":"30873","messageId":"459E2E57.6020503@shadowen.org","threadId":"6197","inReplyTo":"11677659921833-git-send-email-j.ruehle@bmiag.de","subject":"Re: [PATCH 2/4] Improve cached content header of status output","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2007-01-05T10:54:15Z","receivedAt":"2007-01-05T10:54:15Z","isPatch":true,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"Juergen Ruehle wrote:\n> From: =?iso-8859-1?q?J=FCrgen_R=FChle?= <j-r@online.de>\n> \n> This tries to be more to the point while also including a pointer on how to\n> unstage changes from the index.\n> \n> Since this header is printed in two different code paths and the name of the\n> reference commit is needed for the unstage part, provide a new printing\n> function.\n> \n> Signed-off-by: Jürgen Rühle <j-r@online.de>\n> ---\n>  wt-status.c |   18 ++++++++++++++----\n>  1 files changed, 14 insertions(+), 4 deletions(-)\n> \n> diff --git a/wt-status.c b/wt-status.c\n> index 34be91b..98ca135 100644\n> --- a/wt-status.c\n> +++ b/wt-status.c\n> @@ -53,6 +53,18 @@ void wt_status_prepare(struct wt_status *s)\n>  \ts->untracked = 0;\n>  }\n>  \n> +static void wt_status_print_cached_header(const char *reference)\n> +{\n> +\tconst char *c = color(WT_STATUS_HEADER);\n> +\tcolor_printf_ln(c, \"# Cached changes to be committed:\");\n> +\tif (reference) {\n> +\t\tcolor_printf_ln(c, \"#   (use \\\"git reset %s <file>...\\\" and \\\"git rm --cached <file>...\\\" to unstage)\", reference);\n> +\t} else {\n> +\t\tcolor_printf_ln(c, \"#   (use \\\"git rm --cached <file>...\\\" to unstage)\");\n> +\t}\n> +\tcolor_printf_ln(c, \"#\");\n\nWe seem to be using 'Cached' and 'staged' here.  I thought we had\nupdated all the docs to call files in the index \"Staged for commit\".  It\nfeels like the header should be more like:\n\n     # Currently staged changes, will be commited:\n\nThe rm --cached is somewhat unfortunate either way.\n\n-apw\n"},{"id":"30878","messageId":"7vr6u9g1l4.fsf@assigned-by-dhcp.cox.net","threadId":"6197","inReplyTo":"459E2E57.6020503@shadowen.org","subject":"Re: [PATCH 2/4] Improve cached content header of status output","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-05T11:22:31Z","receivedAt":"2007-01-05T11:22:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andy Whitcroft <apw@shadowen.org> writes:\n\n>> +static void wt_status_print_cached_header(const char *reference)\n>> +{\n>> +\tconst char *c = color(WT_STATUS_HEADER);\n>> +\tcolor_printf_ln(c, \"# Cached changes to be committed:\");\n>> ...\n>\n> We seem to be using 'Cached' and 'staged' here.  I thought we had\n> updated all the docs to call files in the index \"Staged for commit\".\n\n\t# Changes staged to be committed:\n\nSomebody did not like the verb \"stage\"; perhaps we can say:\n\n\t# You have added changes to these files to be committed:\n\t...\n        # There are yet to be added changes to these files:\n\t...\n\n?\n"},{"id":"30883","messageId":"459E4F2D.4000806@shadowen.org","threadId":"6197","inReplyTo":"7vr6u9g1l4.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 2/4] Improve cached content header of status output","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2007-01-05T13:14:21Z","receivedAt":"2007-01-05T13:14:21Z","isPatch":true,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> Andy Whitcroft <apw@shadowen.org> writes:\n> \n>>> +static void wt_status_print_cached_header(const char *reference)\n>>> +{\n>>> +\tconst char *c = color(WT_STATUS_HEADER);\n>>> +\tcolor_printf_ln(c, \"# Cached changes to be committed:\");\n>>> ...\n>> We seem to be using 'Cached' and 'staged' here.  I thought we had\n>> updated all the docs to call files in the index \"Staged for commit\".\n> \n> \t# Changes staged to be committed:\n> \n> Somebody did not like the verb \"stage\"; perhaps we can say:\n> \n> \t# You have added changes to these files to be committed:\n> \t...\n\n# These files have changes and are marked for commit:\n\n>         # There are yet to be added changes to these files:\n\n# These files have changes but are not marked for commit:\n\n> \t...\n\n-apw\n"},{"id":"30890","messageId":"17822.34697.691000.253492@lapjr.intranet.kiel.bmiag.de","threadId":"6197","inReplyTo":"459E4F2D.4000806@shadowen.org","subject":"Re: [PATCH 2/4] Improve cached content header of status output","fromName":"Juergen Ruehle","fromEmail":"j.ruehle@bmiag.de","sentAt":"2007-01-05T17:14:49Z","receivedAt":"2007-01-05T17:14:49Z","isPatch":true,"sender":{"key":"j.ruehle@bmiag.de","avatar":null},"body":"Andy Whitcroft writes:\n > Junio C Hamano wrote:\n > > Andy Whitcroft <apw@shadowen.org> writes:\n > > \n > >>> +static void wt_status_print_cached_header(const char *reference)\n > >>> +{\n > >>> +\tconst char *c = color(WT_STATUS_HEADER);\n > >>> +\tcolor_printf_ln(c, \"# Cached changes to be committed:\");\n > >>> ...\n > >> We seem to be using 'Cached' and 'staged' here.  I thought we had\n > >> updated all the docs to call files in the index \"Staged for commit\".\n > > \n > > \t# Changes staged to be committed:\n > > \n > > Somebody did not like the verb \"stage\"; perhaps we can say:\n > > \n > > \t# You have added changes to these files to be committed:\n > > \t...\n > \n > # These files have changes and are marked for commit:\n > \n > >         # There are yet to be added changes to these files:\n > \n > # These files have changes but are not marked for commit:\n\nDoes this better reflect that git tracks content and not files?\n\n# Changes to these files will be committed:\n\n# Changes to these files are not marked for commit:\n\nBTW: how about also adding a hint how to review the changes in\nquestion (i.e. diff --cached and diff; as an alternative to diff\n--cached we could just advertise the --verbose switch to status and\ncommit).\n"},{"id":"30893","messageId":"7vk601fh7k.fsf@assigned-by-dhcp.cox.net","threadId":"6197","inReplyTo":"17822.34697.691000.253492@lapjr.intranet.kiel.bmiag.de","subject":"Re: [PATCH 2/4] Improve cached content header of status output","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-05T18:42:39Z","receivedAt":"2007-01-05T18:42:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Juergen Ruehle <j.ruehle@bmiag.de> writes:\n\n> Andy Whitcroft writes:\n>  > Junio C Hamano wrote:\n>  > > \n>  > > Somebody did not like the verb \"stage\"; perhaps we can say:\n>  > > \n>  > > \t# You have added changes to these files to be committed:\n>  > > \t...\n>  > \n>  > # These files have changes and are marked for commit:\n>  > \n>  > >         # There are yet to be added changes to these files:\n>  > \n>  > # These files have changes but are not marked for commit:\n>\n> Does this better reflect that git tracks content and not files?\n>\n> # Changes to these files will be committed:\n>\n> # Changes to these files are not marked for commit:\n\nOne of the goals is to find a pair of messages that make sense\nwhen the same file appears on both lists.\n\n> BTW: how about also adding a hint how to review the changes in\n> question (i.e. diff --cached and diff; as an alternative to diff\n> --cached we could just advertise the --verbose switch to status and\n> commit).\n\nSounds sane.\n"},{"id":"31069","messageId":"17825.18306.974000.40992@lapjr.intranet.kiel.bmiag.de","threadId":"6197","inReplyTo":"1167765983316-git-send-email-j.ruehle@bmiag.de","subject":"[PATCH] Remove unnecessary git-rm --cached reference from status output","fromName":"Juergen Ruehle","fromEmail":"j.ruehle@bmiag.de","sentAt":"2007-01-07T19:18:26Z","receivedAt":"2007-01-07T19:18:26Z","isPatch":true,"sender":{"key":"j.ruehle@bmiag.de","avatar":null},"body":"From: =?utf-8?q?J=C3=BCrgen_R=C3=BChle?= <j-r@online.de>\n\nSince git-reset has learned restoring the absence of paths git-rm --cached is\nno longer necessary. Therefore remove it from the cached content header hint.\n\nAlso remove the unfortunate wording 'Cached' from the header itself.\n\nSigned-off-by: Jürgen Rühle <j-r@online.de>\n---\n !!This is based on next (or the jr/status series)!!\n\n This does not yet implement the other proposed changes to the header\n lines, pending further feedback.\n\n wt-status.c |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 8aac526..c48127d 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -56,9 +56,9 @@ void wt_status_prepare(struct wt_status *s)\n static void wt_status_print_cached_header(const char *reference)\n {\n \tconst char *c = color(WT_STATUS_HEADER);\n-\tcolor_printf_ln(c, \"# Cached changes to be committed:\");\n+\tcolor_printf_ln(c, \"# Changes to be committed:\");\n \tif (reference) {\n-\t\tcolor_printf_ln(c, \"#   (use \\\"git reset %s <file>...\\\" and \\\"git rm --cached <file>...\\\" to unstage)\", reference);\n+\t\tcolor_printf_ln(c, \"#   (use \\\"git reset %s <file>...\\\" to unstage)\", reference);\n \t} else {\n \t\tcolor_printf_ln(c, \"#   (use \\\"git rm --cached <file>...\\\" to unstage)\");\n \t}\n-- \n1.5.0.rc0.g525e\n"},{"id":"31137","messageId":"45A24709.9090904@shadowen.org","threadId":"6197","inReplyTo":"7vk601fh7k.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 2/4] Improve cached content header of status output","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2007-01-08T13:28:41Z","receivedAt":"2007-01-08T13:28:41Z","isPatch":true,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> Juergen Ruehle <j.ruehle@bmiag.de> writes:\n> \n>> Andy Whitcroft writes:\n>>  > Junio C Hamano wrote:\n>>  > > \n>>  > > Somebody did not like the verb \"stage\"; perhaps we can say:\n>>  > > \n>>  > > \t# You have added changes to these files to be committed:\n>>  > > \t...\n>>  > \n>>  > # These files have changes and are marked for commit:\n>>  > \n>>  > >         # There are yet to be added changes to these files:\n>>  > \n>>  > # These files have changes but are not marked for commit:\n>>\n>> Does this better reflect that git tracks content and not files?\n>>\n>> # Changes to these files will be committed:\n>>\n>> # Changes to these files are not marked for commit:\n> \n> One of the goals is to find a pair of messages that make sense\n> when the same file appears on both lists.\n\nDoh, double changes ... yes.\n\nI am not sure it is possible to sanely textualise that subtlety in a\nsingle line.  I wonder if its worth splitting this lot into three.\nBasically those files on list one, those on list two and those on both.\n\nAnyhow, lets see if we can textualise:\n\n# Changes to these files will be committed:\n\n# The latest changes to these files will not be committed:\n\nThe first here still implies its the latest changes.  I can not\ntrivially word round that.  Perhaps we could mention staging?\n\n# Staged changes for these files will be commited:\n\n# These files have unstaged changes which will not be committed:\n\n>> BTW: how about also adding a hint how to review the changes in\n>> question (i.e. diff --cached and diff; as an alternative to diff\n>> --cached we could just advertise the --verbose switch to status and\n>> commit).\n> \n> Sounds sane.\n\n\n-apw\n"},{"id":"31147","messageId":"17826.21715.925000.540592@lapjr.intranet.kiel.bmiag.de","threadId":"6197","inReplyTo":"45A24709.9090904@shadowen.org","subject":"Re: [PATCH 2/4] Improve cached content header of status output","fromName":"Juergen Ruehle","fromEmail":"j.ruehle@bmiag.de","sentAt":"2007-01-08T14:27:31Z","receivedAt":"2007-01-08T14:27:31Z","isPatch":true,"sender":{"key":"j.ruehle@bmiag.de","avatar":null},"body":"Andy Whitcroft writes:\n > Junio C Hamano wrote:\n > > Juergen Ruehle <j.ruehle@bmiag.de> writes:\n > >> Does this better reflect that git tracks content and not files?\n > >>\n > >> # Changes to these files will be committed:\n > >>\n > >> # Changes to these files are not marked for commit:\n > > \n > > One of the goals is to find a pair of messages that make sense\n > > when the same file appears on both lists.\n > \n > Doh, double changes ... yes.\n > \n > I am not sure it is possible to sanely textualise that subtlety in a\n > single line.  I wonder if its worth splitting this lot into three.\n > Basically those files on list one, those on list two and those on both.\n > \n > Anyhow, lets see if we can textualise:\n > \n > # Changes to these files will be committed:\n > \n > # The latest changes to these files will not be committed:\n > \n > The first here still implies its the latest changes.  I can not\n > trivially word round that.  Perhaps we could mention staging?\n > \n > # Staged changes for these files will be commited:\n > \n > # These files have unstaged changes which will not be committed:\n > \n > >> BTW: how about also adding a hint how to review the changes in\n > >> question (i.e. diff --cached and diff; as an alternative to diff\n > >> --cached we could just advertise the --verbose switch to status and\n > >> commit).\n > > \n > > Sounds sane.\n\nTogether with an appropriate second line it is looking good to me\n\n# Staged changes for these files will be commited:\n#   (use --verbose to review and \"git reset HEAD <file>...\" to unstage)\n\n# These files have unstaged changes which will not be committed:\n#   (Use \"git diff\" to review and \"git add <file>...\" to stage for commit)\n\nPerhaps we do not even need to mention files?\n\n# Staged changes to be commited:\n#   (use --verbose to review and \"git reset HEAD <file>...\" to unstage)\n\n# Unstaged changes to the working directory which will not be committed:\n#   (Use \"git diff\" to review and \"git add <file>...\" to stage for commit)\n"}]}