log: add %S option (like --source) to log --format
Make it possible to write for example
git log --format="%H,%S"
where the %S at the end is a new placeholder that prints out the ref
(tag/branch) for each commit.
Using %d might seem like an alternative but it only shows the ref for the last
commit in the branch.
Signed-off-by: Issac Trotts <issactrotts@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
ecbdaf0899
commit
ad6f028f06
@ -700,6 +700,7 @@ void show_log(struct rev_info *opt)
|
||||
ctx.color = opt->diffopt.use_color;
|
||||
ctx.expand_tabs_in_log = opt->expand_tabs_in_log;
|
||||
ctx.output_encoding = get_log_output_encoding();
|
||||
ctx.rev = opt;
|
||||
if (opt->from_ident.mail_begin && opt->from_ident.name_begin)
|
||||
ctx.from_ident = &opt->from_ident;
|
||||
if (opt->graph)
|
||||
|
||||
Reference in New Issue
Block a user