From: Johannes Schindelin Date: Wed, 13 Jan 2016 12:17:19 +0000 (+0100) Subject: remote: handle the config setting branch.*.rebase=interactive X-Git-Tag: v2.8.0-rc0~102^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5496d484d244bc291db0973466b76e7f679cb9f;p=thirdparty%2Fgit.git 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 6694cf20ef..2b2ff9b7d2 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);