Thread (2 messages) 2 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH] Don't fail in http-pull if URL is missing a '/' at the end

From: Andreas Gal <hidden>
Date: 2016-06-15 22:41:54

http-pull fails if the URL doesn't end with a '/'. This patch adds one if 
needed.

Signed-off-by: Andreas Gal <redacted>
--- http-pull.c	2005-04-25 09:15:45.000000000 -0700
+++ /home/gal/src/git/git-bit/http-pull.c	2005-04-25 09:09:54.000000000 -0700
@@ -76,6 +76,8 @@
 	url = malloc(strlen(base) + 50);
 	strcpy(url, base);
 	posn = url + strlen(base);
+	if (posn[-1] != '/')
+		*posn++ = '/';
 	strcpy(posn, "objects/");
 	posn += 8;
 	memcpy(posn, hex, 2);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help