diff --git a/remote-curl.c b/remote-curl.c
index faaeda44a9225ff56d45e9566cccf1a2278abb27..69831e931af1fe2a3e668239e8c4bb73a7bfb936 100644 (file)
--- a/remote-curl.c
+++ b/remote-curl.c
if (data[i] == '\t')
mid = &data[i];
if (data[i] == '\n') {
+ if (mid - start != 40)
+ die("%sinfo/refs not valid: is this a git repository?", url);
data[i] = 0;
ref_name = mid + 1;
ref = xmalloc(sizeof(struct ref) +