Skip to content

Commit 6fe5b7f

Browse files
author
Junio C Hamano
committed
git-push: .git/remotes/ file does not require SP after colon
Although most people would have one after colon if only for readability, we never required it in git-parse-remote, so let's not require one only in git-push. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 4fddf57 commit 6fe5b7f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builtin-push.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ static int get_remotes_uri(const char *repo, const char *uri[MAX_URI])
8080
int is_refspec;
8181
char *s, *p;
8282

83-
if (!strncmp("URL: ", buffer, 5)) {
83+
if (!strncmp("URL:", buffer, 4)) {
8484
is_refspec = 0;
85-
s = buffer + 5;
86-
} else if (!strncmp("Push: ", buffer, 6)) {
85+
s = buffer + 4;
86+
} else if (!strncmp("Push:", buffer, 5)) {
8787
is_refspec = 1;
88-
s = buffer + 6;
88+
s = buffer + 5;
8989
} else
9090
continue;
9191

0 commit comments

Comments
 (0)