Re: [PATCH 0/4] Flag to add a newline after decorations for --oneline log output
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Nov 12, 2021, 16:27 UTC
- Message-ID
- <CAP8UFD3Uh7AJTFaVv25f7gGQkTxgMQTCO=NMHCWoSm9sjmw26g@mail.gmail.com>
- In-Reply-To
- <pull.1065.git.1635542128.gitgitgadget@gmail.com>
On Fri, Oct 29, 2021 at 11:17 PM John Cai via GitGitGadget <gitgitgadget@gmail.com> wrote:
> > Add a flag --newlineafter to be able to pass in "decorations" to enable a > nicer format for the --oneline output so the commit subjects are aligned > when decorations are printed.
I wonder if --newlinebefore or --newlinefor rather than --newlineafter would be better. It seems to me that it would be easier for users to guess what the result will look like with --newlinefor.
Another possibly more generic solution would be something like --format-field=<field>:<format> where, in the output, the field <field> (which corresponds to the "%(<field>)" format) would be replaced by <format> which should contain "%(<field>)". For example `--format-field=decorations:'[[%(decorations)]]\n'` would enclose the decorations using [[...]] and would add a newline after them.
Also it would be nice if this could be extended to other fields and to formats other than "oneline". You might want to discuss a bit about how it could be done with generic code.
Show 6 quoted lines
> 0b96396ef5ff7a3a01e137b3735893c970759dfa (HEAD -> jc/two-line-pretty-decoration, john-cai/jc/two-line-pretty-decoration) > Improve UX for oneline with decorations > e9e5ba39a78c8f5057262d49e261b42a8660d5b9 (origin/master, origin/HEAD, master) > The fifteenth batch > c6fc44e9bf85dc02f6d33b11d9b5d1e10711d125 Merge branch 'ab/test-lib-diff-cleanup' > 63ec2297d26155adb0e38745bf2284cd663add8e Merge branch 'ab/fix-make-lint-docs'
Not sure why the above lines are included in your cover letter.
> original thread in > https://lore.kernel.org/git/CA+55aFwT2HUBzZO8Gpt9tHoJtdRxv9oe3TDoSH5jcEOixRNBXg@mail.gmail.com/T/#t
It would be nice if you could summarize the threads a bit in this cover letter, and tell a bit about how your design evolved from what was discussed.
Show 5 quoted lines
> John Cai (4): > oneline: parse --newlineafter flag > oneline: print newline after decorations if flag provided > oneline: test for --newlineafter feature > doc: add docs for newlineafter flag
The 2 last patches look very small and might want to be squashed into the patch that introduces the --newlineafter flag.
Thanks!