Merge branch 'mh/split-under-lock'
authorJunio C Hamano <gitster@pobox.com>
Mon, 25 Jul 2016 21:13:32 +0000 (14:13 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Jul 2016 21:13:32 +0000 (14:13 -0700)
Further preparatory work on the refs API before the pluggable
backend series can land.

* mh/split-under-lock: (33 commits)
lock_ref_sha1_basic(): only handle REF_NODEREF mode
commit_ref_update(): remove the flags parameter
lock_ref_for_update(): don't resolve symrefs
lock_ref_for_update(): don't re-read non-symbolic references
refs: resolve symbolic refs first
ref_transaction_update(): check refname_is_safe() at a minimum
unlock_ref(): move definition higher in the file
lock_ref_for_update(): new function
add_update(): initialize the whole ref_update
verify_refname_available(): adjust constness in declaration
refs: don't dereference on rename
refs: allow log-only updates
delete_branches(): use resolve_refdup()
ref_transaction_commit(): correctly report close_ref() failure
ref_transaction_create(): disallow recursive pruning
refs: make error messages more consistent
lock_ref_sha1_basic(): remove unneeded local variable
read_raw_ref(): move docstring to header file
read_raw_ref(): improve docstring
read_raw_ref(): rename symref argument to referent
...

1  2 
builtin/branch.c
cache.h
dir.h
refs/files-backend.c
t/t1400-update-ref.sh
t/t3200-branch.sh
Simple merge
diff --cc cache.h
Simple merge
diff --cc dir.h
Simple merge
index dac3a22297773c0854a0c19186022ee76c8a7b6b,bbf96ad83a5abc494fbbd99d2bd9cceef6252e97..4dd72b42c88e4e125ec5fa108d3e81bfc8a44483
@@@ -1730,9 -1934,9 +1934,9 @@@ static int verify_lock(struct ref_lock 
                }
        }
        if (old_sha1 && hashcmp(lock->old_oid.hash, old_sha1)) {
-               strbuf_addf(err, "ref %s is at %s but expected %s",
+               strbuf_addf(err, "ref '%s' is at %s but expected %s",
                            lock->ref_name,
 -                          sha1_to_hex(lock->old_oid.hash),
 +                          oid_to_hex(&lock->old_oid),
                            sha1_to_hex(old_sha1));
                errno = EBUSY;
                return -1;
Simple merge
Simple merge