From cdabadb58522ff7945058f5f80b198ccbe83ec02 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 fec92bc66e..7b37a23d97 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; } @@ -994,7 +997,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("rebases onto remote %s\n", merge->items[0].string); + printf("rebases %sonto remote %s\n", + branch_info->rebase == INTERACTIVE_REBASE ? + "interactively " : "", merge->items[0].string); return 0; } else if (show_info->any_rebase) { printf(" merges with remote %s\n", merge->items[0].string); -- 2.11.4.GIT