refs_verify_refname_available(): use function in more places
authorMichael Haggerty <mhagger@alum.mit.edu>
Sun, 16 Apr 2017 06:41:27 +0000 (08:41 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Apr 2017 04:32:45 +0000 (21:32 -0700)
commit524a9fdb51b1c7de5bcb83f6ea44015dabef466c
tree213fabd09f00bdaaf1ad603bbba42478c1242034
parentb05855b5bcaf07fe8a636e621bd9d12d51963b5a
refs_verify_refname_available(): use function in more places

Change `lock_raw_ref()` and `lock_ref_sha1_basic()` to use
`refs_verify_refname_available()` instead of
`verify_refname_available_dir()`. This means that those callsites now
check for conflicts with all references rather than just packed refs,
but the performance cost shouldn't be significant (and will be
regained later).

These were the last callers of `verify_refname_available_dir()`, so
also delete that (very complicated) function.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c