diff options
author | Thomas Rast <trast@student.ethz.ch> | 2009-02-13 23:10:41 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-13 17:18:22 -0800 |
commit | 7fcda9201e192413c2e63fe35ce6664dbc81705d (patch) | |
tree | e9103e8f6e6fa0fa060ebf2e1ee2032bf8ca1b8e /log-tree.c | |
parent | 5cd12b85fe8ff74f202a158511ead34e8aba584c (diff) | |
download | git-7fcda9201e192413c2e63fe35ce6664dbc81705d.tar.gz |
log: do not print ellipses with --abbrev-commit
'git log --abbrev-commit' added an ellipsis to all commit names that
were abbreviated. This was particularly annoying if you wanted to
cut&paste the sha1 from the terminal, since selecting by word would
pick up '...' too.
So use find_unique_abbrev() instead of diff_unique_abbrev() in all
log-related commit sha1 printing routines, and also change the
formatting of the 'Merge: parent1 parent2' line output via
pretty_print_commit().
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r-- | log-tree.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/log-tree.c b/log-tree.c index 194ddb13da..84a74e544b 100644 --- a/log-tree.c +++ b/log-tree.c @@ -48,7 +48,7 @@ static void show_parents(struct commit *commit, int abbrev) struct commit_list *p; for (p = commit->parents; p ; p = p->next) { struct commit *parent = p->item; - printf(" %s", diff_unique_abbrev(parent->object.sha1, abbrev)); + printf(" %s", find_unique_abbrev(parent->object.sha1, abbrev)); } } @@ -280,7 +280,7 @@ void show_log(struct rev_info *opt) putchar('>'); } } - fputs(diff_unique_abbrev(commit->object.sha1, abbrev_commit), stdout); + fputs(find_unique_abbrev(commit->object.sha1, abbrev_commit), stdout); if (opt->print_parents) show_parents(commit, abbrev_commit); show_decorations(opt, commit); @@ -348,13 +348,13 @@ void show_log(struct rev_info *opt) putchar('>'); } } - fputs(diff_unique_abbrev(commit->object.sha1, abbrev_commit), + fputs(find_unique_abbrev(commit->object.sha1, abbrev_commit), stdout); if (opt->print_parents) show_parents(commit, abbrev_commit); if (parent) printf(" (from %s)", - diff_unique_abbrev(parent->object.sha1, + find_unique_abbrev(parent->object.sha1, abbrev_commit)); show_decorations(opt, commit); printf("%s", diff_get_color_opt(&opt->diffopt, DIFF_RESET)); |