aboutsummaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2009-02-13 23:10:41 +0100
committerJunio C Hamano <gitster@pobox.com>2009-02-13 17:18:22 -0800
commit7fcda9201e192413c2e63fe35ce6664dbc81705d (patch)
treee9103e8f6e6fa0fa060ebf2e1ee2032bf8ca1b8e /pretty.c
parent5cd12b85fe8ff74f202a158511ead34e8aba584c (diff)
downloadgit-7fcda9201e192413c2e63fe35ce6664dbc81705d.tar.gz
git-7fcda9201e192413c2e63fe35ce6664dbc81705d.tar.xz
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 'pretty.c')
-rw-r--r--pretty.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/pretty.c b/pretty.c
index cc460b569..428fbb61a 100644
--- a/pretty.c
+++ b/pretty.c
@@ -210,15 +210,13 @@ static void add_merge_info(enum cmit_fmt fmt, struct strbuf *sb,
while (parent) {
struct commit *p = parent->item;
const char *hex = NULL;
- const char *dots;
if (abbrev)
hex = find_unique_abbrev(p->object.sha1, abbrev);
if (!hex)
hex = sha1_to_hex(p->object.sha1);
- dots = (abbrev && strlen(hex) != 40) ? "..." : "";
parent = parent->next;
- strbuf_addf(sb, " %s%s", hex, dots);
+ strbuf_addf(sb, " %s", hex);
}
strbuf_addch(sb, '\n');
}