Merge branch 'nd/commit-util-to-slab'
The in-core "commit" object had an all-purpose "void *util" field, which was tricky to use especially in library-ish part of the code. All of the existing uses of the field has been migrated to a more dedicated "commit-slab" mechanism and the field is eliminated. * nd/commit-util-to-slab: commit.h: delete 'util' field in struct commit merge: use commit-slab in merge remote desc instead of commit->util log: use commit-slab in prepare_bases() instead of commit->util show-branch: note about its object flags usage show-branch: use commit-slab for commit-name instead of commit->util name-rev: use commit-slab for rev-name instead of commit->util bisect.c: use commit-slab for commit weight instead of commit->util revision.c: use commit-slab for show_source sequencer.c: use commit-slab to associate todo items to commits sequencer.c: use commit-slab to mark seen commits shallow.c: use commit-slab for commit depth instead of commit->util describe: use commit-slab for commit names instead of commit->util blame: use commit-slab for blame suspects instead of commit->util commit-slab: support shared commit-slab commit-slab.h: code split
This commit is contained in:
@ -286,10 +286,12 @@ static void output(struct merge_options *o, int v, const char *fmt, ...)
|
||||
|
||||
static void output_commit_title(struct merge_options *o, struct commit *commit)
|
||||
{
|
||||
struct merge_remote_desc *desc;
|
||||
|
||||
strbuf_addchars(&o->obuf, ' ', o->call_depth * 2);
|
||||
if (commit->util)
|
||||
strbuf_addf(&o->obuf, "virtual %s\n",
|
||||
merge_remote_util(commit)->name);
|
||||
desc = merge_remote_util(commit);
|
||||
if (desc)
|
||||
strbuf_addf(&o->obuf, "virtual %s\n", desc->name);
|
||||
else {
|
||||
strbuf_add_unique_abbrev(&o->obuf, &commit->object.oid,
|
||||
DEFAULT_ABBREV);
|
||||
|
||||
Reference in New Issue
Block a user