mirror of
https://github.com/git/git.git
synced 2026-01-16 21:59:45 +00:00
Teach 'git remote' that the config var branch.*.rebase can be 'interactive'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -253,7 +253,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;
|
||||
@@ -310,7 +310,10 @@ static int config_read_branches(const char *key, const char *value, void *cb)
|
||||
}
|
||||
string_list_append(&info->merge, xstrdup(value));
|
||||
} else
|
||||
info->rebase = git_config_bool(orig_key, value);
|
||||
info->rebase = value && *value == 'i' ?
|
||||
INTERACTIVE_REBASE :
|
||||
(git_config_bool(orig_key, value) ?
|
||||
NORMAL_REBASE : NO_REBASE);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -994,7 +997,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("rebases onto remote %s\n", merge->items[0].string);
|
||||
printf("rebases %sonto remote %s\n",
|
||||
branch_info->rebase == INTERACTIVE_REBASE ?
|
||||
"interactively " : "", merge->items[0].string);
|
||||
return 0;
|
||||
} else if (show_info->any_rebase) {
|
||||
printf(" merges with remote %s\n", merge->items[0].string);
|
||||
|
||||
Reference in New Issue
Block a user