]> Pileus Git - ~andy/git/commitdiff
remote: fix status with branch...rebase=preserve
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 7 Dec 2013 13:08:37 +0000 (07:08 -0600)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Dec 2013 22:12:24 +0000 (14:12 -0800)
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>
builtin/remote.c

index 4e14891095e6ea016b9f44262ae300c42a75e1b2..5e4ab66c26a0a59a7df28fad0d08a3d04368c11a 100644 (file)
@@ -309,8 +309,13 @@ static int config_read_branches(const char *key, const char *value, void *cb)
                                space = strchr(value, ' ');
                        }
                        string_list_append(&info->merge, xstrdup(value));
-               } else
-                       info->rebase = git_config_bool(orig_key, value);
+               } else {
+                       int v = git_config_maybe_bool(orig_key, value);
+                       if (v >= 0)
+                               info->rebase = v;
+                       else if (!strcmp(value, "preserve"))
+                               info->rebase = 1;
+               }
        }
        return 0;
 }