Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 12c7600

Browse files
dschokasal
authored andcommitted
Teach 'git remote' that the config var branch.*.rebase can be 'interactive'
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e797040 commit 12c7600

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

builtin/remote.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static int add(int argc, const char **argv)
243243
struct branch_info {
244244
char *remote_name;
245245
struct string_list merge;
246-
int rebase;
246+
enum { NO_REBASE, NORMAL_REBASE, INTERACTIVE_REBASE } rebase;
247247
};
248248

249249
static struct string_list branch_list;
@@ -305,6 +305,8 @@ static int config_read_branches(const char *key, const char *value, void *cb)
305305
info->rebase = v;
306306
else if (!strcmp(value, "preserve"))
307307
info->rebase = 1;
308+
else if (!strcmp(value, "interactive"))
309+
info->rebase = INTERACTIVE_REBASE;
308310
}
309311
}
310312
return 0;
@@ -990,7 +992,9 @@ static int show_local_info_item(struct string_list_item *item, void *cb_data)
990992

991993
printf(" %-*s ", show_info->width, item->string);
992994
if (branch_info->rebase) {
993-
printf_ln(_("rebases onto remote %s"), merge->items[0].string);
995+
printf_ln(_(branch_info->rebase == INTERACTIVE_REBASE ?
996+
"rebases interactively onto remote %s" :
997+
"rebases onto remote %s"), merge->items[0].string);
994998
return 0;
995999
} else if (show_info->any_rebase) {
9961000
printf_ln(_(" merges with remote %s"), merge->items[0].string);

0 commit comments

Comments
 (0)