read-cache: teach make_cache_entry to take object_id

Teach make_cache_entry function to take object_id instead of a SHA-1.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jameson Miller
2018-07-02 19:49:30 +00:00
committed by Junio C Hamano
parent 768d796506
commit 825ed4d9a0
8 changed files with 18 additions and 11 deletions

View File

@ -315,7 +315,7 @@ static int add_cacheinfo(struct merge_options *o,
struct cache_entry *ce;
int ret;
ce = make_cache_entry(mode, oid ? oid->hash : null_sha1, path, stage, 0);
ce = make_cache_entry(mode, oid ? oid : &null_oid, path, stage, 0);
if (!ce)
return err(o, _("add_cacheinfo failed for path '%s'; merge aborting."), path);