summaryrefslogtreecommitdiff
path: root/refs/ref-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-08 12:17:54 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-08 12:17:54 -0700
commit8d3abe9f8af706baafedba4283114f94a0cda4a1 (patch)
tree01af1392d443d0158e0c72859bb24c0662379d4b /refs/ref-cache.c
parent47f870c4aea997b1df0e303fa4957e62faaaa137 (diff)
parent351c6e719ae9c5b97506dde6bc287408b80e87e4 (diff)
Merge branch 'kn/ref-cache-seek-fix'
Handling of an empty subdirectory of .git/refs/ in the ref-files backend has been corrected. * kn/ref-cache-seek-fix: refs/ref-cache: fix SEGFAULT when seeking in empty directories
Diffstat (limited to 'refs/ref-cache.c')
-rw-r--r--refs/ref-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs/ref-cache.c b/refs/ref-cache.c
index c180e0aad7..e5e5df16d8 100644
--- a/refs/ref-cache.c
+++ b/refs/ref-cache.c
@@ -539,7 +539,7 @@ static int cache_ref_iterator_seek(struct ref_iterator *ref_iterator,
*/
break;
}
- } while (slash);
+ } while (slash && dir->nr);
}
return 0;