aboutsummaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2016-09-04 18:08:18 +0200
committerJunio C Hamano <gitster@pobox.com>2016-09-09 15:28:12 -0700
commit611118d06ebba572424fa39473869eee1a1238fb (patch)
treed7cb380785d6bbc137ddc7f1fdf6c023a98a00ff /refs
parent6356c658e424dbd45b278f164b0c36a2062a1bcb (diff)
downloadgit-611118d06ebba572424fa39473869eee1a1238fb.tar.gz
git-611118d06ebba572424fa39473869eee1a1238fb.tar.xz
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>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 748e5cb07..924bdda19 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1329,10 +1329,9 @@ static struct ref_entry *get_packed_ref(struct files_ref_store *refs,
/*
* A loose ref file doesn't exist; check for a packed ref.
*/
-static int resolve_missing_loose_ref(struct files_ref_store *refs,
- const char *refname,
- unsigned char *sha1,
- unsigned int *flags)
+static int resolve_packed_ref(struct files_ref_store *refs,
+ const char *refname,
+ unsigned char *sha1, unsigned int *flags)
{
struct ref_entry *entry;
@@ -1383,7 +1382,7 @@ stat_ref:
if (lstat(path, &st) < 0) {
if (errno != ENOENT)
goto out;
- if (resolve_missing_loose_ref(refs, refname, sha1, type)) {
+ if (resolve_packed_ref(refs, refname, sha1, type)) {
errno = ENOENT;
goto out;
}
@@ -1417,7 +1416,7 @@ stat_ref:
* ref is supposed to be, there could still be a
* packed ref:
*/
- if (resolve_missing_loose_ref(refs, refname, sha1, type)) {
+ if (resolve_packed_ref(refs, refname, sha1, type)) {
errno = EISDIR;
goto out;
}