* [git rebase -i] show time and author besides commit hash and message?
@ 2016-10-30 17:03 ryenus
2016-10-30 17:21 ` Alexei Lozovsky
0 siblings, 1 reply; 5+ messages in thread
From: ryenus @ 2016-10-30 17:03 UTC (permalink / raw)
To: Git mailing list
It would help especially when the commit message was written badly.
Or it might be possible to customize just like "git log --format"?
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [git rebase -i] show time and author besides commit hash and message?
2016-10-30 17:03 [git rebase -i] show time and author besides commit hash and message? ryenus
@ 2016-10-30 17:21 ` Alexei Lozovsky
2016-10-30 18:46 ` [PATCH] doc: fix missing "::" in config list Jeff King
2016-10-31 15:27 ` [git rebase -i] show time and author besides commit hash and message? ryenus
0 siblings, 2 replies; 5+ messages in thread
From: Alexei Lozovsky @ 2016-10-30 17:21 UTC (permalink / raw)
To: ryenus; +Cc: Git mailing list
> 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...
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] doc: fix missing "::" in config list
2016-10-30 17:21 ` Alexei Lozovsky
@ 2016-10-30 18:46 ` Jeff King
2016-10-31 15:27 ` [git rebase -i] show time and author besides commit hash and message? ryenus
1 sibling, 0 replies; 5+ messages in thread
From: Jeff King @ 2016-10-30 18:46 UTC (permalink / raw)
To: Alexei Lozovsky
Cc: Michael Rappazzo, Junio C Hamano, ryenus, Git mailing list
On Sun, Oct 30, 2016 at 07:21:41PM +0200, Alexei Lozovsky wrote:
> > 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"
I had totally forgotten we added this option. When I went to look at its
documentation, I found the formatting a bit funny. This should fix it.
-- >8 --
Subject: [PATCH] doc: fix missing "::" in config list
The rebase.instructionFormat option is missing its "::" to
tell AsciiDoc that it's a list entry. As a result, the
option name gets lumped into the description in one big
paragraph.
Signed-off-by: Jeff King <peff@peff.net>
---
Documentation/config.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 27069ac03..a0ab66aae 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -2450,7 +2450,7 @@ rebase.missingCommitsCheck::
command in the todo-list.
Defaults to "ignore".
-rebase.instructionFormat
+rebase.instructionFormat::
A format string, as specified in linkgit:git-log[1], to be used for
the instruction list during an interactive rebase. The format will automatically
have the long commit hash prepended to the format.
--
2.10.2.870.g7471999
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [git rebase -i] show time and author besides commit hash and message?
2016-10-30 17:21 ` Alexei Lozovsky
2016-10-30 18:46 ` [PATCH] doc: fix missing "::" in config list Jeff King
@ 2016-10-31 15:27 ` ryenus
2016-10-31 15:57 ` Jeff King
1 sibling, 1 reply; 5+ messages in thread
From: ryenus @ 2016-10-31 15:27 UTC (permalink / raw)
To: Alexei Lozovsky; +Cc: Git mailing list
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [git rebase -i] show time and author besides commit hash and message?
2016-10-31 15:27 ` [git rebase -i] show time and author besides commit hash and message? ryenus
@ 2016-10-31 15:57 ` Jeff King
0 siblings, 0 replies; 5+ messages in thread
From: Jeff King @ 2016-10-31 15:57 UTC (permalink / raw)
To: ryenus; +Cc: Alexei Lozovsky, Git mailing list
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-10-31 15:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-30 17:03 [git rebase -i] show time and author besides commit hash and message? ryenus
2016-10-30 17:21 ` Alexei Lozovsky
2016-10-30 18:46 ` [PATCH] doc: fix missing "::" in config list Jeff King
2016-10-31 15:27 ` [git rebase -i] show time and author besides commit hash and message? ryenus
2016-10-31 15:57 ` Jeff King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).