Re: [git rebase -i] show time and author besides commit hash and message?
On Mon, Oct 31, 2016 at 11:27:33PM +0800, ryenus wrote: > > It is possible to change the format globally via config option > > rebase.instructionFormat: > > > > $ git config rebase.instructionFormat "%an (%ad): %s" > > > > The format is the same as for 'git log'. This one outputs author > > name, date, and the first line of commit message. > > Thanks for the prompt response! > I tried immediately, it works just as you have pointed out. > > Just it seems coloring is not supported? probably because > we're inside an editor? Yes. If git outputs its own ANSI codes there, they generally look bad in an editor (interpreted as raw bytes, not as coloring). Any existing coloring you see is likely due to syntax highlighting done by your editor. You can extend that to match your desired format, but exactly how would depend on which editor you're using. -Peff
Re: [git rebase -i] show time and author besides commit hash and message?
> It is possible to change the format globally via config option > rebase.instructionFormat: > > $ git config rebase.instructionFormat "%an (%ad): %s" > > The format is the same as for 'git log'. This one outputs author > name, date, and the first line of commit message. Thanks for the prompt response! I tried immediately, it works just as you have pointed out. Just it seems coloring is not supported? probably because we're inside an editor? > This option is supported since Git 2.6. I missed it, what about including a note about this option as part of the comment in git rebase -i? since that's the place where people would most likely think about it? > Or are you interested in a command-line option that can change > the format on per-invocation basis? I think there isn't one. > It can be interesting to add it, but I don't think it has much > utility... Not much, for git log I'd rather setup an alias "git la", than having to remember various fields, colors, padding options to have a nice output.
Re: [git rebase -i] show time and author besides commit hash and message?
> It would help especially when the commit message was written badly. > > Or it might be possible to customize just like "git log --format"? It is possible to change the format globally via config option rebase.instructionFormat: $ git config rebase.instructionFormat "%an (%ad): %s" The format is the same as for 'git log'. This one outputs author name, date, and the first line of commit message. This option is supported since Git 2.6. Or are you interested in a command-line option that can change the format on per-invocation basis? I think there isn't one. It can be interesting to add it, but I don't think it has much utility...
[git rebase -i] show time and author besides commit hash and message?
It would help especially when the commit message was written badly. Or it might be possible to customize just like "git log --format"? Thanks