summaryrefslogtreecommitdiff
path: root/builtin-rerere.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-rerere.c')
-rw-r--r--builtin-rerere.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-rerere.c b/builtin-rerere.c
index adfb7b5f48..31fda73ae7 100644
--- a/builtin-rerere.c
+++ b/builtin-rerere.c
@@ -48,6 +48,8 @@ static void garbage_collect(struct string_list *rr)
git_config(git_rerere_gc_config, NULL);
dir = opendir(git_path("rr-cache"));
+ if (!dir)
+ die_errno("unable to open rr-cache directory");
while ((e = readdir(dir))) {
if (is_dot_or_dotdot(e->d_name))
continue;