Teach 'git remote' that the config var branch.*.rebase can be 'interactive'

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2012-02-03 00:12:04 -06:00
parent b81d6a7a92
commit d866853c35

View File

@@ -245,7 +245,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;
@@ -306,6 +306,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;
@@ -974,7 +976,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);