From 62b4c546c517f3bcfe23a025ec8b6e7be0e703fb Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 3 Feb 2012 00:12:04 -0600 Subject: [PATCH] Teach 'git remote' that the config var branch.*.rebase can be 'interactive' Signed-off-by: Johannes Schindelin --- builtin/remote.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/builtin/remote.c b/builtin/remote.c index a5a4b23231..beceb65168 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -253,7 +253,7 @@ static int add(int argc, const char **argv) struct branch_info { char *remote_name; struct string_list merge; - int rebase; + enum { NO_REBASE, NORMAL_REBASE, INTERACTIVE_REBASE } rebase; }; static struct string_list branch_list; @@ -310,7 +310,10 @@ static int config_read_branches(const char *key, const char *value, void *cb) } string_list_append(&info->merge, xstrdup(value)); } else - info->rebase = git_config_bool(orig_key, value); + info->rebase = value && *value == 'i' ? + INTERACTIVE_REBASE : + (git_config_bool(orig_key, value) ? + NORMAL_REBASE : NO_REBASE); } return 0; } @@ -995,7 +998,9 @@ static int show_local_info_item(struct string_list_item *item, void *cb_data) printf(" %-*s ", show_info->width, item->string); if (branch_info->rebase) { - printf_ln(_("rebases onto remote %s"), merge->items[0].string); + printf_ln(_(branch_info->rebase == INTERACTIVE_REBASE ? + "rebases interactively onto remote %s" : + "rebases onto remote %s"), merge->items[0].string); return 0; } else if (show_info->any_rebase) { printf_ln(_(" merges with remote %s"), merge->items[0].string); -- 2.11.4.GIT