resolve_packed_ref(): rename function from resolve_missing_loose_ref()
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Sep 4, 2016 at 18:08 UTC
611118d06ebba572424fa39473869eee1a1238fb
1 file changed
+5
-6
refs/files-backend.c
+5
-6
@@ -1329,10 +1329,9 @@ static struct ref_entry *get_packed_ref(struct files_ref_store *refs,
1329
/*
1330
* A loose ref file doesn't exist; check for a packed ref.
1331
*/
1332
-static int resolve_missing_loose_ref(struct files_ref_store *refs,
1333
- const char *refname,
1334
- unsigned char *sha1,
1335
- unsigned int *flags)
1332
+static int resolve_packed_ref(struct files_ref_store *refs,
1333
+ const char *refname,
1334
+ unsigned char *sha1, unsigned int *flags)
1335
{
1336
struct ref_entry *entry;
1337
@@ -1383,7 +1382,7 @@ stat_ref:
1382
if (lstat(path, &st) < 0) {
1383
if (errno != ENOENT)
1384
goto out;
1386
- if (resolve_missing_loose_ref(refs, refname, sha1, type)) {
1385
+ if (resolve_packed_ref(refs, refname, sha1, type)) {
1386
errno = ENOENT;
1387
goto out;
1388
}
@@ -1417,7 +1416,7 @@ stat_ref:
1416
* ref is supposed to be, there could still be a
1417
* packed ref:
1418
*/
1420
- if (resolve_missing_loose_ref(refs, refname, sha1, type)) {
1419
+ if (resolve_packed_ref(refs, refname, sha1, type)) {
1420
errno = EISDIR;
1421
goto out;
1422
}