git-log: put space after commit mark

Currently, commit marks (left, right, boundary, cherry) are output right
before the commit sha1, which makes it difficult to copy sha1s. Sample
output for "git log --oneline --cherry":

=049c269 t6007: test rev-list --cherry

Change this to

= 049c269 t6007: test rev-list --cherry

which matches exactly the current output of "git log --graph".

Leave "git rev-list" output as is (no space) so that they do not break.

Adjust "git-svn" which uses "git log --pretty=raw --boundary".

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Michael J Gruber
2011-03-10 15:45:03 +01:00
committed by Junio C Hamano
parent fe3b59e595
commit b1b47554ae
4 changed files with 13 additions and 3 deletions

View File

@ -381,7 +381,7 @@ void show_log(struct rev_info *opt)
graph_show_commit(opt->graph);
if (!opt->graph)
fputs(get_revision_mark(opt, commit), stdout);
put_revision_mark(opt, commit);
fputs(find_unique_abbrev(commit->object.sha1, abbrev_commit), stdout);
if (opt->print_parents)
show_parents(commit, abbrev_commit);
@ -439,7 +439,7 @@ void show_log(struct rev_info *opt)
fputs("commit ", stdout);
if (!opt->graph)
fputs(get_revision_mark(opt, commit), stdout);
put_revision_mark(opt, commit);
fputs(find_unique_abbrev(commit->object.sha1, abbrev_commit),
stdout);
if (opt->print_parents)