- Notifications
You must be signed in to change notification settings - Fork 157
Flag to add a newline after decorations for --oneline log output #1065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Flag to add a newline after decorations for --oneline log output #1065
Conversation
| There is an issue in commit 194fff0: |
| There is an issue in commit 5058519: |
| @john-cai please follow the guidance given in https://git-scm.com/docs/SubmittingPatches#describe-changes to craft commit messages in the style preferred by the Git project. |
| @dscho will do! please don't hesitate to call out any missteps as I'm starting to learn this process |
| I think some users are likely to be happy with the current Also it would be nice if you could show how the result looks like. And at one point you might want to update the docs. |
eebd562 to 0b96396 Compare |
|
27e17fe to 3bcc1f0 Compare 3bcc1f0 to a461c81 Compare | There are issues in commit 6f8ddfd: |
| There is an issue in commit 208db1c: |
| There is an issue in commit a461c81: |
a461c81 to d81b934 Compare | There is an issue in commit 781dbc1: |
5dc7023 to 3254fbc Compare | @chriscool good point about not exposing new methods in |
eb42208 to ca73f61 Compare | There is an issue in commit d51b3f7: |
ca73f61 to ec76bf1 Compare | There is an issue in commit e7639bd: |
3bdb611 to a184df1 Compare | There is an issue in commit d06184e: |
| There is an issue in commit b1c1403: |
5ad2024 to 7684922 Compare | /preview |
| Preview email sent as pull.1065.git.1635540792.gitgitgadget@gmail.com |
| /preview |
| Preview email sent as pull.1065.git.1635541039.gitgitgadget@gmail.com |
7684922 to c13f36f Compare | /preview |
| Preview email sent as pull.1065.git.1635541588.gitgitgadget@gmail.com |
* revision.h: add newlineafter flag type * builtin/log.c: parse newlineafter flag with callback Signed-off-by: John Cai <johncai86@gmail.com>
* log-tree.c: pass in format, oneline, abbrev so format_decorations can print a newline with an indentation. * log-tree.h: adding parameters in header file * pretty.c: pass in arguments format, oneline to format_decorations call but these don't get used in this context Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: John Cai <johncai86@gmail.com>
Provide documentation for --newlineafter flag Signed-off-by: John Cai <johncai86@gmail.com>
c13f36f to 57b2079 Compare | /submit |
| Submitted as pull.1065.git.1635542128.gitgitgadget@gmail.com To fetch this version into To fetch this version to local tag |
| On the Git mailing list, Christian Couder wrote (reply to this): |
| User |
| On the Git mailing list, John Cai wrote (reply to this): |
| User |
There was a discussion in https://lore.kernel.org/git/CA+55aFwT2HUBzZO8Gpt9tHoJtdRxv9oe3TDoSH5jcEOixRNBXg@mail.gmail.com/T/#t
about improving the --oneline output with decorations. To summarize, currently, when decorations are printed with --oneline the subject message ends up misaligned like so:
It would improve the user experience of this format if we could allow a newline after the decorations so that the logs are formatted in the following manner:
In order to accomplish this, we can add a new flag called --field-format= used in conjunction with --oneline. is similar to what is passed into --format.
For example, if --field-format=[[%d]]%n is used, the --oneline format will print decorations enclosed with [[ ]] and a newline after it.
This will allow for more flexible formatting of the --oneline format.
cc: Christian Couder christian.couder@gmail.com
cc: John Cai jcai@gitlab.com