Merge branch 'rs/resolve-ref-optional-result'
Code clean-up. * rs/resolve-ref-optional-result: refs: pass NULL to resolve_ref_unsafe() if hash is not needed refs: pass NULL to refs_resolve_ref_unsafe() if hash is not needed refs: make sha1 output parameter of refs_resolve_ref_unsafe() optional
This commit is contained in:
@ -1676,13 +1676,12 @@ static int commit_ref_update(struct files_ref_store *refs,
|
||||
* check with HEAD only which should cover 99% of all usage
|
||||
* scenarios (even 100% of the default ones).
|
||||
*/
|
||||
struct object_id head_oid;
|
||||
int head_flag;
|
||||
const char *head_ref;
|
||||
|
||||
head_ref = refs_resolve_ref_unsafe(&refs->base, "HEAD",
|
||||
RESOLVE_REF_READING,
|
||||
head_oid.hash, &head_flag);
|
||||
NULL, &head_flag);
|
||||
if (head_ref && (head_flag & REF_ISSYMREF) &&
|
||||
!strcmp(head_ref, lock->ref_name)) {
|
||||
struct strbuf log_err = STRBUF_INIT;
|
||||
|
Reference in New Issue
Block a user