summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-19 21:05:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-09-19 21:05:12 (GMT)
commitfb6f843a8fbce633a4a1f39f4b7b2a862e5cb855 (patch)
tree2fe9416be5b036455efcdc5cb14c206bdc1c7ba0 /refs.c
parent04481347eccbd797bc9f3dc49e731e3ed7d639df (diff)
parentafd11d3ebcfb18c29840dfa68be32c5215810a77 (diff)
downloadgit-fb6f843a8fbce633a4a1f39f4b7b2a862e5cb855.zip
git-fb6f843a8fbce633a4a1f39f4b7b2a862e5cb855.tar.gz
git-fb6f843a8fbce633a4a1f39f4b7b2a862e5cb855.tar.bz2
Merge branch 'jk/prune-top-level-refs-after-packing' into maint
* jk/prune-top-level-refs-after-packing: pack-refs: prune top-level refs like "refs/foo"
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 27927f2..82e5b1b 100644
--- a/refs.c
+++ b/refs.c
@@ -2387,7 +2387,8 @@ static void try_remove_empty_parents(char *name)
/* make sure nobody touched the ref, and unlink */
static void prune_ref(struct ref_to_prune *r)
{
- struct ref_lock *lock = lock_ref_sha1(r->name + 5, r->sha1);
+ struct ref_lock *lock = lock_any_ref_for_update(r->name, r->sha1,
+ 0, NULL);
if (lock) {
unlink_or_warn(git_path("%s", r->name));