Merge branch 'bc/object-id'
Conversion from uchar[20] to struct object_id continues. * bc/object-id: (25 commits) refs/files-backend: convert static functions to object_id refs: convert read_raw_ref backends to struct object_id refs: convert peel_object to struct object_id refs: convert resolve_ref_unsafe to struct object_id worktree: convert struct worktree to object_id refs: convert resolve_gitlink_ref to struct object_id Convert remaining callers of resolve_gitlink_ref to object_id sha1_file: convert index_path and index_fd to struct object_id refs: convert reflog_expire parameter to struct object_id refs: convert read_ref_at to struct object_id refs: convert peel_ref to struct object_id builtin/pack-objects: convert to struct object_id pack-bitmap: convert traverse_bitmap_commit_list to object_id refs: convert dwim_log to struct object_id builtin/reflog: convert remaining unsigned char uses to object_id refs: convert dwim_ref and expand_ref to struct object_id refs: convert read_ref and read_ref_full to object_id refs: convert resolve_refdup and refs_resolve_refdup to struct object_id Convert check_connected to use struct object_id refs: update ref transactions to use struct object_id ...
This commit is contained in:
@ -191,7 +191,7 @@ static int ce_compare_link(const struct cache_entry *ce, size_t expected_size)
|
||||
|
||||
static int ce_compare_gitlink(const struct cache_entry *ce)
|
||||
{
|
||||
unsigned char sha1[20];
|
||||
struct object_id oid;
|
||||
|
||||
/*
|
||||
* We don't actually require that the .git directory
|
||||
@ -201,9 +201,9 @@ static int ce_compare_gitlink(const struct cache_entry *ce)
|
||||
*
|
||||
* If so, we consider it always to match.
|
||||
*/
|
||||
if (resolve_gitlink_ref(ce->name, "HEAD", sha1) < 0)
|
||||
if (resolve_gitlink_ref(ce->name, "HEAD", &oid) < 0)
|
||||
return 0;
|
||||
return hashcmp(sha1, ce->oid.hash);
|
||||
return oidcmp(&oid, &ce->oid);
|
||||
}
|
||||
|
||||
static int ce_modified_check_fs(const struct cache_entry *ce, struct stat *st)
|
||||
|
Reference in New Issue
Block a user