{"thread":{"id":"34853","subject":"[PATCH v4 3/5] submodule summary: ignore --for-status option","startedAt":"2013-09-05T09:50:13Z","lastAt":"2013-09-06T21:55:10Z","messageCount":17,"participants":["Matthieu Moy","Junio C Hamano","Jeff King","Jonathan Nieder"],"isPatch":true,"patchVersion":4,"patchTotal":5},"messages":[{"id":"226839","messageId":"1378374618-31439-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"34853","inReplyTo":null,"subject":"[PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-09-05T09:50:13Z","receivedAt":"2013-09-05T09:50:13Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Compared to v2, this changes essentially:\n\n* The prefix is actually disabled by default in this version. As a\n  consequence, the option is renamed to status.oldStyle.\n\n* Since this is the default, the tests are updated to test the new\n  defaults. In a first patch, I'm setting status.oldStyle=true in test\n  files that require it (to keep the patch short), and the last patch\n  actually updates the test expected results. This was actually useful\n  as I did find (and fix) a few bugs updating the tests:\n\n  - the --columns option was still showing the comment prefix\n\n  - \"git commit --dry-run\" and failed \"git commit\" were still\n    displaying comments to stdout.\n\n* The --for-status option is kept as a no-op.\n\nMatthieu Moy (5):\n  builtin/stripspace.c: fix broken indentation\n  wt-status: use argv_array API\n  submodule summary: ignore --for-status option\n  status: disable display of '#' comment prefix by default\n  tests: don't set status.oldStyle file-wide\n\n Documentation/config.txt           |   7 +\n builtin/commit.c                   |  10 +\n builtin/stripspace.c               |   8 +-\n git-submodule.sh                   |  13 +-\n t/t3001-ls-files-others-exclude.sh |   2 +-\n t/t7060-wtstatus.sh                | 109 +++--\n t/t7401-submodule-summary.sh       |  12 +-\n t/t7508-status.sh                  | 944 +++++++++++++++++++------------------\n wt-status.c                        |  85 +++-\n wt-status.h                        |   1 +\n 10 files changed, 640 insertions(+), 551 deletions(-)\n\n-- \n1.8.4.4.g70bf5e8.dirty\n"},{"id":"226841","messageId":"1378374618-31439-2-git-send-email-Matthieu.Moy@imag.fr","threadId":"34853","inReplyTo":"1378374618-31439-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v4 1/5] builtin/stripspace.c: fix broken indentation","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-09-05T09:50:14Z","receivedAt":"2013-09-05T09:50:14Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/stripspace.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/stripspace.c b/builtin/stripspace.c\nindex e981dfb..1259ed7 100644\n--- a/builtin/stripspace.c\n+++ b/builtin/stripspace.c\n@@ -89,11 +89,11 @@ int cmd_stripspace(int argc, const char **argv, const char *prefix)\n \n \tif (argc == 2) {\n \t\tif (!strcmp(argv[1], \"-s\") ||\n-\t\t\t!strcmp(argv[1], \"--strip-comments\")) {\n-\t\t\t strip_comments = 1;\n+\t\t    !strcmp(argv[1], \"--strip-comments\")) {\n+\t\t\tstrip_comments = 1;\n \t\t} else if (!strcmp(argv[1], \"-c\") ||\n-\t\t\t\t\t !strcmp(argv[1], \"--comment-lines\")) {\n-\t\t\t mode = COMMENT_LINES;\n+\t\t\t   !strcmp(argv[1], \"--comment-lines\")) {\n+\t\t\tmode = COMMENT_LINES;\n \t\t} else {\n \t\t\tmode = INVAL;\n \t\t}\n-- \n1.8.4.4.g70bf5e8.dirty\n"},{"id":"226837","messageId":"1378374618-31439-3-git-send-email-Matthieu.Moy@imag.fr","threadId":"34853","inReplyTo":"1378374618-31439-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v4 2/5] wt-status: use argv_array API","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-09-05T09:50:15Z","receivedAt":"2013-09-05T09:50:15Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"No behavior change, but two slight code reorganization: argv_array_push\ndoesn't accept NULL strings, and duplicates its argument hence\nsummary_limit must be written to before being inserted into argv.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n wt-status.c | 26 ++++++++++++++------------\n 1 file changed, 14 insertions(+), 12 deletions(-)\n\ndiff --git a/wt-status.c b/wt-status.c\nindex cb24f1f..958a53c 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -8,6 +8,7 @@\n #include \"diffcore.h\"\n #include \"quote.h\"\n #include \"run-command.h\"\n+#include \"argv-array.h\"\n #include \"remote.h\"\n #include \"refs.h\"\n #include \"submodule.h\"\n@@ -663,29 +664,30 @@ static void wt_status_print_submodule_summary(struct wt_status *s, int uncommitt\n \tchar summary_limit[64];\n \tchar index[PATH_MAX];\n \tconst char *env[] = { NULL, NULL };\n-\tconst char *argv[8];\n-\n-\tenv[0] =\tindex;\n-\targv[0] =\t\"submodule\";\n-\targv[1] =\t\"summary\";\n-\targv[2] =\tuncommitted ? \"--files\" : \"--cached\";\n-\targv[3] =\t\"--for-status\";\n-\targv[4] =\t\"--summary-limit\";\n-\targv[5] =\tsummary_limit;\n-\targv[6] =\tuncommitted ? NULL : (s->amend ? \"HEAD^\" : \"HEAD\");\n-\targv[7] =\tNULL;\n+\tstruct argv_array argv = ARGV_ARRAY_INIT;\n \n \tsprintf(summary_limit, \"%d\", s->submodule_summary);\n \tsnprintf(index, sizeof(index), \"GIT_INDEX_FILE=%s\", s->index_file);\n \n+\tenv[0] = index;\n+\targv_array_push(&argv, \"submodule\");\n+\targv_array_push(&argv, \"summary\");\n+\targv_array_push(&argv, uncommitted ? \"--files\" : \"--cached\");\n+\targv_array_push(&argv, \"--for-status\");\n+\targv_array_push(&argv, \"--summary-limit\");\n+\targv_array_push(&argv, summary_limit);\n+\tif (!uncommitted)\n+\t\targv_array_push(&argv, s->amend ? \"HEAD^\" : \"HEAD\");\n+\n \tmemset(&sm_summary, 0, sizeof(sm_summary));\n-\tsm_summary.argv = argv;\n+\tsm_summary.argv = argv.argv;\n \tsm_summary.env = env;\n \tsm_summary.git_cmd = 1;\n \tsm_summary.no_stdin = 1;\n \tfflush(s->fp);\n \tsm_summary.out = dup(fileno(s->fp));    /* run_command closes it */\n \trun_command(&sm_summary);\n+\targv_array_clear(&argv);\n }\n \n static void wt_status_print_other(struct wt_status *s,\n-- \n1.8.4.4.g70bf5e8.dirty\n"},{"id":"226836","messageId":"1378374618-31439-4-git-send-email-Matthieu.Moy@imag.fr","threadId":"34853","inReplyTo":"1378374618-31439-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v4 3/5] submodule summary: ignore --for-status option","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-09-05T09:50:16Z","receivedAt":"2013-09-05T09:50:16Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"The --for-status option was an undocumented option used only by\nwt-status.c, which inserted a header and commented out the output. We can\nachieve the same result within wt-status.c, without polluting the\nsubmodule command-line options.\n\nThis will make it easier to disable the comments from wt-status.c later.\n\nThe --for-status is kept so that another topic in flight\n(bc/submodule-status-ignored) can continue relying on it, although it is\ncurrently a no-op.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n git-submodule.sh             | 13 +------------\n t/t7401-submodule-summary.sh | 12 +++++-------\n wt-status.c                  | 27 ++++++++++++++++++++++++++-\n 3 files changed, 32 insertions(+), 20 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 2979197..c17bef1 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -1149,18 +1149,7 @@ cmd_summary() {\n \t\t\techo\n \t\tfi\n \t\techo\n-\tdone |\n-\tif test -n \"$for_status\"; then\n-\t\tif [ -n \"$files\" ]; then\n-\t\t\tgettextln \"Submodules changed but not updated:\" | git stripspace -c\n-\t\telse\n-\t\t\tgettextln \"Submodule changes to be committed:\" | git stripspace -c\n-\t\tfi\n-\t\tprintf \"\\n\" | git stripspace -c\n-\t\tgit stripspace -c\n-\telse\n-\t\tcat\n-\tfi\n+\tdone\n }\n #\n # List all submodules, prefixed with:\ndiff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh\nindex ac2434c..5a6d6d6 100755\n--- a/t/t7401-submodule-summary.sh\n+++ b/t/t7401-submodule-summary.sh\n@@ -265,13 +265,11 @@ EOF\n test_expect_success '--for-status' \"\n \tgit submodule summary --for-status HEAD^ >actual &&\n \ttest_i18ncmp actual - <<EOF\n-# Submodule changes to be committed:\n-#\n-# * sm1 $head6...0000000:\n-#\n-# * sm2 0000000...$head7 (2):\n-#   > Add foo9\n-#\n+* sm1 $head6...0000000:\n+\n+* sm2 0000000...$head7 (2):\n+  > Add foo9\n+\n EOF\n \"\n \ndiff --git a/wt-status.c b/wt-status.c\nindex 958a53c..853813f 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -665,6 +665,10 @@ static void wt_status_print_submodule_summary(struct wt_status *s, int uncommitt\n \tchar index[PATH_MAX];\n \tconst char *env[] = { NULL, NULL };\n \tstruct argv_array argv = ARGV_ARRAY_INIT;\n+\tstruct strbuf cmd_stdout = STRBUF_INIT;\n+\tstruct strbuf summary = STRBUF_INIT;\n+\tchar *summary_content;\n+\tsize_t len;\n \n \tsprintf(summary_limit, \"%d\", s->submodule_summary);\n \tsnprintf(index, sizeof(index), \"GIT_INDEX_FILE=%s\", s->index_file);\n@@ -685,9 +689,30 @@ static void wt_status_print_submodule_summary(struct wt_status *s, int uncommitt\n \tsm_summary.git_cmd = 1;\n \tsm_summary.no_stdin = 1;\n \tfflush(s->fp);\n-\tsm_summary.out = dup(fileno(s->fp));    /* run_command closes it */\n+\tsm_summary.out = -1;\n+\n \trun_command(&sm_summary);\n \targv_array_clear(&argv);\n+\n+\tlen = strbuf_read(&cmd_stdout, sm_summary.out, 1024);\n+\n+\t/* prepend header, only if there's an actual output */\n+\tif (len) {\n+\t\tif (uncommitted)\n+\t\t\tstrbuf_addstr(&summary, _(\"Submodules changed but not updated:\"));\n+\t\telse\n+\t\t\tstrbuf_addstr(&summary, _(\"Submodule changes to be committed:\"));\n+\t\tstrbuf_addstr(&summary, \"\\n\\n\");\n+\t}\n+\tstrbuf_addbuf(&summary, &cmd_stdout);\n+\tstrbuf_release(&cmd_stdout);\n+\n+\tsummary_content = strbuf_detach(&summary, &len);\n+\tstrbuf_add_commented_lines(&summary, summary_content, len);\n+\tfree(summary_content);\n+\n+\tfputs(summary.buf, s->fp);\n+\tstrbuf_release(&summary);\n }\n \n static void wt_status_print_other(struct wt_status *s,\n-- \n1.8.4.4.g70bf5e8.dirty\n"},{"id":"226840","messageId":"1378374618-31439-5-git-send-email-Matthieu.Moy@imag.fr","threadId":"34853","inReplyTo":"1378374618-31439-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v4 4/5] status: disable display of '#' comment prefix by default","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-09-05T09:50:17Z","receivedAt":"2013-09-05T09:50:17Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Historically, \"git status\" needed to prefix each output line with '#' so\nthat the output could be added as comment to the commit message. This\nprefix comment has no real purpose when \"git status\" is ran from the\ncommand-line, and this may distract users from the real content.\n\nDisable this prefix comment by default, and make it re-activable for\nusers needing backward compatibility with status.oldStyle.\n\nObviously, \"git commit\" ignores status.oldStyle and keeps the comment\nunconditionnaly when writing to COMMIT_EDITMSG (but not when writing to\nstdout for an error message or with --dry-run).\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/config.txt           |  7 +++++\n builtin/commit.c                   | 10 ++++++\n t/t3001-ls-files-others-exclude.sh |  2 +-\n t/t7060-wtstatus.sh                |  4 +++\n t/t7508-status.sh                  | 63 +++++++++++++++++++++++++++++++++++---\n wt-status.c                        | 38 ++++++++++++++++-------\n wt-status.h                        |  1 +\n 7 files changed, 108 insertions(+), 17 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex ec57a15..6b8b3bb 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -2118,6 +2118,13 @@ status.branch::\n \tSet to true to enable --branch by default in linkgit:git-status[1].\n \tThe option --no-branch takes precedence over this variable.\n \n+status.oldStyle::\n+\tIf set to true, linkgit:git-status[1] will insert a comment\n+\tprefix before each output line (starting with\n+\t`core.commentChar`, i.e. `#` by default). This was the\n+\tbehavior of linkgit:git-status[1] in Git 1.8.4 and previous.\n+\tDefaults to false.\n+\n status.showUntrackedFiles::\n \tBy default, linkgit:git-status[1] and linkgit:git-commit[1] show\n \tfiles which are not currently tracked by Git. Directories which\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 10acc53..1726473 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -599,6 +599,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \tconst char *hook_arg2 = NULL;\n \tint ident_shown = 0;\n \tint clean_message_contents = (cleanup_mode != CLEANUP_NONE);\n+\tint old_display_comment_char;\n \n \t/* This checks and barfs if author is badly specified */\n \tdetermine_author_info(author_ident);\n@@ -696,6 +697,10 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \tif (s->fp == NULL)\n \t\tdie_errno(_(\"could not open '%s'\"), git_path(commit_editmsg));\n \n+\t/* Ignore status.oldStyle: we do need comments in COMMIT_EDITMSG. */\n+\told_display_comment_char = s->display_comment_char;\n+\ts->display_comment_char = 1;\n+\n \tif (clean_message_contents)\n \t\tstripspace(&sb, 0);\n \n@@ -821,6 +826,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t */\n \tif (!commitable && whence != FROM_MERGE && !allow_empty &&\n \t    !(amend && is_a_merge(current_head))) {\n+\t\ts->display_comment_char = old_display_comment_char;\n \t\trun_status(stdout, index_file, prefix, 0, s);\n \t\tif (amend)\n \t\t\tfputs(_(empty_amend_advice), stderr);\n@@ -1182,6 +1188,10 @@ static int git_status_config(const char *k, const char *v, void *cb)\n \t\ts->use_color = git_config_colorbool(k, v);\n \t\treturn 0;\n \t}\n+\tif (!strcmp(k, \"status.oldstyle\")) {\n+\t\ts->display_comment_char = git_config_bool(k, v);\n+\t\treturn 0;\n+\t}\n \tif (!prefixcmp(k, \"status.color.\") || !prefixcmp(k, \"color.status.\")) {\n \t\tint slot = parse_status_slot(k, 13);\n \t\tif (slot < 0)\ndiff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh\nindex f0421c0..22843f9 100755\n--- a/t/t3001-ls-files-others-exclude.sh\n+++ b/t/t3001-ls-files-others-exclude.sh\n@@ -115,7 +115,7 @@ EOF\n \n git config core.excludesFile excludes-file\n \n-git status | grep \"^#\t\" > output\n+git -c status.oldStyle status | grep \"^#\t\" > output\n \n cat > expect << EOF\n #\t.gitignore\ndiff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh\nindex 52ef06b..ddebd28 100755\n--- a/t/t7060-wtstatus.sh\n+++ b/t/t7060-wtstatus.sh\n@@ -4,6 +4,10 @@ test_description='basic work tree status reporting'\n \n . ./test-lib.sh\n \n+test_expect_success 'use status.oldStyle by default ' '\n+\tgit config --global status.oldStyle true\n+'\n+\n test_expect_success setup '\n \tgit config --global advice.statusuoption false &&\n \ttest_commit A &&\ndiff --git a/t/t7508-status.sh b/t/t7508-status.sh\nindex ac3d0fe..7c0873d 100755\n--- a/t/t7508-status.sh\n+++ b/t/t7508-status.sh\n@@ -7,6 +7,10 @@ test_description='git status'\n \n . ./test-lib.sh\n \n+test_expect_success 'use status.oldStyle by default ' '\n+\tgit config --global status.oldStyle true\n+'\n+\n test_expect_success 'status -h in broken repository' '\n \tgit config --global advice.statusuoption false &&\n \tmkdir broken &&\n@@ -60,8 +64,12 @@ test_expect_success 'status (1)' '\n \ttest_i18ngrep \"use \\\"git rm --cached <file>\\.\\.\\.\\\" to unstage\" output\n '\n \n+strip_comments () {\n+\tsed \"s/^\\# //; s/^\\#$//; s/^#\\t/\\t/\" <\"$1\" >\"$1\".tmp &&\n+\trm \"$1\" && mv \"$1\".tmp \"$1\"\n+}\n+\n test_expect_success 'status --column' '\n-\tCOLUMNS=50 git status --column=\"column dense\" >output &&\n \tcat >expect <<\\EOF &&\n # On branch master\n # Changes to be committed:\n@@ -78,9 +86,16 @@ test_expect_success 'status --column' '\n # Untracked files:\n #   (use \"git add <file>...\" to include in what will be committed)\n #\n-#\tdir1/untracked dir2/untracked untracked\n-#\tdir2/modified  output\n+#\tdir1/untracked dir2/untracked output\n+#\tdir2/modified  expect         untracked\n EOF\n+\tCOLUMNS=50 git -c status.oldStyle=true status --column=\"column dense\" >output &&\n+\ttest_i18ncmp expect output\n+'\n+\n+test_expect_success 'status --column status.oldStyle=false' '\n+\tstrip_comments expect &&\n+\tCOLUMNS=49 git -c status.oldStyle=false status --column=\"column dense\" >output &&\n \ttest_i18ncmp expect output\n '\n \n@@ -108,11 +123,39 @@ cat >expect <<\\EOF\n #\tuntracked\n EOF\n \n-test_expect_success 'status (2)' '\n-\tgit status >output &&\n+test_expect_success 'status with status.oldStyle=true' '\n+\tgit -c status.oldStyle=true status >output &&\n+\ttest_i18ncmp expect output\n+'\n+\n+test_expect_success 'status with status.oldStyle=false' '\n+\tstrip_comments expect &&\n+\tgit -c status.oldStyle=false status >output &&\n \ttest_i18ncmp expect output\n '\n \n+test_expect_success 'setup fake editor' '\n+\tcat >.git/editor <<-\\EOF &&\n+\t#! /bin/sh\n+\tcp \"$1\" output\n+EOF\n+\tchmod 755 .git/editor\n+'\n+\n+commit_template_commented () {\n+\t(\n+\t\tEDITOR=.git/editor &&\n+\t\texport EDITOR &&\n+\t\t# Fails due to empty message\n+\t\ttest_must_fail git commit\n+\t) &&\n+\t! grep '^[^#]' output\n+}\n+\n+test_expect_success 'commit ignores status.oldStyle=false in COMMIT_EDITMSG' '\n+\tcommit_template_commented\n+'\n+\n cat >expect <<\\EOF\n # On branch master\n # Changes to be committed:\n@@ -872,6 +915,16 @@ test_expect_success 'status submodule summary' '\n \ttest_i18ncmp expect output\n '\n \n+test_expect_success 'status submodule summary with status.oldStyle=false' '\n+\tstrip_comments expect &&\n+\tgit -c status.oldStyle=false status >output &&\n+\ttest_i18ncmp expect output\n+'\n+\n+test_expect_success 'commit with submodule summary ignores status.oldStyle' '\n+\tcommit_template_commented\n+'\n+\n cat >expect <<EOF\n  M dir1/modified\n A  dir2/added\ndiff --git a/wt-status.c b/wt-status.c\nindex 853813f..ee5d7b8 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -46,9 +46,11 @@ static void status_vprintf(struct wt_status *s, int at_bol, const char *color,\n \n \tstrbuf_vaddf(&sb, fmt, ap);\n \tif (!sb.len) {\n-\t\tstrbuf_addch(&sb, comment_line_char);\n-\t\tif (!trail)\n-\t\t\tstrbuf_addch(&sb, ' ');\n+\t\tif (s->display_comment_char) {\n+\t\t\tstrbuf_addch(&sb, comment_line_char);\n+\t\t\tif (!trail)\n+\t\t\t\tstrbuf_addch(&sb, ' ');\n+\t\t}\n \t\tcolor_print_strbuf(s->fp, color, &sb);\n \t\tif (trail)\n \t\t\tfprintf(s->fp, \"%s\", trail);\n@@ -59,7 +61,7 @@ static void status_vprintf(struct wt_status *s, int at_bol, const char *color,\n \t\teol = strchr(line, '\\n');\n \n \t\tstrbuf_reset(&linebuf);\n-\t\tif (at_bol) {\n+\t\tif (at_bol && s->display_comment_char) {\n \t\t\tstrbuf_addch(&linebuf, comment_line_char);\n \t\t\tif (*line != '\\n' && *line != '\\t')\n \t\t\t\tstrbuf_addch(&linebuf, ' ');\n@@ -129,6 +131,7 @@ void wt_status_prepare(struct wt_status *s)\n \ts->untracked.strdup_strings = 1;\n \ts->ignored.strdup_strings = 1;\n \ts->show_branch = -1;  /* unspecified */\n+\ts->display_comment_char = 0;\n }\n \n static void wt_status_print_unmerged_header(struct wt_status *s)\n@@ -707,9 +710,11 @@ static void wt_status_print_submodule_summary(struct wt_status *s, int uncommitt\n \tstrbuf_addbuf(&summary, &cmd_stdout);\n \tstrbuf_release(&cmd_stdout);\n \n-\tsummary_content = strbuf_detach(&summary, &len);\n-\tstrbuf_add_commented_lines(&summary, summary_content, len);\n-\tfree(summary_content);\n+\tif (s->display_comment_char) {\n+\t\tsummary_content = strbuf_detach(&summary, &len);\n+\t\tstrbuf_add_commented_lines(&summary, summary_content, len);\n+\t\tfree(summary_content);\n+\t}\n \n \tfputs(summary.buf, s->fp);\n \tstrbuf_release(&summary);\n@@ -748,8 +753,9 @@ static void wt_status_print_other(struct wt_status *s,\n \tif (!column_active(s->colopts))\n \t\treturn;\n \n-\tstrbuf_addf(&buf, \"%s#\\t%s\",\n+\tstrbuf_addf(&buf, \"%s%s\\t%s\",\n \t\t    color(WT_STATUS_HEADER, s),\n+\t\t    s->display_comment_char ? \"#\" : \"\",\n \t\t    color(WT_STATUS_UNTRACKED, s));\n \tmemset(&copts, 0, sizeof(copts));\n \tcopts.padding = 1;\n@@ -793,6 +799,8 @@ static void wt_status_print_tracking(struct wt_status *s)\n \tstruct strbuf sb = STRBUF_INIT;\n \tconst char *cp, *ep;\n \tstruct branch *branch;\n+\tchar comment_line_string[3];\n+\tint i;\n \n \tassert(s->branch && !s->is_initial);\n \tif (prefixcmp(s->branch, \"refs/heads/\"))\n@@ -801,12 +809,20 @@ static void wt_status_print_tracking(struct wt_status *s)\n \tif (!format_tracking_info(branch, &sb))\n \t\treturn;\n \n+\ti = 0;\n+\tif (s->display_comment_char) {\n+\t\tcomment_line_string[i++] = comment_line_char;\n+\t\tcomment_line_string[i++] = ' ';\n+\t}\n+\tcomment_line_string[i] = '\\0';\n+\n \tfor (cp = sb.buf; (ep = strchr(cp, '\\n')) != NULL; cp = ep + 1)\n \t\tcolor_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s),\n-\t\t\t\t \"%c %.*s\", comment_line_char,\n+\t\t\t\t \"%s%.*s\", comment_line_string,\n \t\t\t\t (int)(ep - cp), cp);\n-\tcolor_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), \"%c\",\n-\t\t\t comment_line_char);\n+\tif (s->display_comment_char)\n+\t\tcolor_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), \"%c\",\n+\t\t\t\t comment_line_char);\n }\n \n static int has_unmerged(struct wt_status *s)\ndiff --git a/wt-status.h b/wt-status.h\nindex fb7152e..ac02c64 100644\n--- a/wt-status.h\n+++ b/wt-status.h\n@@ -50,6 +50,7 @@ struct wt_status {\n \tenum commit_whence whence;\n \tint nowarn;\n \tint use_color;\n+\tint display_comment_char;\n \tint relative_paths;\n \tint submodule_summary;\n \tint show_ignored_files;\n-- \n1.8.4.4.g70bf5e8.dirty\n"},{"id":"226838","messageId":"1378374618-31439-6-git-send-email-Matthieu.Moy@imag.fr","threadId":"34853","inReplyTo":"1378374618-31439-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v4 5/5] tests: don't set status.oldStyle file-wide","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-09-05T09:50:18Z","receivedAt":"2013-09-05T09:50:18Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"The previous commit set status.oldStyle file-wide in t7060-wtstatus.sh\nand t7508-status.sh to make the patch small. However, now that\nstatus.oldStyle is not the default, it is better to disable it in tests\nso that the most common situation is also the most tested.\n\nWhile we're there, move the \"cat > expect << EOF\" blocks inside the\ntests.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n t/t7060-wtstatus.sh | 113 ++++---\n t/t7508-status.sh   | 889 ++++++++++++++++++++++++++--------------------------\n 2 files changed, 493 insertions(+), 509 deletions(-)\n\ndiff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh\nindex ddebd28..7d467c0 100755\n--- a/t/t7060-wtstatus.sh\n+++ b/t/t7060-wtstatus.sh\n@@ -4,10 +4,6 @@ test_description='basic work tree status reporting'\n \n . ./test-lib.sh\n \n-test_expect_success 'use status.oldStyle by default ' '\n-\tgit config --global status.oldStyle true\n-'\n-\n test_expect_success setup '\n \tgit config --global advice.statusuoption false &&\n \ttest_commit A &&\n@@ -33,20 +29,19 @@ test_expect_success 'Report new path with conflict' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n-# On branch side\n-# You have unmerged paths.\n-#   (fix conflicts and run \"git commit\")\n-#\n-# Unmerged paths:\n-#   (use \"git add/rm <file>...\" as appropriate to mark resolution)\n-#\n-#\tdeleted by us:      foo\n-#\n+test_expect_success 'M/D conflict does not segfault' '\n+\tcat >expect <<EOF &&\n+On branch side\n+You have unmerged paths.\n+  (fix conflicts and run \"git commit\")\n+\n+Unmerged paths:\n+  (use \"git add/rm <file>...\" as appropriate to mark resolution)\n+\n+\tdeleted by us:      foo\n+\n no changes added to commit (use \"git add\" and/or \"git commit -a\")\n EOF\n-\n-test_expect_success 'M/D conflict does not segfault' '\n \tmkdir mdconflict &&\n \t(\n \t\tcd mdconflict &&\n@@ -139,19 +134,19 @@ test_expect_success 'status when conflicts with add and rm advice (deleted by th\n \ttest_commit on_second main.txt on_second &&\n \ttest_commit master conflict.txt master &&\n \ttest_must_fail git merge second_branch &&\n-\tcat >expected <<-\\EOF &&\n-\t# On branch master\n-\t# You have unmerged paths.\n-\t#   (fix conflicts and run \"git commit\")\n-\t#\n-\t# Unmerged paths:\n-\t#   (use \"git add/rm <file>...\" as appropriate to mark resolution)\n-\t#\n-\t#\tboth added:         conflict.txt\n-\t#\tdeleted by them:    main.txt\n-\t#\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\tEOF\n+\tcat >expected <<\\EOF &&\n+On branch master\n+You have unmerged paths.\n+  (fix conflicts and run \"git commit\")\n+\n+Unmerged paths:\n+  (use \"git add/rm <file>...\" as appropriate to mark resolution)\n+\n+\tboth added:         conflict.txt\n+\tdeleted by them:    main.txt\n+\n+no changes added to commit (use \"git add\" and/or \"git commit -a\")\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -172,20 +167,20 @@ test_expect_success 'prepare for conflicts' '\n \n test_expect_success 'status when conflicts with add and rm advice (both deleted)' '\n \ttest_must_fail git merge conflict &&\n-\tcat >expected <<-\\EOF &&\n-\t# On branch conflict_second\n-\t# You have unmerged paths.\n-\t#   (fix conflicts and run \"git commit\")\n-\t#\n-\t# Unmerged paths:\n-\t#   (use \"git add/rm <file>...\" as appropriate to mark resolution)\n-\t#\n-\t#\tboth deleted:       main.txt\n-\t#\tadded by them:      sub_master.txt\n-\t#\tadded by us:        sub_second.txt\n-\t#\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\tEOF\n+\tcat >expected <<\\EOF &&\n+On branch conflict_second\n+You have unmerged paths.\n+  (fix conflicts and run \"git commit\")\n+\n+Unmerged paths:\n+  (use \"git add/rm <file>...\" as appropriate to mark resolution)\n+\n+\tboth deleted:       main.txt\n+\tadded by them:      sub_master.txt\n+\tadded by us:        sub_second.txt\n+\n+no changes added to commit (use \"git add\" and/or \"git commit -a\")\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -196,22 +191,22 @@ test_expect_success 'status when conflicts with only rm advice (both deleted)' '\n \ttest_must_fail git merge conflict &&\n \tgit add sub_master.txt &&\n \tgit add sub_second.txt &&\n-\tcat >expected <<-\\EOF &&\n-\t# On branch conflict_second\n-\t# You have unmerged paths.\n-\t#   (fix conflicts and run \"git commit\")\n-\t#\n-\t# Changes to be committed:\n-\t#\n-\t#\tnew file:   sub_master.txt\n-\t#\n-\t# Unmerged paths:\n-\t#   (use \"git rm <file>...\" to mark resolution)\n-\t#\n-\t#\tboth deleted:       main.txt\n-\t#\n-\t# Untracked files not listed (use -u option to show untracked files)\n-\tEOF\n+\tcat >expected <<\\EOF &&\n+On branch conflict_second\n+You have unmerged paths.\n+  (fix conflicts and run \"git commit\")\n+\n+Changes to be committed:\n+\n+\tnew file:   sub_master.txt\n+\n+Unmerged paths:\n+  (use \"git rm <file>...\" to mark resolution)\n+\n+\tboth deleted:       main.txt\n+\n+Untracked files not listed (use -u option to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual &&\n \tgit reset --hard &&\ndiff --git a/t/t7508-status.sh b/t/t7508-status.sh\nindex 7c0873d..b3fda1b 100755\n--- a/t/t7508-status.sh\n+++ b/t/t7508-status.sh\n@@ -7,10 +7,6 @@ test_description='git status'\n \n . ./test-lib.sh\n \n-test_expect_success 'use status.oldStyle by default ' '\n-\tgit config --global status.oldStyle true\n-'\n-\n test_expect_success 'status -h in broken repository' '\n \tgit config --global advice.statusuoption false &&\n \tmkdir broken &&\n@@ -157,20 +153,20 @@ test_expect_success 'commit ignores status.oldStyle=false in COMMIT_EDITMSG' '\n '\n \n cat >expect <<\\EOF\n-# On branch master\n-# Changes to be committed:\n-#\tnew file:   dir2/added\n-#\n-# Changes not staged for commit:\n-#\tmodified:   dir1/modified\n-#\n-# Untracked files:\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\texpect\n-#\toutput\n-#\tuntracked\n+On branch master\n+Changes to be committed:\n+\tnew file:   dir2/added\n+\n+Changes not staged for commit:\n+\tmodified:   dir1/modified\n+\n+Untracked files:\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n EOF\n \n test_expect_success 'status (advice.statusHints false)' '\n@@ -228,33 +224,33 @@ test_expect_success 'status with gitignore' '\n \tgit status -s --ignored >output &&\n \ttest_cmp expect output &&\n \n-\tcat >expect <<-\\EOF &&\n-\t# On branch master\n-\t# Changes to be committed:\n-\t#   (use \"git reset HEAD <file>...\" to unstage)\n-\t#\n-\t#\tnew file:   dir2/added\n-\t#\n-\t# Changes not staged for commit:\n-\t#   (use \"git add <file>...\" to update what will be committed)\n-\t#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-\t#\n-\t#\tmodified:   dir1/modified\n-\t#\n-\t# Untracked files:\n-\t#   (use \"git add <file>...\" to include in what will be committed)\n-\t#\n-\t#\tdir2/modified\n-\t# Ignored files:\n-\t#   (use \"git add -f <file>...\" to include in what will be committed)\n-\t#\n-\t#\t.gitignore\n-\t#\tdir1/untracked\n-\t#\tdir2/untracked\n-\t#\texpect\n-\t#\toutput\n-\t#\tuntracked\n-\tEOF\n+\tcat >expect <<\\EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tnew file:   dir2/added\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\tdir2/modified\n+Ignored files:\n+  (use \"git add -f <file>...\" to include in what will be committed)\n+\n+\t.gitignore\n+\tdir1/untracked\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \tgit status --ignored >output &&\n \ttest_i18ncmp expect output\n '\n@@ -289,30 +285,30 @@ test_expect_success 'status with gitignore (nothing untracked)' '\n \tgit status -s --ignored >output &&\n \ttest_cmp expect output &&\n \n-\tcat >expect <<-\\EOF &&\n-\t# On branch master\n-\t# Changes to be committed:\n-\t#   (use \"git reset HEAD <file>...\" to unstage)\n-\t#\n-\t#\tnew file:   dir2/added\n-\t#\n-\t# Changes not staged for commit:\n-\t#   (use \"git add <file>...\" to update what will be committed)\n-\t#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-\t#\n-\t#\tmodified:   dir1/modified\n-\t#\n-\t# Ignored files:\n-\t#   (use \"git add -f <file>...\" to include in what will be committed)\n-\t#\n-\t#\t.gitignore\n-\t#\tdir1/untracked\n-\t#\tdir2/modified\n-\t#\tdir2/untracked\n-\t#\texpect\n-\t#\toutput\n-\t#\tuntracked\n-\tEOF\n+\tcat >expect <<\\EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tnew file:   dir2/added\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\n+Ignored files:\n+  (use \"git add -f <file>...\" to include in what will be committed)\n+\n+\t.gitignore\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \tgit status --ignored >output &&\n \ttest_i18ncmp expect output\n '\n@@ -353,22 +349,22 @@ test_expect_success 'setup dir3' '\n \t: >dir3/untracked2\n '\n \n-cat >expect <<EOF\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\tnew file:   dir2/added\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   dir1/modified\n-#\n-# Untracked files not listed (use -u option to show untracked files)\n-EOF\n test_expect_success 'status -uno' '\n+\tcat >expect <<EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tnew file:   dir2/added\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\n+Untracked files not listed (use -u option to show untracked files)\n+EOF\n \tgit status -uno >output &&\n \ttest_i18ncmp expect output\n '\n@@ -379,17 +375,17 @@ test_expect_success 'status (status.showUntrackedFiles no)' '\n \ttest_i18ncmp expect output\n '\n \n-cat >expect <<EOF\n-# On branch master\n-# Changes to be committed:\n-#\tnew file:   dir2/added\n-#\n-# Changes not staged for commit:\n-#\tmodified:   dir1/modified\n-#\n-# Untracked files not listed\n-EOF\n test_expect_success 'status -uno (advice.statusHints false)' '\n+\tcat >expect <<EOF &&\n+On branch master\n+Changes to be committed:\n+\tnew file:   dir2/added\n+\n+Changes not staged for commit:\n+\tmodified:   dir1/modified\n+\n+Untracked files not listed\n+EOF\n \ttest_config advice.statusHints false &&\n \tgit status -uno >output &&\n \ttest_i18ncmp expect output\n@@ -410,31 +406,31 @@ test_expect_success 'status -s (status.showUntrackedFiles no)' '\n \ttest_cmp expect output\n '\n \n-cat >expect <<EOF\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\tnew file:   dir2/added\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   dir1/modified\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\tdir3/\n-#\texpect\n-#\toutput\n-#\tuntracked\n-EOF\n test_expect_success 'status -unormal' '\n+\tcat >expect <<EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tnew file:   dir2/added\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\tdir3/\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \tgit status -unormal >output &&\n \ttest_i18ncmp expect output\n '\n@@ -467,32 +463,32 @@ test_expect_success 'status -s (status.showUntrackedFiles normal)' '\n \ttest_cmp expect output\n '\n \n-cat >expect <<EOF\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\tnew file:   dir2/added\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   dir1/modified\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\tdir3/untracked1\n-#\tdir3/untracked2\n-#\texpect\n-#\toutput\n-#\tuntracked\n-EOF\n test_expect_success 'status -uall' '\n+\tcat >expect <<EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tnew file:   dir2/added\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\tdir3/untracked1\n+\tdir3/untracked2\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \tgit status -uall >output &&\n \ttest_i18ncmp expect output\n '\n@@ -529,31 +525,30 @@ test_expect_success 'status -s (status.showUntrackedFiles all)' '\n \ttest_cmp expect output\n '\n \n-cat >expect <<\\EOF\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\tnew file:   ../dir2/added\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   modified\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\tuntracked\n-#\t../dir2/modified\n-#\t../dir2/untracked\n-#\t../expect\n-#\t../output\n-#\t../untracked\n-EOF\n-\n test_expect_success 'status with relative paths' '\n+\tcat >expect <<\\EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tnew file:   ../dir2/added\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   modified\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\tuntracked\n+\t../dir2/modified\n+\t../dir2/untracked\n+\t../expect\n+\t../output\n+\t../untracked\n+EOF\n \t(cd dir1 && git status) >output &&\n \ttest_i18ncmp expect output\n '\n@@ -600,31 +595,30 @@ test_expect_success 'setup unique colors' '\n \n '\n \n-cat >expect <<\\EOF\n-# On branch <GREEN>master<RESET>\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\t<GREEN>new file:   dir2/added<RESET>\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\t<RED>modified:   dir1/modified<RESET>\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\t<BLUE>dir1/untracked<RESET>\n-#\t<BLUE>dir2/modified<RESET>\n-#\t<BLUE>dir2/untracked<RESET>\n-#\t<BLUE>expect<RESET>\n-#\t<BLUE>output<RESET>\n-#\t<BLUE>untracked<RESET>\n-EOF\n-\n test_expect_success 'status with color.ui' '\n+\tcat >expect <<\\EOF &&\n+On branch <GREEN>master<RESET>\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\t<GREEN>new file:   dir2/added<RESET>\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\t<RED>modified:   dir1/modified<RESET>\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\t<BLUE>dir1/untracked<RESET>\n+\t<BLUE>dir2/modified<RESET>\n+\t<BLUE>dir2/untracked<RESET>\n+\t<BLUE>expect<RESET>\n+\t<BLUE>output<RESET>\n+\t<BLUE>untracked<RESET>\n+EOF\n \ttest_config color.ui always &&\n \tgit status | test_decode_color >output &&\n \ttest_i18ncmp expect output\n@@ -728,33 +722,32 @@ test_expect_success 'status --porcelain respects -b' '\n \n '\n \n-cat >expect <<\\EOF\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\tnew file:   dir2/added\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   dir1/modified\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\texpect\n-#\toutput\n-#\tuntracked\n-EOF\n \n \n test_expect_success 'status without relative paths' '\n+\tcat >expect <<\\EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tnew file:   dir2/added\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n \n+\tmodified:   dir1/modified\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \ttest_config status.relativePaths false &&\n \t(cd dir1 && git status) >output &&\n \ttest_i18ncmp expect output\n@@ -780,23 +773,23 @@ test_expect_success 'status -s without relative paths' '\n \n '\n \n-cat <<EOF >expect\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\tmodified:   dir1/modified\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\tdir1/untracked\n-#\tdir2/\n-#\texpect\n-#\toutput\n-#\tuntracked\n-EOF\n test_expect_success 'dry-run of partial commit excluding new file in index' '\n+\tcat >expect <<EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tmodified:   dir1/modified\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\tdir1/untracked\n+\tdir2/\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \tgit commit --dry-run dir1/modified >output &&\n \ttest_i18ncmp expect output\n '\n@@ -821,31 +814,31 @@ test_expect_success 'setup status submodule summary' '\n \tgit add sm\n '\n \n-cat >expect <<EOF\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\tnew file:   dir2/added\n-#\tnew file:   sm\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   dir1/modified\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\texpect\n-#\toutput\n-#\tuntracked\n-EOF\n test_expect_success 'status submodule summary is disabled by default' '\n+\tcat >expect <<EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tnew file:   dir2/added\n+\tnew file:   sm\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \tgit status >output &&\n \ttest_i18ncmp expect output\n '\n@@ -880,36 +873,36 @@ test_expect_success 'status -s --untracked-files=all does not show submodule' '\n \n head=$(cd sm && git rev-parse --short=7 --verify HEAD)\n \n-cat >expect <<EOF\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\tnew file:   dir2/added\n-#\tnew file:   sm\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   dir1/modified\n-#\n-# Submodule changes to be committed:\n-#\n-# * sm 0000000...$head (1):\n-#   > Add foo\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\texpect\n-#\toutput\n-#\tuntracked\n-EOF\n test_expect_success 'status submodule summary' '\n+\tcat >expect <<EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tnew file:   dir2/added\n+\tnew file:   sm\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\n+Submodule changes to be committed:\n+\n+* sm 0000000...$head (1):\n+  > Add foo\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \tgit config status.submodulesummary 10 &&\n \tgit status >output &&\n \ttest_i18ncmp expect output\n@@ -941,26 +934,26 @@ test_expect_success 'status -s submodule summary' '\n \ttest_cmp expect output\n '\n \n-cat >expect <<EOF\n-# On branch master\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   dir1/modified\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\texpect\n-#\toutput\n-#\tuntracked\n+test_expect_success 'status submodule summary (clean submodule): commit' '\n+\tcat >expect <<EOF &&\n+On branch master\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n no changes added to commit (use \"git add\" and/or \"git commit -a\")\n EOF\n-test_expect_success 'status submodule summary (clean submodule): commit' '\n \tgit commit -m \"commit submodule\" &&\n \tgit config status.submodulesummary 10 &&\n \ttest_must_fail git commit --dry-run >output &&\n@@ -990,36 +983,36 @@ test_expect_success 'status -z implies porcelain' '\n \ttest_cmp expect output\n '\n \n-cat >expect <<EOF\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD^1 <file>...\" to unstage)\n-#\n-#\tnew file:   dir2/added\n-#\tnew file:   sm\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   dir1/modified\n-#\n-# Submodule changes to be committed:\n-#\n-# * sm 0000000...$head (1):\n-#   > Add foo\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\texpect\n-#\toutput\n-#\tuntracked\n-EOF\n test_expect_success 'commit --dry-run submodule summary (--amend)' '\n+\tcat >expect <<EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD^1 <file>...\" to unstage)\n+\n+\tnew file:   dir2/added\n+\tnew file:   sm\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\n+Submodule changes to be committed:\n+\n+* sm 0000000...$head (1):\n+  > Add foo\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \tgit config status.submodulesummary 10 &&\n \tgit commit --dry-run --amend >output &&\n \ttest_i18ncmp expect output\n@@ -1044,37 +1037,36 @@ test_expect_success POSIXPERM,SANITY 'status succeeds in a read-only repository'\n new_head=$(cd sm && git rev-parse --short=7 --verify HEAD)\n touch .gitmodules\n \n-cat > expect << EOF\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\tmodified:   sm\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   dir1/modified\n-#\n-# Submodule changes to be committed:\n-#\n-# * sm $head...$new_head (1):\n-#   > Add bar\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\t.gitmodules\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\texpect\n-#\toutput\n-#\tuntracked\n-EOF\n-\n test_expect_success '--ignore-submodules=untracked suppresses submodules with untracked content' '\n+\tcat > expect << EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tmodified:   sm\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\n+Submodule changes to be committed:\n+\n+* sm $head...$new_head (1):\n+  > Add bar\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\t.gitmodules\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \techo modified  sm/untracked &&\n \tgit status --ignore-submodules=untracked >output &&\n \ttest_i18ncmp expect output\n@@ -1154,39 +1146,38 @@ test_expect_success '.git/config ignore=dirty suppresses submodules with modifie\n \tgit config -f .gitmodules  --remove-section submodule.subname\n '\n \n-cat > expect << EOF\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\tmodified:   sm\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#   (commit or discard the untracked or modified content in submodules)\n-#\n-#\tmodified:   dir1/modified\n-#\tmodified:   sm (modified content)\n-#\n-# Submodule changes to be committed:\n-#\n-# * sm $head...$new_head (1):\n-#   > Add bar\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\t.gitmodules\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\texpect\n-#\toutput\n-#\tuntracked\n-EOF\n-\n test_expect_success \"--ignore-submodules=untracked doesn't suppress submodules with modified content\" '\n+\tcat > expect << EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tmodified:   sm\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+  (commit or discard the untracked or modified content in submodules)\n+\n+\tmodified:   dir1/modified\n+\tmodified:   sm (modified content)\n+\n+Submodule changes to be committed:\n+\n+* sm $head...$new_head (1):\n+  > Add bar\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\t.gitmodules\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \tgit status --ignore-submodules=untracked > output &&\n \ttest_i18ncmp expect output\n '\n@@ -1212,43 +1203,42 @@ test_expect_success \".git/config ignore=untracked doesn't suppress submodules wi\n \n head2=$(cd sm && git commit -q -m \"2nd commit\" foo && git rev-parse --short=7 --verify HEAD)\n \n-cat > expect << EOF\n-# On branch master\n-# Changes to be committed:\n-#   (use \"git reset HEAD <file>...\" to unstage)\n-#\n-#\tmodified:   sm\n-#\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   dir1/modified\n-#\tmodified:   sm (new commits)\n-#\n-# Submodule changes to be committed:\n-#\n-# * sm $head...$new_head (1):\n-#   > Add bar\n-#\n-# Submodules changed but not updated:\n-#\n-# * sm $new_head...$head2 (1):\n-#   > 2nd commit\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\t.gitmodules\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\texpect\n-#\toutput\n-#\tuntracked\n-EOF\n-\n test_expect_success \"--ignore-submodules=untracked doesn't suppress submodule summary\" '\n+\tcat > expect << EOF &&\n+On branch master\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tmodified:   sm\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\tmodified:   sm (new commits)\n+\n+Submodule changes to be committed:\n+\n+* sm $head...$new_head (1):\n+  > Add bar\n+\n+Submodules changed but not updated:\n+\n+* sm $new_head...$head2 (1):\n+  > 2nd commit\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\t.gitmodules\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n+EOF\n \tgit status --ignore-submodules=untracked > output &&\n \ttest_i18ncmp expect output\n '\n@@ -1333,38 +1323,37 @@ EOF\n \n test_expect_success \"status (core.commentchar with submodule summary)\" '\n \ttest_config core.commentchar \";\" &&\n-\tgit status >output &&\n+\tgit -c status.oldStyle=true status >output &&\n \ttest_i18ncmp expect output\n '\n \n test_expect_success \"status (core.commentchar with two chars with submodule summary)\" '\n \ttest_config core.commentchar \";;\" &&\n-\tgit status >output &&\n+\tgit -c status.oldStyle=true status >output &&\n \ttest_i18ncmp expect output\n '\n \n-cat > expect << EOF\n-# On branch master\n-# Changes not staged for commit:\n-#   (use \"git add <file>...\" to update what will be committed)\n-#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-#\n-#\tmodified:   dir1/modified\n-#\n-# Untracked files:\n-#   (use \"git add <file>...\" to include in what will be committed)\n-#\n-#\t.gitmodules\n-#\tdir1/untracked\n-#\tdir2/modified\n-#\tdir2/untracked\n-#\texpect\n-#\toutput\n-#\tuntracked\n+test_expect_success \"--ignore-submodules=all suppresses submodule summary\" '\n+\tcat > expect << EOF &&\n+On branch master\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   dir1/modified\n+\n+Untracked files:\n+  (use \"git add <file>...\" to include in what will be committed)\n+\n+\t.gitmodules\n+\tdir1/untracked\n+\tdir2/modified\n+\tdir2/untracked\n+\texpect\n+\toutput\n+\tuntracked\n no changes added to commit (use \"git add\" and/or \"git commit -a\")\n EOF\n-\n-test_expect_success \"--ignore-submodules=all suppresses submodule summary\" '\n \tgit status --ignore-submodules=all > output &&\n \ttest_i18ncmp expect output\n '\n-- \n1.8.4.4.g70bf5e8.dirty\n"},{"id":"226846","messageId":"vpqioyfwind.fsf@anie.imag.fr","threadId":"34853","inReplyTo":"1378374618-31439-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-09-05T12:35:34Z","receivedAt":"2013-09-05T12:35:34Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Oops, this series forgot to update t7512-status-help.sh, which now\nfails.\n\nI'll send a reroll that updates it later (patch below).\n\ndiff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh\nindex 31a798f..0688d58 100755\n--- a/t/t7512-status-help.sh\n+++ b/t/t7512-status-help.sh\n@@ -25,18 +25,18 @@ test_expect_success 'prepare for conflicts' '\n \n test_expect_success 'status when conflicts unresolved' '\n \ttest_must_fail git merge master &&\n-\tcat >expected <<-\\EOF &&\n-\t# On branch conflicts\n-\t# You have unmerged paths.\n-\t#   (fix conflicts and run \"git commit\")\n-\t#\n-\t# Unmerged paths:\n-\t#   (use \"git add <file>...\" to mark resolution)\n-\t#\n-\t#\tboth modified:      main.txt\n-\t#\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\tEOF\n+\tcat >expected <<\\EOF &&\n+On branch conflicts\n+You have unmerged paths.\n+  (fix conflicts and run \"git commit\")\n+\n+Unmerged paths:\n+  (use \"git add <file>...\" to mark resolution)\n+\n+\tboth modified:      main.txt\n+\n+no changes added to commit (use \"git add\" and/or \"git commit -a\")\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -47,17 +47,17 @@ test_expect_success 'status when conflicts resolved before commit' '\n \ttest_must_fail git merge master &&\n \techo one >main.txt &&\n \tgit add main.txt &&\n-\tcat >expected <<-\\EOF &&\n-\t# On branch conflicts\n-\t# All conflicts fixed but you are still merging.\n-\t#   (use \"git commit\" to conclude merge)\n-\t#\n-\t# Changes to be committed:\n-\t#\n-\t#\tmodified:   main.txt\n-\t#\n-\t# Untracked files not listed (use -u option to show untracked files)\n-\tEOF\n+\tcat >expected <<\\EOF &&\n+On branch conflicts\n+All conflicts fixed but you are still merging.\n+  (use \"git commit\" to conclude merge)\n+\n+Changes to be committed:\n+\n+\tmodified:   main.txt\n+\n+Untracked files not listed (use -u option to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -76,21 +76,21 @@ test_expect_success 'status when rebase in progress before resolving conflicts'\n \ttest_when_finished \"git rebase --abort\" &&\n \tONTO=$(git rev-parse --short HEAD^^) &&\n \ttest_must_fail git rebase HEAD^ --onto HEAD^^ &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently rebasing branch '\\''rebase_conflicts'\\'' on '\\''$ONTO'\\''.\n-\t#   (fix conflicts and then run \"git rebase --continue\")\n-\t#   (use \"git rebase --skip\" to skip this patch)\n-\t#   (use \"git rebase --abort\" to check out the original branch)\n-\t#\n-\t# Unmerged paths:\n-\t#   (use \"git reset HEAD <file>...\" to unstage)\n-\t#   (use \"git add <file>...\" to mark resolution)\n-\t#\n-\t#\tboth modified:      main.txt\n-\t#\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently rebasing branch '\\''rebase_conflicts'\\'' on '\\''$ONTO'\\''.\n+  (fix conflicts and then run \"git rebase --continue\")\n+  (use \"git rebase --skip\" to skip this patch)\n+  (use \"git rebase --abort\" to check out the original branch)\n+\n+Unmerged paths:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+  (use \"git add <file>...\" to mark resolution)\n+\n+\tboth modified:      main.txt\n+\n+no changes added to commit (use \"git add\" and/or \"git commit -a\")\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -103,18 +103,18 @@ test_expect_success 'status when rebase in progress before rebase --continue' '\n \ttest_must_fail git rebase HEAD^ --onto HEAD^^ &&\n \techo three >main.txt &&\n \tgit add main.txt &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently rebasing branch '\\''rebase_conflicts'\\'' on '\\''$ONTO'\\''.\n-\t#   (all conflicts fixed: run \"git rebase --continue\")\n-\t#\n-\t# Changes to be committed:\n-\t#   (use \"git reset HEAD <file>...\" to unstage)\n-\t#\n-\t#\tmodified:   main.txt\n-\t#\n-\t# Untracked files not listed (use -u option to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently rebasing branch '\\''rebase_conflicts'\\'' on '\\''$ONTO'\\''.\n+  (all conflicts fixed: run \"git rebase --continue\")\n+\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tmodified:   main.txt\n+\n+Untracked files not listed (use -u option to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -135,21 +135,21 @@ test_expect_success 'status during rebase -i when conflicts unresolved' '\n \ttest_when_finished \"git rebase --abort\" &&\n \tONTO=$(git rev-parse --short rebase_i_conflicts) &&\n \ttest_must_fail git rebase -i rebase_i_conflicts &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently rebasing branch '\\''rebase_i_conflicts_second'\\'' on '\\''$ONTO'\\''.\n-\t#   (fix conflicts and then run \"git rebase --continue\")\n-\t#   (use \"git rebase --skip\" to skip this patch)\n-\t#   (use \"git rebase --abort\" to check out the original branch)\n-\t#\n-\t# Unmerged paths:\n-\t#   (use \"git reset HEAD <file>...\" to unstage)\n-\t#   (use \"git add <file>...\" to mark resolution)\n-\t#\n-\t#\tboth modified:      main.txt\n-\t#\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently rebasing branch '\\''rebase_i_conflicts_second'\\'' on '\\''$ONTO'\\''.\n+  (fix conflicts and then run \"git rebase --continue\")\n+  (use \"git rebase --skip\" to skip this patch)\n+  (use \"git rebase --abort\" to check out the original branch)\n+\n+Unmerged paths:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+  (use \"git add <file>...\" to mark resolution)\n+\n+\tboth modified:      main.txt\n+\n+no changes added to commit (use \"git add\" and/or \"git commit -a\")\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -161,18 +161,18 @@ test_expect_success 'status during rebase -i after resolving conflicts' '\n \tONTO=$(git rev-parse --short rebase_i_conflicts) &&\n \ttest_must_fail git rebase -i rebase_i_conflicts &&\n \tgit add main.txt &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently rebasing branch '\\''rebase_i_conflicts_second'\\'' on '\\''$ONTO'\\''.\n-\t#   (all conflicts fixed: run \"git rebase --continue\")\n-\t#\n-\t# Changes to be committed:\n-\t#   (use \"git reset HEAD <file>...\" to unstage)\n-\t#\n-\t#\tmodified:   main.txt\n-\t#\n-\t# Untracked files not listed (use -u option to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently rebasing branch '\\''rebase_i_conflicts_second'\\'' on '\\''$ONTO'\\''.\n+  (all conflicts fixed: run \"git rebase --continue\")\n+\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tmodified:   main.txt\n+\n+Untracked files not listed (use -u option to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -189,14 +189,14 @@ test_expect_success 'status when rebasing -i in edit mode' '\n \ttest_when_finished \"git rebase --abort\" &&\n \tONTO=$(git rev-parse --short HEAD~2) &&\n \tgit rebase -i HEAD~2 &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently editing a commit while rebasing branch '\\''rebase_i_edit'\\'' on '\\''$ONTO'\\''.\n-\t#   (use \"git commit --amend\" to amend the current commit)\n-\t#   (use \"git rebase --continue\" once you are satisfied with your changes)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently editing a commit while rebasing branch '\\''rebase_i_edit'\\'' on '\\''$ONTO'\\''.\n+  (use \"git commit --amend\" to amend the current commit)\n+  (use \"git rebase --continue\" once you are satisfied with your changes)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -215,19 +215,19 @@ test_expect_success 'status when splitting a commit' '\n \tONTO=$(git rev-parse --short HEAD~3) &&\n \tgit rebase -i HEAD~3 &&\n \tgit reset HEAD^ &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently splitting a commit while rebasing branch '\\''split_commit'\\'' on '\\''$ONTO'\\''.\n-\t#   (Once your working directory is clean, run \"git rebase --continue\")\n-\t#\n-\t# Changes not staged for commit:\n-\t#   (use \"git add <file>...\" to update what will be committed)\n-\t#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-\t#\n-\t#\tmodified:   main.txt\n-\t#\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently splitting a commit while rebasing branch '\\''split_commit'\\'' on '\\''$ONTO'\\''.\n+  (Once your working directory is clean, run \"git rebase --continue\")\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   main.txt\n+\n+no changes added to commit (use \"git add\" and/or \"git commit -a\")\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -246,14 +246,14 @@ test_expect_success 'status after editing the last commit with --amend during a\n \tONTO=$(git rev-parse --short HEAD~3) &&\n \tgit rebase -i HEAD~3 &&\n \tgit commit --amend -m \"foo\" &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently editing a commit while rebasing branch '\\''amend_last'\\'' on '\\''$ONTO'\\''.\n-\t#   (use \"git commit --amend\" to amend the current commit)\n-\t#   (use \"git rebase --continue\" once you are satisfied with your changes)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently editing a commit while rebasing branch '\\''amend_last'\\'' on '\\''$ONTO'\\''.\n+  (use \"git commit --amend\" to amend the current commit)\n+  (use \"git rebase --continue\" once you are satisfied with your changes)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -276,14 +276,14 @@ test_expect_success 'status: (continue first edit) second edit' '\n \tONTO=$(git rev-parse --short HEAD~3) &&\n \tgit rebase -i HEAD~3 &&\n \tgit rebase --continue &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n-\t#   (use \"git commit --amend\" to amend the current commit)\n-\t#   (use \"git rebase --continue\" once you are satisfied with your changes)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n+  (use \"git commit --amend\" to amend the current commit)\n+  (use \"git rebase --continue\" once you are satisfied with your changes)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -298,19 +298,19 @@ test_expect_success 'status: (continue first edit) second edit and split' '\n \tgit rebase -i HEAD~3 &&\n \tgit rebase --continue &&\n \tgit reset HEAD^ &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n-\t#   (Once your working directory is clean, run \"git rebase --continue\")\n-\t#\n-\t# Changes not staged for commit:\n-\t#   (use \"git add <file>...\" to update what will be committed)\n-\t#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-\t#\n-\t#\tmodified:   main.txt\n-\t#\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n+  (Once your working directory is clean, run \"git rebase --continue\")\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   main.txt\n+\n+no changes added to commit (use \"git add\" and/or \"git commit -a\")\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -325,14 +325,14 @@ test_expect_success 'status: (continue first edit) second edit and amend' '\n \tgit rebase -i HEAD~3 &&\n \tgit rebase --continue &&\n \tgit commit --amend -m \"foo\" &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n-\t#   (use \"git commit --amend\" to amend the current commit)\n-\t#   (use \"git rebase --continue\" once you are satisfied with your changes)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n+  (use \"git commit --amend\" to amend the current commit)\n+  (use \"git rebase --continue\" once you are satisfied with your changes)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -347,14 +347,14 @@ test_expect_success 'status: (amend first edit) second edit' '\n \tgit rebase -i HEAD~3 &&\n \tgit commit --amend -m \"a\" &&\n \tgit rebase --continue &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n-\t#   (use \"git commit --amend\" to amend the current commit)\n-\t#   (use \"git rebase --continue\" once you are satisfied with your changes)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n+  (use \"git commit --amend\" to amend the current commit)\n+  (use \"git rebase --continue\" once you are satisfied with your changes)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -370,19 +370,19 @@ test_expect_success 'status: (amend first edit) second edit and split' '\n \tgit commit --amend -m \"b\" &&\n \tgit rebase --continue &&\n \tgit reset HEAD^ &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n-\t#   (Once your working directory is clean, run \"git rebase --continue\")\n-\t#\n-\t# Changes not staged for commit:\n-\t#   (use \"git add <file>...\" to update what will be committed)\n-\t#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-\t#\n-\t#\tmodified:   main.txt\n-\t#\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n+  (Once your working directory is clean, run \"git rebase --continue\")\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   main.txt\n+\n+no changes added to commit (use \"git add\" and/or \"git commit -a\")\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -398,14 +398,14 @@ test_expect_success 'status: (amend first edit) second edit and amend' '\n \tgit commit --amend -m \"c\" &&\n \tgit rebase --continue &&\n \tgit commit --amend -m \"d\" &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n-\t#   (use \"git commit --amend\" to amend the current commit)\n-\t#   (use \"git rebase --continue\" once you are satisfied with your changes)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n+  (use \"git commit --amend\" to amend the current commit)\n+  (use \"git rebase --continue\" once you are satisfied with your changes)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -422,14 +422,14 @@ test_expect_success 'status: (split first edit) second edit' '\n \tgit add main.txt &&\n \tgit commit -m \"e\" &&\n \tgit rebase --continue &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n-\t#   (use \"git commit --amend\" to amend the current commit)\n-\t#   (use \"git rebase --continue\" once you are satisfied with your changes)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n+  (use \"git commit --amend\" to amend the current commit)\n+  (use \"git rebase --continue\" once you are satisfied with your changes)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -447,19 +447,19 @@ test_expect_success 'status: (split first edit) second edit and split' '\n \tgit commit --amend -m \"f\" &&\n \tgit rebase --continue &&\n \tgit reset HEAD^ &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n-\t#   (Once your working directory is clean, run \"git rebase --continue\")\n-\t#\n-\t# Changes not staged for commit:\n-\t#   (use \"git add <file>...\" to update what will be committed)\n-\t#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n-\t#\n-\t#\tmodified:   main.txt\n-\t#\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n+  (Once your working directory is clean, run \"git rebase --continue\")\n+\n+Changes not staged for commit:\n+  (use \"git add <file>...\" to update what will be committed)\n+  (use \"git checkout -- <file>...\" to discard changes in working directory)\n+\n+\tmodified:   main.txt\n+\n+no changes added to commit (use \"git add\" and/or \"git commit -a\")\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -477,14 +477,14 @@ test_expect_success 'status: (split first edit) second edit and amend' '\n \tgit commit --amend -m \"g\" &&\n \tgit rebase --continue &&\n \tgit commit --amend -m \"h\" &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n-\t#   (use \"git commit --amend\" to amend the current commit)\n-\t#   (use \"git rebase --continue\" once you are satisfied with your changes)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n+  (use \"git commit --amend\" to amend the current commit)\n+  (use \"git rebase --continue\" once you are satisfied with your changes)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -504,15 +504,15 @@ test_expect_success 'status in an am session: file already exists' '\n \ttest_when_finished \"rm Maildir/* && git am --abort\" &&\n \tgit format-patch -1 -oMaildir &&\n \ttest_must_fail git am Maildir/*.patch &&\n-\tcat >expected <<-\\EOF &&\n-\t# On branch am_already_exists\n-\t# You are in the middle of an am session.\n-\t#   (fix conflicts and then run \"git am --continue\")\n-\t#   (use \"git am --skip\" to skip this patch)\n-\t#   (use \"git am --abort\" to restore the original branch)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<\\EOF &&\n+On branch am_already_exists\n+You are in the middle of an am session.\n+  (fix conflicts and then run \"git am --continue\")\n+  (use \"git am --skip\" to skip this patch)\n+  (use \"git am --abort\" to restore the original branch)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -526,15 +526,15 @@ test_expect_success 'status in an am session: file does not exist' '\n \ttest_when_finished \"rm Maildir/* && git am --abort\" &&\n \tgit format-patch -1 -oMaildir &&\n \ttest_must_fail git am Maildir/*.patch &&\n-\tcat >expected <<-\\EOF &&\n-\t# On branch am_not_exists\n-\t# You are in the middle of an am session.\n-\t#   (fix conflicts and then run \"git am --continue\")\n-\t#   (use \"git am --skip\" to skip this patch)\n-\t#   (use \"git am --abort\" to restore the original branch)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<\\EOF &&\n+On branch am_not_exists\n+You are in the middle of an am session.\n+  (fix conflicts and then run \"git am --continue\")\n+  (use \"git am --skip\" to skip this patch)\n+  (use \"git am --abort\" to restore the original branch)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -549,15 +549,15 @@ test_expect_success 'status in an am session: empty patch' '\n \tgit commit -m \"delete all am_empty\" &&\n \techo error >Maildir/0002-two_am.patch &&\n \ttest_must_fail git am Maildir/*.patch &&\n-\tcat >expected <<-\\EOF &&\n-\t# On branch am_empty\n-\t# You are in the middle of an am session.\n-\t# The current patch is empty.\n-\t#   (use \"git am --skip\" to skip this patch)\n-\t#   (use \"git am --abort\" to restore the original branch)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<\\EOF &&\n+On branch am_empty\n+You are in the middle of an am session.\n+The current patch is empty.\n+  (use \"git am --skip\" to skip this patch)\n+  (use \"git am --abort\" to restore the original branch)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -574,13 +574,13 @@ test_expect_success 'status when bisecting' '\n \tgit bisect bad &&\n \tgit bisect good one_bisect &&\n \tTGT=$(git rev-parse --short two_bisect) &&\n-\tcat >expected <<-EOF &&\n-\t# HEAD detached at $TGT\n-\t# You are currently bisecting, started from branch '\\''bisect'\\''.\n-\t#   (use \"git bisect reset\" to get back to the original branch)\n-\t#\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF &&\n+HEAD detached at $TGT\n+You are currently bisecting, started from branch '\\''bisect'\\''.\n+  (use \"git bisect reset\" to get back to the original branch)\n+\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -597,15 +597,15 @@ test_expect_success 'status when rebase conflicts with statushints disabled' '\n \ttest_when_finished \"git rebase --abort\" &&\n \tONTO=$(git rev-parse --short HEAD^^) &&\n \ttest_must_fail git rebase HEAD^ --onto HEAD^^ &&\n-\tcat >expected <<-EOF &&\n-\t# rebase in progress; onto $ONTO\n-\t# You are currently rebasing branch '\\''statushints_disabled'\\'' on '\\''$ONTO'\\''.\n-\t#\n-\t# Unmerged paths:\n-\t#\tboth modified:      main.txt\n-\t#\n-\tno changes added to commit\n-\tEOF\n+\tcat >expected <<EOF &&\n+rebase in progress; onto $ONTO\n+You are currently rebasing branch '\\''statushints_disabled'\\'' on '\\''$ONTO'\\''.\n+\n+Unmerged paths:\n+\tboth modified:      main.txt\n+\n+no changes added to commit\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -626,19 +626,19 @@ test_expect_success 'prepare for cherry-pick conflicts' '\n test_expect_success 'status when cherry-picking before resolving conflicts' '\n \ttest_when_finished \"git cherry-pick --abort\" &&\n \ttest_must_fail git cherry-pick cherry_branch_second &&\n-\tcat >expected <<-\\EOF &&\n-\t# On branch cherry_branch\n-\t# You are currently cherry-picking.\n-\t#   (fix conflicts and run \"git cherry-pick --continue\")\n-\t#   (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n-\t#\n-\t# Unmerged paths:\n-\t#   (use \"git add <file>...\" to mark resolution)\n-\t#\n-\t#\tboth modified:      main.txt\n-\t#\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\tEOF\n+\tcat >expected <<\\EOF &&\n+On branch cherry_branch\n+You are currently cherry-picking.\n+  (fix conflicts and run \"git cherry-pick --continue\")\n+  (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n+\n+Unmerged paths:\n+  (use \"git add <file>...\" to mark resolution)\n+\n+\tboth modified:      main.txt\n+\n+no changes added to commit (use \"git add\" and/or \"git commit -a\")\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -650,18 +650,18 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '\n \ttest_must_fail git cherry-pick cherry_branch_second &&\n \techo end >main.txt &&\n \tgit add main.txt &&\n-\tcat >expected <<-\\EOF &&\n-\t# On branch cherry_branch\n-\t# You are currently cherry-picking.\n-\t#   (all conflicts fixed: run \"git cherry-pick --continue\")\n-\t#   (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n-\t#\n-\t# Changes to be committed:\n-\t#\n-\t#\tmodified:   main.txt\n-\t#\n-\t# Untracked files not listed (use -u option to show untracked files)\n-\tEOF\n+\tcat >expected <<\\EOF &&\n+On branch cherry_branch\n+You are currently cherry-picking.\n+  (all conflicts fixed: run \"git cherry-pick --continue\")\n+  (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n+\n+Changes to be committed:\n+\n+\tmodified:   main.txt\n+\n+Untracked files not listed (use -u option to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -669,18 +669,18 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '\n test_expect_success 'status showing detached at and from a tag' '\n \ttest_commit atag tagging &&\n \tgit checkout atag &&\n-\tcat >expected <<-\\EOF\n-\t# HEAD detached at atag\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<\\EOF\n+HEAD detached at atag\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual &&\n \n \tgit reset --hard HEAD^ &&\n-\tcat >expected <<-\\EOF\n-\t# HEAD detached from atag\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<\\EOF\n+HEAD detached from atag\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -695,20 +695,20 @@ test_expect_success 'status while reverting commit (conflicts)' '\n \ttest_commit new to-revert.txt &&\n \tTO_REVERT=$(git rev-parse --short HEAD^) &&\n \ttest_must_fail git revert $TO_REVERT &&\n-\tcat >expected <<-EOF\n-\t# On branch master\n-\t# You are currently reverting commit $TO_REVERT.\n-\t#   (fix conflicts and run \"git revert --continue\")\n-\t#   (use \"git revert --abort\" to cancel the revert operation)\n-\t#\n-\t# Unmerged paths:\n-\t#   (use \"git reset HEAD <file>...\" to unstage)\n-\t#   (use \"git add <file>...\" to mark resolution)\n-\t#\n-\t#\tboth modified:      to-revert.txt\n-\t#\n-\tno changes added to commit (use \"git add\" and/or \"git commit -a\")\n-\tEOF\n+\tcat >expected <<EOF\n+On branch master\n+You are currently reverting commit $TO_REVERT.\n+  (fix conflicts and run \"git revert --continue\")\n+  (use \"git revert --abort\" to cancel the revert operation)\n+\n+Unmerged paths:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+  (use \"git add <file>...\" to mark resolution)\n+\n+\tboth modified:      to-revert.txt\n+\n+no changes added to commit (use \"git add\" and/or \"git commit -a\")\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n@@ -716,29 +716,29 @@ test_expect_success 'status while reverting commit (conflicts)' '\n test_expect_success 'status while reverting commit (conflicts resolved)' '\n \techo reverted >to-revert.txt &&\n \tgit add to-revert.txt &&\n-\tcat >expected <<-EOF\n-\t# On branch master\n-\t# You are currently reverting commit $TO_REVERT.\n-\t#   (all conflicts fixed: run \"git revert --continue\")\n-\t#   (use \"git revert --abort\" to cancel the revert operation)\n-\t#\n-\t# Changes to be committed:\n-\t#   (use \"git reset HEAD <file>...\" to unstage)\n-\t#\n-\t#\tmodified:   to-revert.txt\n-\t#\n-\t# Untracked files not listed (use -u option to show untracked files)\n-\tEOF\n+\tcat >expected <<EOF\n+On branch master\n+You are currently reverting commit $TO_REVERT.\n+  (all conflicts fixed: run \"git revert --continue\")\n+  (use \"git revert --abort\" to cancel the revert operation)\n+\n+Changes to be committed:\n+  (use \"git reset HEAD <file>...\" to unstage)\n+\n+\tmodified:   to-revert.txt\n+\n+Untracked files not listed (use -u option to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n \n test_expect_success 'status after reverting commit' '\n \tgit revert --continue &&\n-\tcat >expected <<-\\EOF\n-\t# On branch master\n-\tnothing to commit (use -u to show untracked files)\n-\tEOF\n+\tcat >expected <<\\EOF\n+On branch master\n+nothing to commit (use -u to show untracked files)\n+EOF\n \tgit status --untracked-files=no >actual &&\n \ttest_i18ncmp expected actual\n '\n\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"226873","messageId":"xmqqhadzhyjb.fsf@gitster.dls.corp.google.com","threadId":"34853","inReplyTo":"1378374618-31439-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-09-05T19:13:44Z","receivedAt":"2013-09-05T19:13:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@imag.fr> writes:\n\n> Compared to v2, this changes essentially:\n>\n> * The prefix is actually disabled by default in this version. As a\n>   consequence, the option is renamed to status.oldStyle.\n>\n> * Since this is the default, the tests are updated to test the new\n>   defaults. In a first patch, I'm setting status.oldStyle=true in test\n>   files that require it (to keep the patch short), and the last patch\n>   actually updates the test expected results. This was actually useful\n>   as I did find (and fix) a few bugs updating the tests:\n>\n>   - the --columns option was still showing the comment prefix\n>\n>   - \"git commit --dry-run\" and failed \"git commit\" were still\n>     displaying comments to stdout.\n>\n> * The --for-status option is kept as a no-op.\n\nMuch nicer.  Will replace and queue.\n\nOne caveat, though.  The name \"oldStyle\" will become problematic,\nwhen we want to remove some wart in the output format long after\nthis \"no comment prefix by default\" series lands.  Some people may\nexpect setting oldStyle=true would give output from 1.8.4 era, while\nsome others would expect that it would give output from 1.8.5 era\nthat does not have comment prefix but still has that wart we will\nremove down the line.\n\nIt is a common mistake to make to think that one is making the final\nchange to the code and the result of that final change will stay the\nlatest forever.  I am sure I've done that for a few times and later\nregretted them.\n"},{"id":"226878","messageId":"vpqioyfukkw.fsf@anie.imag.fr","threadId":"34853","inReplyTo":"xmqqhadzhyjb.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-09-05T19:36:47Z","receivedAt":"2013-09-05T19:36:47Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> One caveat, though.  The name \"oldStyle\" will become problematic,\n> when we want to remove some wart in the output format long after\n> this \"no comment prefix by default\" series lands.  Some people may\n> expect setting oldStyle=true would give output from 1.8.4 era, while\n> some others would expect that it would give output from 1.8.5 era\n> that does not have comment prefix but still has that wart we will\n> remove down the line.\n\nI'm fine with any name actually (since it is enabled by default, people\ndon't need to know the name to benefit from the new output). Maybe\nstatus.displayCommentPrefix was the best name after all.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"226890","messageId":"xmqqsixig91j.fsf@gitster.dls.corp.google.com","threadId":"34853","inReplyTo":"vpqioyfukkw.fsf@anie.imag.fr","subject":"Re: [PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-09-05T23:09:44Z","receivedAt":"2013-09-05T23:09:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> One caveat, though.  The name \"oldStyle\" will become problematic,\n>> when we want to remove some wart in the output format long after\n>> this \"no comment prefix by default\" series lands.  Some people may\n>> expect setting oldStyle=true would give output from 1.8.4 era, while\n>> some others would expect that it would give output from 1.8.5 era\n>> that does not have comment prefix but still has that wart we will\n>> remove down the line.\n>\n> I'm fine with any name actually (since it is enabled by default, people\n> don't need to know the name to benefit from the new output). Maybe\n> status.displayCommentPrefix was the best name after all.\n\nYeah, I think so.  It makes it clear what kind of old behaviour the\nuser is asking for.\n"},{"id":"226893","messageId":"20130905232322.GB29351@sigill.intra.peff.net","threadId":"34853","inReplyTo":"vpqioyfukkw.fsf@anie.imag.fr","subject":"Re: [PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-09-05T23:23:22Z","receivedAt":"2013-09-05T23:23:22Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Sep 05, 2013 at 09:36:47PM +0200, Matthieu Moy wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> > One caveat, though.  The name \"oldStyle\" will become problematic,\n> > when we want to remove some wart in the output format long after\n> > this \"no comment prefix by default\" series lands.  Some people may\n> > expect setting oldStyle=true would give output from 1.8.4 era, while\n> > some others would expect that it would give output from 1.8.5 era\n> > that does not have comment prefix but still has that wart we will\n> > remove down the line.\n> \n> I'm fine with any name actually (since it is enabled by default, people\n> don't need to know the name to benefit from the new output). Maybe\n> status.displayCommentPrefix was the best name after all.\n\nFWIW, I had the same thought as Junio. I much prefer something like\nstatus.displayCommentPrefix for clarity and future-proofing.\n\nAs for the feature itself, I am still undecided whether I like it. I've\ntried looking at the output of the series, and it feels weird to me.\n\nPart of it is undoubtedly that my brain is simply used to the other way.\nBut it also seems to drop some of the vertical whitespace, which makes\nthings feel very crowded. E.g., before:\n\n  # On branch private\n  # Your branch and 'origin/next' have diverged,\n  # and have 472 and 59 different commits each, respectively.\n  #\n  # Untracked files:\n  #       t/foo\n  #       test-obj-pool\n  #       test-string-pool\n  #       test-treap\n  #       test-url-normalize\n  nothing added to commit but untracked files present\n\nafter:\n\n  On branch private\n  Your branch and 'origin/next' have diverged,\n  and have 472 and 59 different commits each, respectively.\n  Untracked files:\n          t/foo\n          test-obj-pool\n          test-string-pool\n          test-treap\n          test-url-normalize\n  nothing added to commit but untracked files present\n\nThe blank before \"Untracked files\" was dropped (was this intentional? I\ndidn't see any note of it in the discussion), and the bottom \"nothing\nadded\" line butts against the untracked list more obviously, because\nthey now all have the same comment indentation.\n\nI wonder if it would look a little nicer as:\n\n  On branch private\n  Your branch and 'origin/next' have diverged,\n  and have 472 and 59 different commits each, respectively.\n\n  Untracked files:\n          t/foo\n          test-obj-pool\n          test-string-pool\n          test-treap\n          test-url-normalize\n\n  nothing added to commit but untracked files present\n\nAs an orthogonal thing to your patch, I feel like the first two items\n(branch and ahead/behind) are kind of squished and oddly formatted (in\nboth the original and yours). Could we do something like:\n\n  Your branch 'private' and its upstream 'origin/next' have diverged,\n  and have 472 and 59 different commits each, respectively.\n\nwhen we are going to print both?  That's 69 characters, which might\noverrun 80 if you have long branch names, but we could also line-break\nit differently.\n\nThat doesn't need to be part of your topic, but while we are talking\nabout the format of the message, maybe it is worth thinking about.\n\n-Peff\n"},{"id":"226952","messageId":"vpqwqmtsxw7.fsf@anie.imag.fr","threadId":"34853","inReplyTo":"20130905232322.GB29351@sigill.intra.peff.net","subject":"Re: [PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-09-06T16:44:24Z","receivedAt":"2013-09-06T16:44:24Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jeff King <peff@peff.net> writes:\n\n>   # and have 472 and 59 different commits each, respectively.\n>   #\n>   # Untracked files:\n[...]\n>   and have 472 and 59 different commits each, respectively.\n>   Untracked files:\n\nIndeed, I forgot the else branch in wt_status_print_tracking:\n\n\tif (s->display_comment_char)\n\t\tcolor_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), \"%c\",\n\t\t\t\t comment_line_char);\n\telse\n\t\tfprintf_ln(s->fp, \"\");\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"226953","messageId":"20130906165330.GA6462@google.com","threadId":"34853","inReplyTo":"20130905232322.GB29351@sigill.intra.peff.net","subject":"Re: [PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-09-06T16:53:30Z","receivedAt":"2013-09-06T16:53:30Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jeff King wrote:\n> On Thu, Sep 05, 2013 at 09:36:47PM +0200, Matthieu Moy wrote:\n\n>> I'm fine with any name actually (since it is enabled by default, people\n>> don't need to know the name to benefit from the new output). Maybe\n>> status.displayCommentPrefix was the best name after all.\n>\n> FWIW, I had the same thought as Junio. I much prefer something like\n> status.displayCommentPrefix for clarity and future-proofing.\n\nSounds fine, but I don't understand why we'd want this to be an option\nwith a future in the first place.  Why not just fix the remaining bugs\nbefore merging to master and make it unconditional?\n\n[...]\n> after:\n>\n>   On branch private\n>   Your branch and 'origin/next' have diverged,\n>   and have 472 and 59 different commits each, respectively.\n>   Untracked files:\n>           t/foo\n>           test-obj-pool\n>           test-string-pool\n>           test-treap\n>           test-url-normalize\n>   nothing added to commit but untracked files present\n>\n> The blank before \"Untracked files\" was dropped (was this intentional? I\n> didn't see any note of it in the discussion),\n\nThat's a bug.\n\n>                                               and the bottom \"nothing\n> added\" line butts against the untracked list more obviously, because\n> they now all have the same comment indentation.\n>\n> I wonder if it would look a little nicer as:\n>\n>   On branch private\n>   Your branch and 'origin/next' have diverged,\n>   and have 472 and 59 different commits each, respectively.\n>\n>   Untracked files:\n>           t/foo\n>           test-obj-pool\n>           test-string-pool\n>           test-treap\n>           test-url-normalize\n>\n>   nothing added to commit but untracked files present\n\nThe added blank line before \"nothing added\" sounds like a good idea.\n\nThanks,\nJonathan\n"},{"id":"226957","messageId":"vpq38phsvuc.fsf@anie.imag.fr","threadId":"34853","inReplyTo":"20130906165330.GA6462@google.com","subject":"Re: [PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-09-06T17:28:43Z","receivedAt":"2013-09-06T17:28:43Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Jeff King wrote:\n>> On Thu, Sep 05, 2013 at 09:36:47PM +0200, Matthieu Moy wrote:\n>\n>>> I'm fine with any name actually (since it is enabled by default, people\n>>> don't need to know the name to benefit from the new output). Maybe\n>>> status.displayCommentPrefix was the best name after all.\n>>\n>> FWIW, I had the same thought as Junio. I much prefer something like\n>> status.displayCommentPrefix for clarity and future-proofing.\n>\n> Sounds fine, but I don't understand why we'd want this to be an option\n> with a future in the first place.  Why not just fix the remaining bugs\n> before merging to master and make it unconditional?\n\nI think some old-time users may appreciate to have a\nbackward-compatibility option. It doesn't cost much for us, as we need\nthe variable internally (to use the prefix in COMMIT_EDITMSG, and not on\nstdout), and it actually makes it easier to test.\n\n>>                                               and the bottom \"nothing\n>> added\" line butts against the untracked list more obviously, because\n>> they now all have the same comment indentation.\n>>\n>> I wonder if it would look a little nicer as:\n>>\n>>   On branch private\n>>   Your branch and 'origin/next' have diverged,\n>>   and have 472 and 59 different commits each, respectively.\n>>\n>>   Untracked files:\n>>           t/foo\n>>           test-obj-pool\n>>           test-string-pool\n>>           test-treap\n>>           test-url-normalize\n>>\n>>   nothing added to commit but untracked files present\n>\n> The added blank line before \"nothing added\" sounds like a good idea.\n\nI won't change the header part in this topic (no time, sorry), but the\nmissing newline before \"nothing added\" actually sounds like a bug, as\nthere is normally a newline after each list of file in `git status`,\nexcept untracked and ignored.\n\nI'll fix it as a separate patch in the next round.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"226970","messageId":"xmqqk3ityg2x.fsf@gitster.dls.corp.google.com","threadId":"34853","inReplyTo":"vpq38phsvuc.fsf@anie.imag.fr","subject":"Re: [PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-09-06T18:12:38Z","receivedAt":"2013-09-06T18:12:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n>>>   Untracked files:\n>>>           t/foo\n>>>           test-obj-pool\n>>>           test-string-pool\n>>>           test-treap\n>>>           test-url-normalize\n>>>\n>>>   nothing added to commit but untracked files present\n>>\n>> The added blank line before \"nothing added\" sounds like a good idea.\n>\n> I won't change the header part in this topic (no time, sorry), but the\n> missing newline before \"nothing added\" actually sounds like a bug, as\n> there is normally a newline after each list of file in `git status`,\n> except untracked and ignored.\n\nActually, \"nothing added ...\" is not a part of status proper; it\nwill be clear if you run the command with comment prefix, whose\noutput may end like so:\n\n    # Untracked files:\n    #   (use \"git add <file>...\" to include in what will be committed)\n    #\n    #       gomi\n    #       kuzu\n    nothing added to commit but untracked files present (use \"git add\" to track)\n\nBut I agree that the output without comment prefix needs an extra\nblank before that line (if that line will be emitted, that is).\n"},{"id":"226975","messageId":"vpqsixhrdsg.fsf@anie.imag.fr","threadId":"34853","inReplyTo":"xmqqk3ityg2x.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-09-06T18:43:59Z","receivedAt":"2013-09-06T18:43:59Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Actually, \"nothing added ...\" is not a part of status proper; it\n> will be clear if you run the command with comment prefix, whose\n> output may end like so:\n>\n>     # Untracked files:\n>     #   (use \"git add <file>...\" to include in what will be committed)\n>     #\n>     #       gomi\n>     #       kuzu\n>     nothing added to commit but untracked files present (use \"git add\" to track)\n>\n> But I agree that the output without comment prefix needs an extra\n> blank before that line (if that line will be emitted, that is).\n\nEven when the line is not emitted, we normally do:\n\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#\tmodified:   foo.txt\n#\n\n(with the last #-only line), so there's no reason to behave differently\nwhen the last lines are \"Untracked files\".\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"226993","messageId":"20130906215509.GA13319@sigill.intra.peff.net","threadId":"34853","inReplyTo":"vpq38phsvuc.fsf@anie.imag.fr","subject":"Re: [PATCH v4 0/5] Disable \"git status\" comment prefix","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-09-06T21:55:10Z","receivedAt":"2013-09-06T21:55:10Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Sep 06, 2013 at 07:28:43PM +0200, Matthieu Moy wrote:\n\n> >> FWIW, I had the same thought as Junio. I much prefer something like\n> >> status.displayCommentPrefix for clarity and future-proofing.\n> >\n> > Sounds fine, but I don't understand why we'd want this to be an option\n> > with a future in the first place.  Why not just fix the remaining bugs\n> > before merging to master and make it unconditional?\n> \n> I think some old-time users may appreciate to have a\n> backward-compatibility option. It doesn't cost much for us, as we need\n> the variable internally (to use the prefix in COMMIT_EDITMSG, and not on\n> stdout), and it actually makes it easier to test.\n\nExactly. I kind of prefer the old output, though it is probably just\nhaving my brain rotted from seeing it so much. I'm going to give the new\nbehavior a try for a while to see if I adjust, but ultimately I'd like\nto have the escape hatch. And as you say, it doesn't cost much, since we\nhave to keep both code paths anyway.\n\n> I won't change the header part in this topic (no time, sorry), but the\n> missing newline before \"nothing added\" actually sounds like a bug, as\n> there is normally a newline after each list of file in `git status`,\n> except untracked and ignored.\n> \n> I'll fix it as a separate patch in the next round.\n\nThanks for looking into it.\n\n-Peff\n"}]}