Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Fix random sha1 in error message in http-fetch and http-push
[gitweb.git]
/
http-walker.c
diff --git
a/http-walker.c
b/http-walker.c
index a3fb596542eea6d85a6cb32add100e8d71e7713a..0faafbce6164b18cdd960bc8c7d254507d4a2731 100644
(file)
--- 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)