Skip to content

Commit

Permalink
Merge branch 'tr/abbrev-commit-no-ellipses'
Browse files Browse the repository at this point in the history
* tr/abbrev-commit-no-ellipses:
  log: do not print ellipses with --abbrev-commit
  • Loading branch information
Junio C Hamano committed Feb 15, 2009
2 parents 472e474 + 7fcda92 commit b43174e
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 21 deletions.
8 changes: 4 additions & 4 deletions log-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand Down
4 changes: 1 addition & 3 deletions pretty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git log --patch-with-stat --summary master -- dir/
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.log_--patch-with-stat_master
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git log --patch-with-stat master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.log_--patch-with-stat_master_--_dir_
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git log --patch-with-stat master -- dir/
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git log --root --cc --patch-with-stat --summary master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.log_--root_--patch-with-stat_--summary_master
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git log --root --patch-with-stat --summary master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.log_--root_--patch-with-stat_master
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git log --root --patch-with-stat master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git log --root -c --patch-with-stat --summary master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.log_--root_-p_master
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git log --root -p master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.log_--root_master
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git log --root master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.log_-p_master
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git log -p master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.log_master
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git log master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.show_master
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git show master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git whatchanged --root --cc --patch-with-stat --summary master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ git whatchanged --root -c --patch-with-stat --summary master
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
Merge: 9a6d494... c7a2ab9...
Merge: 9a6d494 c7a2ab9
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000

Expand Down

0 comments on commit b43174e

Please sign in to comment.