Convert find_unique_abbrev* to struct object_id
Convert find_unique_abbrev and find_unique_abbrev_r to each take a pointer to struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
40f5555ca3
commit
aab9583f7b
12
log-tree.c
12
log-tree.c
@ -177,7 +177,7 @@ static void show_parents(struct commit *commit, int abbrev, FILE *file)
|
||||
struct commit_list *p;
|
||||
for (p = commit->parents; p ; p = p->next) {
|
||||
struct commit *parent = p->item;
|
||||
fprintf(file, " %s", find_unique_abbrev(parent->object.oid.hash, abbrev));
|
||||
fprintf(file, " %s", find_unique_abbrev(&parent->object.oid, abbrev));
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ static void show_children(struct rev_info *opt, struct commit *commit, int abbre
|
||||
{
|
||||
struct commit_list *p = lookup_decoration(&opt->children, &commit->object);
|
||||
for ( ; p; p = p->next) {
|
||||
fprintf(opt->diffopt.file, " %s", find_unique_abbrev(p->item->object.oid.hash, abbrev));
|
||||
fprintf(opt->diffopt.file, " %s", find_unique_abbrev(&p->item->object.oid, abbrev));
|
||||
}
|
||||
}
|
||||
|
||||
@ -558,7 +558,7 @@ void show_log(struct rev_info *opt)
|
||||
|
||||
if (!opt->graph)
|
||||
put_revision_mark(opt, commit);
|
||||
fputs(find_unique_abbrev(commit->object.oid.hash, abbrev_commit), opt->diffopt.file);
|
||||
fputs(find_unique_abbrev(&commit->object.oid, abbrev_commit), opt->diffopt.file);
|
||||
if (opt->print_parents)
|
||||
show_parents(commit, abbrev_commit, opt->diffopt.file);
|
||||
if (opt->children.name)
|
||||
@ -620,7 +620,8 @@ void show_log(struct rev_info *opt)
|
||||
|
||||
if (!opt->graph)
|
||||
put_revision_mark(opt, commit);
|
||||
fputs(find_unique_abbrev(commit->object.oid.hash, abbrev_commit),
|
||||
fputs(find_unique_abbrev(&commit->object.oid,
|
||||
abbrev_commit),
|
||||
opt->diffopt.file);
|
||||
if (opt->print_parents)
|
||||
show_parents(commit, abbrev_commit, opt->diffopt.file);
|
||||
@ -628,8 +629,7 @@ void show_log(struct rev_info *opt)
|
||||
show_children(opt, commit, abbrev_commit);
|
||||
if (parent)
|
||||
fprintf(opt->diffopt.file, " (from %s)",
|
||||
find_unique_abbrev(parent->object.oid.hash,
|
||||
abbrev_commit));
|
||||
find_unique_abbrev(&parent->object.oid, abbrev_commit));
|
||||
fputs(diff_get_color_opt(&opt->diffopt, DIFF_RESET), opt->diffopt.file);
|
||||
show_decorations(opt, commit);
|
||||
if (opt->commit_format == CMIT_FMT_ONELINE) {
|
||||
|
Reference in New Issue
Block a user