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>
This commit is contained in:

committed by
Junio C Hamano

parent
6356c658e4
commit
611118d06e
@ -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.
|
* A loose ref file doesn't exist; check for a packed ref.
|
||||||
*/
|
*/
|
||||||
static int resolve_missing_loose_ref(struct files_ref_store *refs,
|
static int resolve_packed_ref(struct files_ref_store *refs,
|
||||||
const char *refname,
|
const char *refname,
|
||||||
unsigned char *sha1,
|
unsigned char *sha1, unsigned int *flags)
|
||||||
unsigned int *flags)
|
|
||||||
{
|
{
|
||||||
struct ref_entry *entry;
|
struct ref_entry *entry;
|
||||||
|
|
||||||
@ -1383,7 +1382,7 @@ stat_ref:
|
|||||||
if (lstat(path, &st) < 0) {
|
if (lstat(path, &st) < 0) {
|
||||||
if (errno != ENOENT)
|
if (errno != ENOENT)
|
||||||
goto out;
|
goto out;
|
||||||
if (resolve_missing_loose_ref(refs, refname, sha1, type)) {
|
if (resolve_packed_ref(refs, refname, sha1, type)) {
|
||||||
errno = ENOENT;
|
errno = ENOENT;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -1417,7 +1416,7 @@ stat_ref:
|
|||||||
* ref is supposed to be, there could still be a
|
* ref is supposed to be, there could still be a
|
||||||
* packed ref:
|
* packed ref:
|
||||||
*/
|
*/
|
||||||
if (resolve_missing_loose_ref(refs, refname, sha1, type)) {
|
if (resolve_packed_ref(refs, refname, sha1, type)) {
|
||||||
errno = EISDIR;
|
errno = EISDIR;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user