From: Junio C Hamano Date: Fri, 18 Aug 2017 20:52:47 +0000 (-0700) Subject: Merge branch 'mh/packed-ref-store' into next X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/14c58936e14d3abcc64da88ab086f7539c7a0c2f?hp=-c Merge branch 'mh/packed-ref-store' into next The "ref-store" code reorganization continues. * mh/packed-ref-store: files-backend: cheapen refname_available check when locking refs --- 14c58936e14d3abcc64da88ab086f7539c7a0c2f diff --combined refs/files-backend.c index 928a655a27,f2a420c611..5cca55510b --- a/refs/files-backend.c +++ b/refs/files-backend.c @@@ -1,5 -1,4 +1,5 @@@ #include "../cache.h" +#include "../config.h" #include "../refs.h" #include "refs-internal.h" #include "ref-cache.h" @@@ -632,11 -631,11 +632,11 @@@ retry /* * If the ref did not exist and we are creating it, - * make sure there is no existing ref that conflicts - * with refname: + * make sure there is no existing packed ref that + * conflicts with refname: */ if (refs_verify_refname_available( - &refs->base, refname, + refs->packed_ref_store, refname, extras, skip, err)) goto error_return; } @@@ -939,7 -938,7 +939,7 @@@ static struct ref_lock *lock_ref_sha1_b * our refname. */ if (is_null_oid(&lock->old_oid) && - refs_verify_refname_available(&refs->base, refname, + refs_verify_refname_available(refs->packed_ref_store, refname, extras, skip, err)) { last_errno = ENOTDIR; goto error_return; @@@ -2465,7 -2464,8 +2465,7 @@@ static int files_transaction_prepare(st head_oid.hash, &head_type); if (head_ref && !(head_type & REF_ISSYMREF)) { - free(head_ref); - head_ref = NULL; + FREE_AND_NULL(head_ref); } /*