summaryrefslogtreecommitdiff
path: root/http-walker.c
diff options
context:
space:
mode:
Diffstat (limited to 'http-walker.c')
-rw-r--r--http-walker.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/http-walker.c b/http-walker.c
index a3fb596542..0faafbce61 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -986,9 +986,10 @@ static int fetch_ref(struct walker *walker, char *ref, unsigned char *sha1)
return error("Unable to start request");
}
+ if (buffer.posn != 41)
+ return 1;
hex[40] = '\0';
- get_sha1_hex(hex, sha1);
- return 0;
+ return get_sha1_hex(hex, sha1);
}
static void cleanup(struct walker *walker)