summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rerere.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rerere.c b/rerere.c
index 7b0c262ac6..e92e305f96 100644
--- a/rerere.c
+++ b/rerere.c
@@ -1181,8 +1181,9 @@ static void prune_one(struct rerere_id *id,
/* Does the basename in "path" look plausibly like an rr-cache entry? */
static int is_rr_cache_dirname(const char *path)
{
- unsigned char hash[GIT_MAX_RAWSZ];
- return !get_sha1_hex(path, hash);
+ struct object_id oid;
+ const char *end;
+ return !parse_oid_hex(path, &oid, &end) && !*end;
}
void rerere_gc(struct repository *r, struct string_list *rr)