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>
Felipe Contreras committed
Dec 7, 2013 at 07:08 UTC
0a54f709057729d0aa9f1e767e4f201834f14834
1 file changed
+7
-2
builtin/remote.c
+7
-2
@@ -309,8 +309,13 @@ static int config_read_branches(const char *key, const char *value, void *cb)
309
space = strchr(value, ' ');
310
}
311
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
+ }
319
}
320
return 0;
321
}