From bf5519ec4a12e51960e857d1fa3439cf61f6fa61 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/builtin/remote.c b/builtin/remote.c index 9a4640dbf0..eee9ef48c4 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -243,7 +243,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; @@ -304,6 +304,8 @@ static int config_read_branches(const char *key, const char *value, void *cb) info->rebase = v; else if (!strcmp(value, "preserve")) info->rebase = 1; + else if (!strcmp(value, "interactive")) + info->rebase = INTERACTIVE_REBASE; } } return 0; @@ -999,7 +1001,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