Commit 14d2b281dd2fafec8beebfca6b5911b0ff21d676

Stefan Sperling 2021-08-25T21:40:38

fix the error message shown when the server sends a bad ref line Exposed by trying to run got clone -l against shithub.us over git:// found by abieber@

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libexec/got-fetch-pack/got-fetch-pack.c b/libexec/got-fetch-pack/got-fetch-pack.c
index 10f3a9c..299f0e6 100644
--- a/libexec/got-fetch-pack/got-fetch-pack.c
+++ b/libexec/got-fetch-pack/got-fetch-pack.c
@@ -311,7 +311,7 @@ tokenize_refline(char **tokens, char *line, int len, int maxtokens)
 		}
 	}
 	if (i <= 2)
-		err = got_error(GOT_ERR_NOT_REF);
+		err = got_error(GOT_ERR_BAD_PACKET);
 done:
 	if (err) {
 		int j;