summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/fetch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 75a55e590b..9f7fe983a9 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -978,10 +978,9 @@ static int get_remote_group(const char *key, const char *value, void *priv)
/* split list by white space */
int space = strcspn(value, " \t\n");
while (*value) {
- if (space > 1) {
+ if (space >= 1)
string_list_append(g->list,
xstrndup(value, space));
- }
value += space + (value[space] != '\0');
space = strcspn(value, " \t\n");
}