{"thread":{"id":"56807","subject":"[PATCH 0/4] Flag to add a newline after decorations for --oneline log output","startedAt":"2021-10-29T21:15:32Z","lastAt":"2021-11-21T01:19:38Z","messageCount":7,"participants":["John Cai via GitGitGadget","Christian Couder","John Cai"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"440074","messageId":"pull.1065.git.1635542128.gitgitgadget@gmail.com","threadId":"56807","inReplyTo":null,"subject":"[PATCH 0/4] Flag to add a newline after decorations for --oneline log output","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-10-29T21:15:23Z","receivedAt":"2021-10-29T21:15:32Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"Add a flag --newlineafter to be able to pass in \"decorations\" to enable a\nnicer format for the --oneline output so the commit subjects are aligned\nwhen decorations are printed.\n\n0b96396ef5ff7a3a01e137b3735893c970759dfa (HEAD -> jc/two-line-pretty-decoration, john-cai/jc/two-line-pretty-decoration)\n                                         Improve UX for oneline with decorations\ne9e5ba39a78c8f5057262d49e261b42a8660d5b9 (origin/master, origin/HEAD, master)\n                                         The fifteenth batch\nc6fc44e9bf85dc02f6d33b11d9b5d1e10711d125 Merge branch 'ab/test-lib-diff-cleanup'\n63ec2297d26155adb0e38745bf2284cd663add8e Merge branch 'ab/fix-make-lint-docs'\n\n\noriginal thread in\nhttps://lore.kernel.org/git/CA+55aFwT2HUBzZO8Gpt9tHoJtdRxv9oe3TDoSH5jcEOixRNBXg@mail.gmail.com/T/#t\n\nJohn Cai (4):\n  oneline: parse --newlineafter flag\n  oneline: print newline after decorations if flag provided\n  oneline: test for --newlineafter feature\n  doc: add docs for newlineafter flag\n\n Documentation/pretty-options.txt |  4 ++++\n builtin/log.c                    | 25 +++++++++++++++++++++++++\n log-tree.c                       | 20 ++++++++++++++++----\n log-tree.h                       |  7 +++++--\n pretty.c                         |  4 ++--\n revision.h                       |  4 ++++\n t/t4205-log-pretty-formats.sh    | 10 ++++++++++\n 7 files changed, 66 insertions(+), 8 deletions(-)\n\n\nbase-commit: e9e5ba39a78c8f5057262d49e261b42a8660d5b9\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1065%2Fjohn-cai%2Fjc%2Ftwo-line-pretty-decoration-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1065/john-cai/jc/two-line-pretty-decoration-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1065\n-- \ngitgitgadget\n"},{"id":"440075","messageId":"c5e0eda3321043093abbf3a43af994a0222b3e4c.1635542128.git.gitgitgadget@gmail.com","threadId":"56807","inReplyTo":"pull.1065.git.1635542128.gitgitgadget@gmail.com","subject":"[PATCH 1/4] oneline: parse --newlineafter flag","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-10-29T21:15:24Z","receivedAt":"2021-10-29T21:15:34Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\n* revision.h: add newlineafter flag type\n* builtin/log.c: parse newlineafter flag with callback\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n builtin/log.c | 25 +++++++++++++++++++++++++\n revision.h    |  4 ++++\n 2 files changed, 29 insertions(+)\n\ndiff --git a/builtin/log.c b/builtin/log.c\nindex f75d87e8d7f..3758c73760c 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -53,6 +53,7 @@ static int decoration_given;\n static int use_mailmap_config = 1;\n static const char *fmt_patch_subject_prefix = \"PATCH\";\n static int fmt_patch_name_max = FORMAT_PATCH_NAME_MAX_DEFAULT;\n+static int newlineafter = NEWLINEAFTER_NONE;\n static const char *fmt_pretty;\n \n static const char * const builtin_log_usage[] = {\n@@ -132,6 +133,27 @@ static int log_line_range_callback(const struct option *option, const char *arg,\n \treturn 0;\n }\n \n+static int parse_newlineafter(const char *value)\n+{\n+\tif (!strcmp(value, \"decorations\"))\n+\t\treturn NEWLINEAFTER_DECORATIONS;\n+\n+\treturn NEWLINEAFTER_NONE;\n+}\n+\n+static int option_parse_newlineafter(const struct option *opt,\n+\t\t\t\t   const char *arg, int unset)\n+{\n+\tint *newlineafter = opt->value;\n+\n+\tif (unset)\n+\t\t*newlineafter = NEWLINEAFTER_NONE;\n+\telse\n+\t\t*newlineafter = parse_newlineafter(arg);\n+\n+\treturn 0;\n+}\n+\n static void init_log_defaults(void)\n {\n \tinit_diff_ui_defaults();\n@@ -156,6 +178,7 @@ static void cmd_log_init_defaults(struct rev_info *rev)\n \trev->show_signature = default_show_signature;\n \trev->encode_email_headers = default_encode_email_headers;\n \trev->diffopt.flags.allow_textconv = 1;\n+\trev->newlineafter = NEWLINEAFTER_NONE;\n \n \tif (default_date_mode)\n \t\tparse_date_format(default_date_mode, &rev->date_mode);\n@@ -189,6 +212,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,\n \t\tOPT_CALLBACK('L', NULL, &line_cb, \"range:file\",\n \t\t\t     N_(\"trace the evolution of line range <start>,<end> or function :<funcname> in <file>\"),\n \t\t\t     log_line_range_callback),\n+\t\tOPT_CALLBACK(0, \"newlineafter\", &newlineafter, N_(\"field\"), N_(\"new line after <field>\"), option_parse_newlineafter),\n \t\tOPT_END()\n \t};\n \n@@ -265,6 +289,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,\n \t\tload_ref_decorations(&decoration_filter, decoration_style);\n \t}\n \n+\trev->newlineafter = newlineafter;\n \tif (rev->line_level_traverse)\n \t\tline_log_init(rev, line_cb.prefix, &line_cb.args);\n \ndiff --git a/revision.h b/revision.h\nindex 5578bb4720a..ff0b89c1f40 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -243,6 +243,10 @@ struct rev_info {\n \tint\t\tno_inline;\n \tint\t\tshow_log_size;\n \tstruct string_list *mailmap;\n+\tenum {\n+\t\t\tNEWLINEAFTER_NONE,\n+\t\t\tNEWLINEAFTER_DECORATIONS\n+\t\t} newlineafter;\n \n \t/* Filter by commit log message */\n \tstruct grep_opt\tgrep_filter;\n-- \ngitgitgadget\n\n"},{"id":"440076","messageId":"54530e1e009f7bbebb3be1c7710f766112a492fb.1635542128.git.gitgitgadget@gmail.com","threadId":"56807","inReplyTo":"pull.1065.git.1635542128.gitgitgadget@gmail.com","subject":"[PATCH 2/4] oneline: print newline after decorations if flag provided","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-10-29T21:15:25Z","receivedAt":"2021-10-29T21:15:36Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\n* log-tree.c: pass in format, oneline, abbrev so format_decorations can\n  print a newline with an indentation.\n* log-tree.h: adding parameters in header file\n* pretty.c: pass in arguments format, oneline to format_decorations call\n  but these don't get used in this context\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n log-tree.c | 20 ++++++++++++++++----\n log-tree.h |  7 +++++--\n pretty.c   |  4 ++--\n 3 files changed, 23 insertions(+), 8 deletions(-)\n\ndiff --git a/log-tree.c b/log-tree.c\nindex 644893fd8cf..d2f1eeeebf5 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -285,6 +285,9 @@ static void show_name(struct strbuf *sb, const struct name_decoration *decoratio\n void format_decorations_extended(struct strbuf *sb,\n \t\t\tconst struct commit *commit,\n \t\t\tint use_color,\n+\t\t\tint format,\n+\t\t\tint abbrev_len,\n+\t\t\tint newline,\n \t\t\tconst char *prefix,\n \t\t\tconst char *separator,\n \t\t\tconst char *suffix)\n@@ -333,11 +336,16 @@ void format_decorations_extended(struct strbuf *sb,\n \tstrbuf_addstr(sb, color_commit);\n \tstrbuf_addstr(sb, suffix);\n \tstrbuf_addstr(sb, color_reset);\n+\tif ((format == CMIT_FMT_ONELINE) && newline == 1) {\n+\t\tstrbuf_addstr(sb, \"\\n\");\n+\t\tstrbuf_addchars(sb, ' ', abbrev_len);\n+\t}\n }\n \n void show_decorations(struct rev_info *opt, struct commit *commit)\n {\n \tstruct strbuf sb = STRBUF_INIT;\n+\tint newline = 0;\n \n \tif (opt->sources) {\n \t\tchar **slot = revision_sources_peek(opt->sources, commit);\n@@ -347,7 +355,11 @@ void show_decorations(struct rev_info *opt, struct commit *commit)\n \t}\n \tif (!opt->show_decorations)\n \t\treturn;\n-\tformat_decorations(&sb, commit, opt->diffopt.use_color);\n+\n+\tif (opt->newlineafter == NEWLINEAFTER_DECORATIONS)\n+\t\tnewline = 1;\n+\n+\tformat_decorations(&sb, commit, opt->diffopt.use_color, opt->commit_format, opt->abbrev, newline);\n \tfputs(sb.buf, opt->diffopt.file);\n \tstrbuf_release(&sb);\n }\n@@ -623,6 +635,7 @@ void show_log(struct rev_info *opt)\n \tint abbrev_commit = opt->abbrev_commit ? opt->abbrev : the_hash_algo->hexsz;\n \tconst char *extra_headers = opt->extra_headers;\n \tstruct pretty_print_context ctx = {0};\n+\tchar hex[GIT_MAX_HEXSZ + 1];\n \n \topt->loginfo = NULL;\n \tif (!opt->verbose_header) {\n@@ -692,9 +705,8 @@ void show_log(struct rev_info *opt)\n \n \t\tif (!opt->graph)\n \t\t\tput_revision_mark(opt, commit);\n-\t\tfputs(find_unique_abbrev(&commit->object.oid,\n-\t\t\t\t\t abbrev_commit),\n-\t\t      opt->diffopt.file);\n+\t\topt->abbrev = find_unique_abbrev_r(hex, &commit->object.oid, abbrev_commit);\n+\t\tfputs(hex, opt->diffopt.file);\n \t\tif (opt->print_parents)\n \t\t\tshow_parents(commit, abbrev_commit, opt->diffopt.file);\n \t\tif (opt->children.name)\ndiff --git a/log-tree.h b/log-tree.h\nindex e7e4641cf83..a401e659d4c 100644\n--- a/log-tree.h\n+++ b/log-tree.h\n@@ -19,11 +19,14 @@ int log_tree_commit(struct rev_info *, struct commit *);\n void show_log(struct rev_info *opt);\n void format_decorations_extended(struct strbuf *sb, const struct commit *commit,\n \t\t\t     int use_color,\n+\t\t\t     int format,\n+\t\t\t     int abbrev_len,\n+\t\t\t     int newline,\n \t\t\t     const char *prefix,\n \t\t\t     const char *separator,\n \t\t\t     const char *suffix);\n-#define format_decorations(strbuf, commit, color) \\\n-\t\t\t     format_decorations_extended((strbuf), (commit), (color), \" (\", \", \", \")\")\n+#define format_decorations(strbuf, commit, color, format, abbrev_len, newline) \\\n+\t\t\t     format_decorations_extended((strbuf), (commit), (color), (format), (abbrev_len), (newline), \" (\", \", \", \")\")\n void show_decorations(struct rev_info *opt, struct commit *commit);\n void log_write_email_headers(struct rev_info *opt, struct commit *commit,\n \t\t\t     const char **extra_headers_p,\ndiff --git a/pretty.c b/pretty.c\nindex fe95107ae5a..98144deac5c 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -1385,10 +1385,10 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */\n \t\tstrbuf_addstr(sb, get_revision_mark(NULL, commit));\n \t\treturn 1;\n \tcase 'd':\n-\t\tformat_decorations(sb, commit, c->auto_color);\n+\t\tformat_decorations(sb, commit, c->auto_color, c->pretty_ctx->fmt, 0, 0);\n \t\treturn 1;\n \tcase 'D':\n-\t\tformat_decorations_extended(sb, commit, c->auto_color, \"\", \", \", \"\");\n+\t\tformat_decorations_extended(sb, commit, c->auto_color, c->pretty_ctx->fmt, 0, 0, \"\", \", \", \"\");\n \t\treturn 1;\n \tcase 'S':\t\t/* tag/branch like --source */\n \t\tif (!(c->pretty_ctx->rev && c->pretty_ctx->rev->sources))\n-- \ngitgitgadget\n\n"},{"id":"440077","messageId":"ea9ba5d0114d43ab275de47e20e066880aabb931.1635542128.git.gitgitgadget@gmail.com","threadId":"56807","inReplyTo":"pull.1065.git.1635542128.gitgitgadget@gmail.com","subject":"[PATCH 3/4] oneline: test for --newlineafter feature","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-10-29T21:15:26Z","receivedAt":"2021-10-29T21:15:38Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n t/t4205-log-pretty-formats.sh | 10 ++++++++++\n 1 file changed, 10 insertions(+)\n\ndiff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh\nindex 5865daa8f8d..847426f8af0 100755\n--- a/t/t4205-log-pretty-formats.sh\n+++ b/t/t4205-log-pretty-formats.sh\n@@ -576,6 +576,16 @@ test_expect_success 'clean log decoration' '\n \ttest_cmp expected actual1\n '\n \n+test_expect_success 'oneline with --newlineafter=decorations' '\n+\tgit checkout -b newlineafter &&\n+\t>baz &&\n+\tgit add baz &&\n+\tgit commit -m \"decorations\" &&\n+\tgit log --pretty=format:\"%h%d%n%>(18) %s%n\" --max-count=1 >expect &&\n+\tgit log --oneline --decorate --max-count=1 --newlineafter=decorations >actual &&\n+\ttest_cmp expect actual\n+'\n+\n cat >trailers <<EOF\n Signed-off-by: A U Thor <author@example.com>\n Acked-by: A U Thor <author@example.com>\n-- \ngitgitgadget\n\n"},{"id":"440078","messageId":"57b2079f30a3b8cbaf83c93510abd5b1ad7fff61.1635542128.git.gitgitgadget@gmail.com","threadId":"56807","inReplyTo":"pull.1065.git.1635542128.gitgitgadget@gmail.com","subject":"[PATCH 4/4] doc: add docs for newlineafter flag","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-10-29T21:15:27Z","receivedAt":"2021-10-29T21:15:40Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nProvide documentation for --newlineafter flag\n\nSigned-off-by: John Cai <johncai86@gmail.com>\n---\n Documentation/pretty-options.txt | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt\nindex b3af8506086..7de51c660fe 100644\n--- a/Documentation/pretty-options.txt\n+++ b/Documentation/pretty-options.txt\n@@ -32,6 +32,10 @@ people using 80-column terminals.\n \tThis is a shorthand for \"--pretty=oneline --abbrev-commit\"\n \tused together.\n \n+--newlineafter[=(decorations)]\n+\tUsed in conjunction with --pretty=oneline to add a line break after\n+\tdecorations\n+\n --encoding=<encoding>::\n \tCommit objects record the character encoding used for the log message\n \tin their encoding header; this option can be used to tell the\n-- \ngitgitgadget\n"},{"id":"440990","messageId":"CAP8UFD3Uh7AJTFaVv25f7gGQkTxgMQTCO=NMHCWoSm9sjmw26g@mail.gmail.com","threadId":"56807","inReplyTo":"pull.1065.git.1635542128.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/4] Flag to add a newline after decorations for --oneline log output","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2021-11-12T16:27:45Z","receivedAt":"2021-11-12T16:28:01Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Fri, Oct 29, 2021 at 11:17 PM John Cai via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n>\n> Add a flag --newlineafter to be able to pass in \"decorations\" to enable a\n> nicer format for the --oneline output so the commit subjects are aligned\n> when decorations are printed.\n\nI wonder if --newlinebefore or --newlinefor rather than --newlineafter\nwould be better. It seems to me that it would be easier for users to\nguess what the result will look like with --newlinefor.\n\nAnother possibly more generic solution would be something like\n--format-field=<field>:<format> where, in the output, the field\n<field> (which corresponds to the \"%(<field>)\" format) would be\nreplaced by <format> which should contain \"%(<field>)\". For example\n`--format-field=decorations:'[[%(decorations)]]\\n'` would enclose the\ndecorations using [[...]] and would add a newline after them.\n\nAlso it would be nice if this could be extended to other fields and to\nformats other than \"oneline\". You might want to discuss a bit about\nhow it could be done with generic code.\n\n> 0b96396ef5ff7a3a01e137b3735893c970759dfa (HEAD -> jc/two-line-pretty-decoration, john-cai/jc/two-line-pretty-decoration)\n>                                          Improve UX for oneline with decorations\n> e9e5ba39a78c8f5057262d49e261b42a8660d5b9 (origin/master, origin/HEAD, master)\n>                                          The fifteenth batch\n> c6fc44e9bf85dc02f6d33b11d9b5d1e10711d125 Merge branch 'ab/test-lib-diff-cleanup'\n> 63ec2297d26155adb0e38745bf2284cd663add8e Merge branch 'ab/fix-make-lint-docs'\n\nNot sure why the above lines are included in your cover letter.\n\n> original thread in\n> https://lore.kernel.org/git/CA+55aFwT2HUBzZO8Gpt9tHoJtdRxv9oe3TDoSH5jcEOixRNBXg@mail.gmail.com/T/#t\n\nIt would be nice if you could summarize the threads a bit in this\ncover letter, and tell a bit about how your design evolved from what\nwas discussed.\n\n> John Cai (4):\n>   oneline: parse --newlineafter flag\n>   oneline: print newline after decorations if flag provided\n>   oneline: test for --newlineafter feature\n>   doc: add docs for newlineafter flag\n\nThe 2 last patches look very small and might want to be squashed into\nthe patch that introduces the --newlineafter flag.\n\nThanks!\n"},{"id":"441876","messageId":"20211121011928.srxogmaswqdmfd2c@Johns-MacBook-Pro-3.local","threadId":"56807","inReplyTo":"CAP8UFD3Uh7AJTFaVv25f7gGQkTxgMQTCO=NMHCWoSm9sjmw26g@mail.gmail.com","subject":"Re: [PATCH 0/4] Flag to add a newline after decorations for --oneline log output","fromName":"John Cai","fromEmail":"jcai@gitlab.com","sentAt":"2021-11-21T01:19:28Z","receivedAt":"2021-11-21T01:19:38Z","isPatch":true,"sender":{"key":"jcai@gitlab.com","avatar":"https://gravatar.com/avatar/4ba958d432b21b53dd76009b44d31b70bd387a31d2957cee1b257ced4bf812f8?d=mp&s=160"},"body":"On Fri, Nov 12, 2021 at 05:27:45PM +0100, Christian Couder wrote:\n> On Fri, Oct 29, 2021 at 11:17 PM John Cai via GitGitGadget\n> <gitgitgadget@gmail.com> wrote:\n> >\n> > Add a flag --newlineafter to be able to pass in \"decorations\" to enable a\n> > nicer format for the --oneline output so the commit subjects are aligned\n> > when decorations are printed.\n> \n> I wonder if --newlinebefore or --newlinefor rather than --newlineafter\n> would be better. It seems to me that it would be easier for users to\n> guess what the result will look like with --newlinefor.\n> \n> Another possibly more generic solution would be something like\n> --format-field=<field>:<format> where, in the output, the field\n> <field> (which corresponds to the \"%(<field>)\" format) would be\n> replaced by <format> which should contain \"%(<field>)\". For example\n> `--format-field=decorations:'[[%(decorations)]]\\n'` would enclose the\n> decorations using [[...]] and would add a newline after them.\n> \n> Also it would be nice if this could be extended to other fields and to\n> formats other than \"oneline\". You might want to discuss a bit about\n> how it could be done with generic code.\n> \n> > 0b96396ef5ff7a3a01e137b3735893c970759dfa (HEAD -> jc/two-line-pretty-decoration, john-cai/jc/two-line-pretty-decoration)\n> >                                          Improve UX for oneline with decorations\n> > e9e5ba39a78c8f5057262d49e261b42a8660d5b9 (origin/master, origin/HEAD, master)\n> >                                          The fifteenth batch\n> > c6fc44e9bf85dc02f6d33b11d9b5d1e10711d125 Merge branch 'ab/test-lib-diff-cleanup'\n> > 63ec2297d26155adb0e38745bf2284cd663add8e Merge branch 'ab/fix-make-lint-docs'\n> \n> Not sure why the above lines are included in your cover letter.\n> \n> > original thread in\n> > https://lore.kernel.org/git/CA+55aFwT2HUBzZO8Gpt9tHoJtdRxv9oe3TDoSH5jcEOixRNBXg@mail.gmail.com/T/#t\n> \n> It would be nice if you could summarize the threads a bit in this\n> cover letter, and tell a bit about how your design evolved from what\n> was discussed.\n> \n> > John Cai (4):\n> >   oneline: parse --newlineafter flag\n> >   oneline: print newline after decorations if flag provided\n> >   oneline: test for --newlineafter feature\n> >   doc: add docs for newlineafter flag\n> \n> The 2 last patches look very small and might want to be squashed into\n> the patch that introduces the --newlineafter flag.\n> \n> Thanks!\n\nThere was a discussion in https://lore.kernel.org/git/CA+55aFwT2HUBzZO8Gpt9tHoJtdRxv9oe3TDoSH5jcEOixRNBXg@mail.gmail.com/T/#t\n\nabout improving the --oneline output with decorations. To summarize, currently, when\ndecorations are printed with --oneline the subject message ends up misaligned like so:\n\n```\n7140c4988f t/lib-git.sh: fix ACL-related permissions failure\n88d915a634 (jc-test-peff-revlist-patch) A few fixes before -rc2\n9cc14a5b5d Sync with maint\n5fbd2fc599 (origin/maint) Merge branch 'vd/pthread-setspecific-g11-fix' into maint\n494cb27e57 Merge branch 'ma/doc-git-version' into maint\n```\n\nIt would improve the user experience of this format if we could allow a newline after\nthe decorations so that the logs are formatted in the following manner:\n\n```\n7140c4988f t/lib-git.sh: fix ACL-related permissions failure\n88d915a634 (jc-test-peff-revlist-patch)\n           A few fixes before -rc2\n9cc14a5b5d Sync with maint\n5fbd2fc599 (origin/maint)\n           Merge branch 'vd/pthread-setspecific-g11-fix' into maint\n494cb27e57 Merge branch 'ma/doc-git-version' into maint\n```\n\nIn order to accomplish this, we can add a new flag called --format-field=<format>.\n<format> is similar to what is passed into --format.\n\nFor example, if --format-field=[[%d]]%n is used, the --oneline format will print\ndecorations enclosed with [[ ]] and a newline after it.\n\nThis would be convenient when one wants to modify just one field of the\nlog output.\n\n\ncc: Christian Couder <christian.couder@gmail.com>\n"}]}