зеркало из https://github.com/microsoft/git.git
remote: handle the config setting branch.*.rebase=interactive
The config variable branch.<branchname>.rebase is not only used by `git pull`, but also by `git remote` when showing details about a remote. Therefore, it needs to be taught to accept the newly-introduced `interactive` value of said variable. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
f5eb87b98d
Коммит
b5496d484d
|
@ -251,7 +251,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;
|
||||
|
@ -311,7 +311,9 @@ static int config_read_branches(const char *key, const char *value, void *cb)
|
|||
if (v >= 0)
|
||||
info->rebase = v;
|
||||
else if (!strcmp(value, "preserve"))
|
||||
info->rebase = 1;
|
||||
info->rebase = NORMAL_REBASE;
|
||||
else if (!strcmp(value, "interactive"))
|
||||
info->rebase = INTERACTIVE_REBASE;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -980,7 +982,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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче