there is no need to grab locks when opening refs in got_ref_delete()
diff --git a/lib/reference.c b/lib/reference.c
index 0106f4d..2b33b7d 100644
--- a/lib/reference.c
+++ b/lib/reference.c
@@ -1364,7 +1364,7 @@ got_ref_delete(struct got_reference *ref, struct got_repository *repo)
if (err)
return err;
- err = got_ref_open(&ref2, repo, got_ref_get_name(ref), 1);
+ err = got_ref_open(&ref2, repo, got_ref_get_name(ref), 0);
if (err) {
if (err->code == GOT_ERR_NOT_REF)
return NULL;
@@ -1379,7 +1379,7 @@ got_ref_delete(struct got_reference *ref, struct got_repository *repo)
if (err)
return err;
- err = got_ref_open(&ref2, repo, got_ref_get_name(ref), 1);
+ err = got_ref_open(&ref2, repo, got_ref_get_name(ref), 0);
if (err) {
if (err->code == GOT_ERR_NOT_REF)
return NULL;