{"thread":{"id":"43397","subject":"Re: [RFC/PATCH] runstatus: restructure visual appearance","startedAt":"2006-12-02T19:37:05Z","lastAt":"2006-12-13T16:12:15Z","messageCount":5,"participants":["Jon Loeliger","Lars Hjemli","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"296414","messageId":"11650882251452-git-send-email-hjemli@gmail.com","threadId":"43397","inReplyTo":null,"subject":"[RFC/PATCH] runstatus: restructure visual appearance","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2006-12-02T19:37:05Z","receivedAt":"2006-12-02T19:37:05Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"Modify the output from runstatus so that all modified files are shown\nin the same list, prefixed with a state symbol (A/C/D/M/R/T/X/U) and\npossibly a state modifier (+/-).\n\nThe '+' indicates that the working copy has been changed since the file\nwas added to the index, while the '-' indicates that the file hasn't\nbeen added to the index at all.\n\nIf either '+' or '-' is displayed for any of the modified files, then a\nbig warning is printed, informing the user that she might want to run\n'git commit -a' or 'git add file'.\n\nExperienced users who find this warning annoying, can turn if off with\n'git repo-config status.showwarning 0'.\n\nSigned-off-by: Lars Hjemli <hjemli@gmail.com>\n\n---\n\nThis is a rather subjective 'improvement', but I think it makes the commit \nmessage easier to comprehend and I hope that goes for both new and \nexperienced users.\n\nBtw: the warning message somewhat implies that 'git add' can be used to add \nchanged content to the index, even for files already added. So I obviously \nliked the patch Nicolas Pitre sendt earlier today...\n\n\n Documentation/git-runstatus.txt |   28 +++\n wt-status.c                     |  384 +++++++++++++++++++++++----------------\n wt-status.h                     |    1 +\n 3 files changed, 260 insertions(+), 153 deletions(-)\n\ndiff --git a/Documentation/git-runstatus.txt b/Documentation/git-runstatus.txt\nindex 89d7b92..cc6ed92 100644\n--- a/Documentation/git-runstatus.txt\n+++ b/Documentation/git-runstatus.txt\n@@ -53,6 +53,34 @@ OUTPUT\n The output from this command is designed to be used as a commit\n template comments, and all the output lines are prefixed with '#'.\n \n+EXAMPLES\n+--------\n+\n++\n+--------\n+$ git runstatus\n+#\n+# On branch refs/heads/runstatus\n+#\n+# Modified files\n+#   M  Documentation/git-runstatus.txt\n+#   M+ wt-status.c\n+#\n+# WARNING:\n+#   If you want to commit all of your changes, you need to run\n+#   'git commit -a' (or 'git add file...' for selected files).\n+#\n+$ git add wt-status.c\n+$ git runstatus\n+#\n+# On branch refs/heads/runstatus\n+#\n+# Modified files\n+#   M  Documentation/git-runstatus.txt\n+#   M  wt-status.c\n+#\n+--------\n++\n \n Author\n ------\ndiff --git a/wt-status.c b/wt-status.c\nindex de1be5b..db0c945 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -9,11 +9,20 @@\n #include \"diffcore.h\"\n \n int wt_status_use_color = 0;\n+int wt_status_warn = 1;\n+\n+struct fileinfo{\n+\tint status;\n+\tchar *one, *two;\n+\tstruct fileinfo *next;\n+};\n+\n static char wt_status_colors[][COLOR_MAXLEN] = {\n \t\"\",         /* WT_STATUS_HEADER: normal */\n \t\"\\033[32m\", /* WT_STATUS_UPDATED: green */\n \t\"\\033[31m\", /* WT_STATUS_CHANGED: red */\n-\t\"\\033[31m\", /* WT_STATUS_UNTRACKED: red */\n+\t\"\",         /* WT_STATUS_UNTRACKED: normal */\n+\t\"\\033[31m\", /* WT_STATUS_WARNING: red */\n };\n \n static int parse_status_slot(const char *var, int offset)\n@@ -43,7 +52,6 @@ void wt_status_prepare(struct wt_status *s)\n \n \thead = resolve_ref(\"HEAD\", sha1, 0, NULL);\n \ts->branch = head ? xstrdup(head) : NULL;\n-\n \ts->reference = \"HEAD\";\n \ts->amend = 0;\n \ts->verbose = 0;\n@@ -51,17 +59,15 @@ void wt_status_prepare(struct wt_status *s)\n \ts->untracked = 0;\n }\n \n-static void wt_status_print_header(const char *main, const char *sub)\n+static void wt_status_print_trailer(void)\n {\n-\tconst char *c = color(WT_STATUS_HEADER);\n-\tcolor_printf_ln(c, \"# %s:\", main);\n-\tcolor_printf_ln(c, \"#   (%s)\", sub);\n-\tcolor_printf_ln(c, \"#\");\n+\tcolor_printf_ln(color(WT_STATUS_HEADER), \"#\");\n }\n \n-static void wt_status_print_trailer(void)\n+static void wt_status_print_header(const char *main)\n {\n-\tcolor_printf_ln(color(WT_STATUS_HEADER), \"#\");\n+\twt_status_print_trailer();\n+\tcolor_printf_ln(color(WT_STATUS_HEADER), \"# %s\", main);\n }\n \n static const char *quote_crlf(const char *in, char *buf, size_t sz)\n@@ -70,6 +76,9 @@ static const char *quote_crlf(const char *in, char *buf, size_t sz)\n \tchar *out;\n \tconst char *ret = in;\n \n+\tif (!in)\n+\t\treturn ret;\n+\n \tfor (scan = in, out = buf; *scan; scan++) {\n \t\tint ch = *scan;\n \t\tint quoted;\n@@ -93,133 +102,13 @@ static const char *quote_crlf(const char *in, char *buf, size_t sz)\n \treturn ret;\n }\n \n-static void wt_status_print_filepair(int t, struct diff_filepair *p)\n-{\n-\tconst char *c = color(t);\n-\tconst char *one, *two;\n-\tchar onebuf[PATH_MAX], twobuf[PATH_MAX];\n-\n-\tone = quote_crlf(p->one->path, onebuf, sizeof(onebuf));\n-\ttwo = quote_crlf(p->two->path, twobuf, sizeof(twobuf));\n-\n-\tcolor_printf(color(WT_STATUS_HEADER), \"#\\t\");\n-\tswitch (p->status) {\n-\tcase DIFF_STATUS_ADDED:\n-\t\tcolor_printf(c, \"new file:   %s\", one);\n-\t\tbreak;\n-\tcase DIFF_STATUS_COPIED:\n-\t\tcolor_printf(c, \"copied:     %s -> %s\", one, two);\n-\t\tbreak;\n-\tcase DIFF_STATUS_DELETED:\n-\t\tcolor_printf(c, \"deleted:    %s\", one);\n-\t\tbreak;\n-\tcase DIFF_STATUS_MODIFIED:\n-\t\tcolor_printf(c, \"modified:   %s\", one);\n-\t\tbreak;\n-\tcase DIFF_STATUS_RENAMED:\n-\t\tcolor_printf(c, \"renamed:    %s -> %s\", one, two);\n-\t\tbreak;\n-\tcase DIFF_STATUS_TYPE_CHANGED:\n-\t\tcolor_printf(c, \"typechange: %s\", one);\n-\t\tbreak;\n-\tcase DIFF_STATUS_UNKNOWN:\n-\t\tcolor_printf(c, \"unknown:    %s\", one);\n-\t\tbreak;\n-\tcase DIFF_STATUS_UNMERGED:\n-\t\tcolor_printf(c, \"unmerged:   %s\", one);\n-\t\tbreak;\n-\tdefault:\n-\t\tdie(\"bug: unhandled diff status %c\", p->status);\n-\t}\n-\tprintf(\"\\n\");\n-}\n-\n-static void wt_status_print_updated_cb(struct diff_queue_struct *q,\n-\t\tstruct diff_options *options,\n-\t\tvoid *data)\n-{\n-\tstruct wt_status *s = data;\n-\tint shown_header = 0;\n-\tint i;\n-\tfor (i = 0; i < q->nr; i++) {\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\t\t\t\"will commit\");\n-\t\t\ts->commitable = 1;\n-\t\t\tshown_header = 1;\n-\t\t}\n-\t\twt_status_print_filepair(WT_STATUS_UPDATED, q->queue[i]);\n-\t}\n-\tif (shown_header)\n-\t\twt_status_print_trailer();\n-}\n-\n-static void wt_status_print_changed_cb(struct diff_queue_struct *q,\n-                        struct diff_options *options,\n-                        void *data)\n-{\n-\tint i;\n-\tif (q->nr)\n-\t\twt_status_print_header(\"Changed but not updated\",\n-\t\t\t\t\"use git-update-index to mark for commit\");\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-\t\twt_status_print_trailer();\n-}\n-\n-void wt_status_print_initial(struct wt_status *s)\n-{\n-\tint i;\n-\tchar buf[PATH_MAX];\n-\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\t\t\t\"will commit\");\n-\t}\n-\tfor (i = 0; i < active_nr; i++) {\n-\t\tcolor_printf(color(WT_STATUS_HEADER), \"#\\t\");\n-\t\tcolor_printf_ln(color(WT_STATUS_UPDATED), \"new file: %s\",\n-\t\t\t\tquote_crlf(active_cache[i]->name,\n-\t\t\t\t\t   buf, sizeof(buf)));\n-\t}\n-\tif (active_nr)\n-\t\twt_status_print_trailer();\n-}\n-\n-static void wt_status_print_updated(struct wt_status *s)\n-{\n-\tstruct rev_info rev;\n-\tinit_revisions(&rev, NULL);\n-\tsetup_revisions(0, NULL, &rev, s->reference);\n-\trev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;\n-\trev.diffopt.format_callback = wt_status_print_updated_cb;\n-\trev.diffopt.format_callback_data = s;\n-\trev.diffopt.detect_rename = 1;\n-\trun_diff_index(&rev, 1);\n-}\n-\n-static void wt_status_print_changed(struct wt_status *s)\n-{\n-\tstruct rev_info rev;\n-\tinit_revisions(&rev, \"\");\n-\tsetup_revisions(0, NULL, &rev, NULL);\n-\trev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;\n-\trev.diffopt.format_callback = wt_status_print_changed_cb;\n-\trev.diffopt.format_callback_data = s;\n-\trun_diff_files(&rev, 0);\n-}\n-\n-static void wt_status_print_untracked(const struct wt_status *s)\n+static int wt_status_print_untracked(const struct wt_status *s)\n {\n \tstruct dir_struct dir;\n \tconst char *x;\n \tint i;\n \tint shown_header = 0;\n+\tint ret = 0;\n \n \tmemset(&dir, 0, sizeof(dir));\n \n@@ -249,14 +138,15 @@ 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\twt_status_print_header(\"Untracked files\",\n-\t\t\t\t\"use \\\"git add\\\" to add to commit\");\n+\t\t\twt_status_print_header(\"Untracked files:\");\n \t\t\tshown_header = 1;\n \t\t}\n-\t\tcolor_printf(color(WT_STATUS_HEADER), \"#\\t\");\n+\t\tcolor_printf(color(WT_STATUS_HEADER), \"#   \");\n \t\tcolor_printf_ln(color(WT_STATUS_UNTRACKED), \"%.*s\",\n \t\t\t\tent->len, ent->name);\n+\t\tret++;\n \t}\n+\treturn ret;\n }\n \n static void wt_status_print_verbose(struct wt_status *s)\n@@ -269,30 +159,215 @@ static void wt_status_print_verbose(struct wt_status *s)\n \trun_diff_index(&rev, 1);\n }\n \n-void wt_status_print(struct wt_status *s)\n+static void wt_status_copy_cb(struct diff_queue_struct *q,\n+\t\t\t      struct diff_options *options,\n+\t\t\t      void *data)\n+{\n+\tstruct fileinfo *p, *t = (struct fileinfo *)data;\n+\tint i;\n+\n+\tfor(i=0; i<q->nr; i++){\n+\t\tif (q->queue[i]->status=='U')\n+\t\t\tcontinue;\n+\t\tp = xmalloc(sizeof(*p));\n+\t\tp->status = q->queue[i]->status;\n+\t\tp->one = xstrdup(q->queue[i]->one->path);\n+\t\tp->two = xstrdup(q->queue[i]->two->path);\n+\t\tt = t->next = p;\n+\t}\n+\tt->next = NULL;\n+}\n+\n+static void wt_status_find_indexed(struct fileinfo *head)\n+{\n+\tstruct fileinfo *t = head, *p;\n+\tint i;\n+\n+\tread_cache();\n+        for (i = 0; i < active_nr; i++) {\n+\t\tp = xmalloc(sizeof(*p));\n+\t\tp->status = DIFF_STATUS_ADDED;\n+\t\tp->one = xstrdup(active_cache[i]->name);\n+\t\tp->two = NULL;\n+\t\tt = t->next = p;\n+        }\n+\tt->next = NULL;\n+}\n+\n+static void wt_status_find_staged(struct wt_status *s, void *q)\n+{\n+\tstruct rev_info rev;\n+\tinit_revisions(&rev, NULL);\n+\tsetup_revisions(0, NULL, &rev, s->reference);\n+\trev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;\n+\trev.diffopt.format_callback = wt_status_copy_cb;\n+\trev.diffopt.format_callback_data = q;\n+\trev.diffopt.detect_rename = 1;\n+\trun_diff_index(&rev, 1);\n+}\n+\n+static void wt_status_find_unstaged(struct wt_status *s, void *q)\n {\n-\tif (s->branch && strcmp(s->branch, \"refs/heads/master\"))\n-\t\tcolor_printf_ln(color(WT_STATUS_HEADER),\n-\t\t\t\"# On branch %s\", s->branch);\n-\n-\tif (s->is_initial) {\n-\t\tcolor_printf_ln(color(WT_STATUS_HEADER), \"#\");\n-\t\tcolor_printf_ln(color(WT_STATUS_HEADER), \"# Initial commit\");\n-\t\tcolor_printf_ln(color(WT_STATUS_HEADER), \"#\");\n-\t\twt_status_print_initial(s);\n+\tstruct rev_info rev;\n+\tinit_revisions(&rev, NULL);\n+\tsetup_revisions(0, NULL, &rev, NULL);\n+\trev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;\n+\trev.diffopt.format_callback = wt_status_copy_cb;\n+\trev.diffopt.format_callback_data = q;\n+\trun_diff_files(&rev, 0);\n+}\n+\n+\n+static void wt_status_print_warning()\n+{\n+\tstatic const char w1[] =\n+\t\t\"If you want to commit all of your changes, you need to run\";\n+\tstatic const char w2[] =\n+\t\t\"'git commit -a' (or 'git add file...' for selected files)\";\n+\n+\twt_status_print_header(\"WARNING:\");\n+\tcolor_printf(color(WT_STATUS_HEADER), \"#   \");\n+\tcolor_printf_ln(color(WT_STATUS_WARNING), w1);\n+\tcolor_printf(color(WT_STATUS_HEADER), \"#   \");\n+\tcolor_printf_ln(color(WT_STATUS_WARNING), w2);\n+}\n+\n+static int wt_status_print_one(int staged, int unstaged, const char *one,\n+\t\t\tconst char *two)\n+{\n+\tchar mode[3] = \"??\";\n+\tconst char *c;\n+\tint ret = 0;\n+\tchar onebuf[PATH_MAX], twobuf[PATH_MAX];\n+\n+\tone = quote_crlf(one, onebuf, sizeof(onebuf));\n+\ttwo = quote_crlf(two, twobuf, sizeof(twobuf));\n+\n+\tif (staged!=0 && unstaged==0) {\n+\t\tmode[0] = staged;\n+\t\tmode[1] = ' ';\n+\t} else if (staged==0 && unstaged!=0) {\n+\t\tmode[0] = unstaged;\n+\t\tmode[1] = '-';\n+\t\tret = 1;\n+\t} else {\n+\t\tmode[0] = staged;\n+\t\tmode[1] = '+';\n+\t\tret = 2;\n \t}\n-\telse {\n-\t\twt_status_print_updated(s);\n-\t\tdiscard_cache();\n+\tprintf(\"#   \");\n+\tif (mode[1]==' ')\n+\t\tc = color(WT_STATUS_UPDATED);\n+\telse\n+\t\tc = color(WT_STATUS_CHANGED);\n+\n+\tif (mode[0]==DIFF_STATUS_COPIED || mode[0]==DIFF_STATUS_RENAMED)\n+\t\tcolor_printf_ln(c, \"%s %s -> %s\", mode, one, two);\n+\telse\n+\t\tcolor_printf_ln(c, \"%s %s\", mode, one);\n+\treturn ret;\n+}\n+\n+static void wt_status_free_list(struct fileinfo *p)\n+{\n+\tstruct fileinfo *t = p->next;\n+\n+\twhile (t){\n+\t        p = t;\n+\t\tt = t->next;\n+\t\tfree(p->one);\n+\t\tfree(p->two);\n+\t\tfree(p);\n \t}\n+}\n+\n+static int wt_status_print_tracked(struct wt_status *status)\n+{\n+\tstruct fileinfo staged, unstaged, *s, *u;\n+\tint warn = 0;\n+\tint ret = 0;\n+\n+\tstaged.next = unstaged.next = NULL;\n+\n+\tif (status->is_initial)\n+\t\twt_status_find_indexed(&staged);\n+\telse\n+\t\twt_status_find_staged(status, &staged);\n+\n+\twt_status_find_unstaged(status, &unstaged);\n \n-\twt_status_print_changed(s);\n-\twt_status_print_untracked(s);\n+\ts = staged.next;\n+\tu = unstaged.next;\n+\n+\tif (!s && !u)\n+\t\treturn ret;\n+\n+\twt_status_print_header(\"Modified files:\");\n+\twhile(s || u) {\n+\t\tif (!s) {\n+\t\t\twarn |= wt_status_print_one(0, u->status, u->one,\n+\t\t\t\t\t\t    u->two);\n+\t\t\tu = u->next;\n+\t\t} else if (!u) {\n+\t\t\twarn |= wt_status_print_one(s->status, 0, s->one,\n+\t\t\t\t\t\t    s->two);\n+\t\t\ts = s->next;\n+\t\t} else {\n+\t\t\tint i = strcmp(s->one, u->one);\n+\t\t\tif (i<0) {\n+\t\t\t\twarn |= wt_status_print_one(s->status, 0,\n+\t\t\t\t\t\t\t    s->one, s->two);\n+\t\t\t\ts = s->next;\n+\t\t\t} else if (i>0) {\n+\t\t\t\twarn |= wt_status_print_one(0, u->status,\n+\t\t\t\t\t\t\t    u->one, u->two);\n+\t\t\t\tu = u->next;\n+\t\t\t} else {\n+\t\t\t\twarn |= wt_status_print_one(s->status,\n+\t\t\t\t\t\t\t    u->status, s->one,\n+\t\t\t\t\t\t\t    s->two);\n+\t\t\t\ts = s->next;\n+\t\t\t\tu = u->next;\n+\t\t\t}\n+\t\t}\n+\t\tret++;\n+\t}\n \n-\tif (s->verbose && !s->is_initial)\n-\t\twt_status_print_verbose(s);\n-\tif (!s->commitable)\n-\t\tprintf(\"%s\\n\", s->amend ? \"# No changes\" : \"nothing to commit\");\n+\t/* if warn==0 or warn==2, something is staged for commit */\n+\tstatus->commitable = (warn != 1);\n+\n+\tif (warn && wt_status_warn)\n+\t\twt_status_print_warning();\n+\twt_status_free_list(&staged);\n+\twt_status_free_list(&unstaged);\n+\treturn ret;\n+}\n+\n+void wt_status_print(struct wt_status *status)\n+{\n+\tint cnt;\n+\n+\tif (status->branch && strcmp(status->branch, \"refs/heads/master\")){\n+\t\twt_status_print_trailer();\n+\t\tcolor_printf_ln(color(WT_STATUS_HEADER), \"# On branch %s\",\n+\t\t\t\tstatus->branch);\n+\t}\n+\n+\tif (status->is_initial)\n+\t\twt_status_print_header(\"Initial commit\");\n+\n+\tcnt = wt_status_print_tracked(status);\n+\tcnt += wt_status_print_untracked(status);\n+\n+\tif (cnt)\n+\t\twt_status_print_trailer();\n+\n+\tif (status->verbose && !status->is_initial)\n+\t\twt_status_print_verbose(status);\n+\n+\tif (!status->commitable)\n+\t\tprintf(\"%s\\n\",\n+\t\t       status->amend ? \"# No changes\" : \"nothing to commit\");\n }\n \n int git_status_config(const char *k, const char *v)\n@@ -305,5 +380,8 @@ int git_status_config(const char *k, const char *v)\n \t\tint slot = parse_status_slot(k, 13);\n \t\tcolor_parse(v, k, wt_status_colors[slot]);\n \t}\n+\tif (!strcmp(k, \"status.showwarning\"))\n+\t\twt_status_warn = git_config_bool(k, v);\n+\n \treturn git_default_config(k, v);\n }\ndiff --git a/wt-status.h b/wt-status.h\nindex 0a5a5b7..b8337ee 100644\n--- a/wt-status.h\n+++ b/wt-status.h\n@@ -6,6 +6,7 @@ enum color_wt_status {\n \tWT_STATUS_UPDATED,\n \tWT_STATUS_CHANGED,\n \tWT_STATUS_UNTRACKED,\n+\tWT_STATUS_WARNING\n };\n \n struct wt_status {\n-- \n1.4.4.1.g1210\n"},{"id":"296485","messageId":"8c5c35580612120330n36bcdd00p57b2a7cd1d6c801@mail.gmail.com","threadId":"43397","inReplyTo":"11650882251452-git-send-email-hjemli@gmail.com","subject":"Re: [RFC/PATCH] runstatus: restructure visual appearance","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2006-12-12T11:30:15Z","receivedAt":"2006-12-12T11:30:15Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 12/2/06, Lars Hjemli <hjemli@gmail.com> wrote:\n> This is a rather subjective 'improvement', but I think it makes the commit\n> message easier to comprehend and I hope that goes for both new and\n> experienced users.\n\nJust wondering if this patch got dropped or simply overlooked...\n\nIf dropped, sorry for the noise\n\n-- \n"},{"id":"296899","messageId":"7v3b7koc6b.fsf@assigned-by-dhcp.cox.net","threadId":"43397","inReplyTo":"8c5c35580612120330n36bcdd00p57b2a7cd1d6c801@mail.gmail.com","subject":"Re: [RFC/PATCH] runstatus: restructure visual appearance","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-13T00:46:20Z","receivedAt":"2006-12-13T00:46:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Lars Hjemli\" <hjemli@gmail.com> writes:\n\n> On 12/2/06, Lars Hjemli <hjemli@gmail.com> wrote:\n>> This is a rather subjective 'improvement', but I think it makes the commit\n>> message easier to comprehend and I hope that goes for both new and\n>> experienced users.\n>\n> Just wondering if this patch got dropped or simply overlooked...\n\nI looked at the patch, and I was neutral to slightly negative\n(but only slightly.  I thought M vs M+ was too subtle and\ncryptic until the user gets used to them).\n\nI however did not see overwhelming support from the list, so I\ndid not further think about it.\n\nOne thing that was mentioned in the past on the list about the\noutput from git-status was that we do not make mode changes\nstand out, and people can mistakenly do something silly to\nchange the -x bit and the current git-status would only say:\n\n\tmodified:\tgit-foobar.sh\n\nwhich would not help them notice the mistake, as a result,\naccidental mode change can get committed.\n\nIf we are designing a new format to make git-status output more\ncompact and easier to understand, I think it should also attempt\nto address this problem as well.\n"},{"id":"294884","messageId":"8c5c35580612130127y1b094dbbq34c06376704b0506@mail.gmail.com","threadId":"43397","inReplyTo":"7v3b7koc6b.fsf@assigned-by-dhcp.cox.net","subject":"Re: [RFC/PATCH] runstatus: restructure visual appearance","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2006-12-13T09:27:37Z","receivedAt":"2006-12-13T09:27:37Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 12/13/06, Junio C Hamano <junkio@cox.net> wrote:\n> \"Lars Hjemli\" <hjemli@gmail.com> writes:\n> > Just wondering if this patch got dropped or simply overlooked...\n>\n> I looked at the patch, and I was neutral to slightly negative\n> (but only slightly.  I thought M vs M+ was too subtle and\n> cryptic until the user gets used to them).\n\nHmm, yes, I agree it's a bit subtle. But whenever the '+' or '-' is\nadded to a state symbol, the big warning that is printed should make\nit less so (the warning should also mention git-rm, btw).\n\nAnd of course the man-page for git-status should be updated to\ndescribe the different state symbols, the meaning of +/-, and how to\n'resolve' them.\n\n\n> I however did not see overwhelming support from the list, so I\n> did not further think about it.\n\nThe silence was earth shattering\n\n\n> One thing that was mentioned in the past on the list about the\n> output from git-status was that we do not make mode changes\n> stand out, and people can mistakenly do something silly to\n> change the -x bit and the current git-status would only say:\n>\n>      modified:       git-foobar.sh\n>\n> which would not help them notice the mistake, as a result,\n> accidental mode change can get committed.\n>\n>If we are designing a new format to make git-status output more\n>compact and easier to understand, I think it should also attempt\n>to address this problem as well.\n\nExcellent point, I'll use it as an excuse to refine and resend the patch.\n\n-- \n"},{"id":"294614","messageId":"1166026335.19135.462.camel@cashmere.sps.mot.com","threadId":"43397","inReplyTo":"8c5c35580612130127y1b094dbbq34c06376704b0506@mail.gmail.com","subject":"Re: [RFC/PATCH] runstatus: restructure visual appearance","fromName":"Jon Loeliger","fromEmail":"jdl@freescale.com","sentAt":"2006-12-13T16:12:15Z","receivedAt":"2006-12-13T16:12:15Z","isPatch":true,"sender":{"key":"jdl@jdl.com","avatar":"https://gravatar.com/avatar/75ce9a10b151acd2c28ec4ab2136dba7b2ff1634530bd04b155981a749d08a64?d=mp&s=160"},"body":"On Wed, 2006-12-13 at 03:27, Lars Hjemli wrote:\n\n> >If we are designing a new format to make git-status output more\n> >compact and easier to understand, I think it should also attempt\n> >to address this [mode-change] problem as well.\n> \n> Excellent point, I'll use it as an excuse to refine and resend the patch.\n\nIf you are so inclined, you might google on list for a\npatch I submitted down this line last year sometime?\n\njdl\n\n"}]}