Skip to content

Commit c901420

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

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;
@@ -974,7 +976,9 @@ static int show_local_info_item(struct string_list_item *item, void *cb_data)
974976

975977
printf(" %-*s ", show_info->width, item->string);
976978
if (branch_info->rebase) {
977-
printf_ln(_("rebases onto remote %s"), merge->items[0].string);
979+
printf_ln(_(branch_info->rebase == INTERACTIVE_REBASE ?
980+
"rebases interactively onto remote %s" :
981+
"rebases onto remote %s"), merge->items[0].string);
978982
return 0;
979983
} else if (show_info->any_rebase) {
980984
printf_ln(_(" merges with remote %s"), merge->items[0].string);

0 commit comments

Comments
 (0)