]> asedeno.scripts.mit.edu Git - git.git/blobdiff - log-tree.c
Remove total confusion from git-fetch and git-push
[git.git] / log-tree.c
index cf7947b9c9c37cd0591effc7f3653c1ce2dd723d..84a74e544b7bcc20c887f321e389ecf3cfb560d6 100644 (file)
@@ -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));
        }
 }
 
@@ -58,7 +58,9 @@ void show_decorations(struct rev_info *opt, struct commit *commit)
        struct name_decoration *decoration;
 
        if (opt->show_source && commit->util)
-               printf(" %s", (char *) commit->util);
+               printf("\t%s", (char *) commit->util);
+       if (!opt->show_decorations)
+               return;
        decoration = lookup_decoration(&name_decoration, &commit->object);
        if (!decoration)
                return;
@@ -278,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);
@@ -346,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));