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

Commit bf5519e

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

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;
@@ -304,6 +304,8 @@ static int config_read_branches(const char *key, const char *value, void *cb)
304304
info->rebase = v;
305305
else if (!strcmp(value, "preserve"))
306306
info->rebase = 1;
307+
else if (!strcmp(value, "interactive"))
308+
info->rebase = INTERACTIVE_REBASE;
307309
}
308310
}
309311
return 0;
@@ -999,7 +1001,9 @@ static int show_local_info_item(struct string_list_item *item, void *cb_data)
9991001

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

0 commit comments

Comments
 (0)