From b5496d484d244bc291db0973466b76e7f679cb9f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 13 Jan 2016 13:17:19 +0100 Subject: remote: handle the config setting branch.*.rebase=interactive The config variable branch..rebase is not only used by `git pull`, but also by `git remote` when showing details about a remote. Therefore, it needs to be taught to accept the newly-introduced `interactive` value of said variable. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano diff --git a/builtin/remote.c b/builtin/remote.c index 6694cf2..2b2ff9b 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -251,7 +251,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; @@ -311,7 +311,9 @@ static int config_read_branches(const char *key, const char *value, void *cb) if (v >= 0) info->rebase = v; else if (!strcmp(value, "preserve")) - info->rebase = 1; + info->rebase = NORMAL_REBASE; + else if (!strcmp(value, "interactive")) + info->rebase = INTERACTIVE_REBASE; } } return 0; @@ -980,7 +982,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); -- cgit v0.10.2-6-g49f6