Skip to content

Commit 69eed0b

Browse files
committed
Teach 'git remote' that the config var branch.*.rebase can be 'interactive'
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 9eeb16d commit 69eed0b

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
@@ -245,7 +245,7 @@ static int add(int argc, const char **argv)
245245
struct branch_info {
246246
char *remote_name;
247247
struct string_list merge;
248-
int rebase;
248+
enum { NO_REBASE, NORMAL_REBASE, INTERACTIVE_REBASE } rebase;
249249
};
250250

251251
static struct string_list branch_list;
@@ -306,6 +306,8 @@ static int config_read_branches(const char *key, const char *value, void *cb)
306306
info->rebase = v;
307307
else if (!strcmp(value, "preserve"))
308308
info->rebase = 1;
309+
else if (!strcmp(value, "interactive"))
310+
info->rebase = INTERACTIVE_REBASE;
309311
}
310312
}
311313
return 0;
@@ -1000,7 +1002,9 @@ static int show_local_info_item(struct string_list_item *item, void *cb_data)
10001002

10011003
printf(" %-*s ", show_info->width, item->string);
10021004
if (branch_info->rebase) {
1003-
printf_ln(_("rebases onto remote %s"), merge->items[0].string);
1005+
printf_ln(_(branch_info->rebase == INTERACTIVE_REBASE ?
1006+
"rebases interactively onto remote %s" :
1007+
"rebases onto remote %s"), merge->items[0].string);
10041008
return 0;
10051009
} else if (show_info->any_rebase) {
10061010
printf_ln(_(" merges with remote %s"), merge->items[0].string);

0 commit comments

Comments
 (0)