Skip to content

Commit 0a54f70

Browse files
Felipe Contrerasgitster
authored andcommitted
remote: fix status with branch...rebase=preserve
Commit 66713ef (pull: allow pull to preserve merges when rebasing) didn't include an update so 'git remote status' parses branch.<name>.rebase=preserve correctly, let's do that. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 379484b commit 0a54f70

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

builtin/remote.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,13 @@ static int config_read_branches(const char *key, const char *value, void *cb)
309309
space = strchr(value, ' ');
310310
}
311311
string_list_append(&info->merge, xstrdup(value));
312-
} else
313-
info->rebase = git_config_bool(orig_key, value);
312+
} else {
313+
int v = git_config_maybe_bool(orig_key, value);
314+
if (v >= 0)
315+
info->rebase = v;
316+
else if (!strcmp(value, "preserve"))
317+
info->rebase = 1;
318+
}
314319
}
315320
return 0;
316321
}

0 commit comments

Comments
 (0)