summaryrefslogtreecommitdiffstats
path: root/builtin/pull.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-01-27 00:40:28 +0100
committerJunio C Hamano <gitster@pobox.com>2016-01-27 00:40:28 +0100
commitf9219c0b3233229c6686224dfc953e5b3fe92a84 (patch)
treedda36de7637de07f35bcdbec4a5ccb41b0821aaa /builtin/pull.c
parentMerge branch 'ep/shell-command-substitution-style' (diff)
parentcompletion: add missing branch.*.rebase values (diff)
downloadgit-f9219c0b3233229c6686224dfc953e5b3fe92a84.tar.xz
git-f9219c0b3233229c6686224dfc953e5b3fe92a84.zip
Merge branch 'js/pull-rebase-i'
"git pull --rebase" has been extended to allow invoking "rebase -i". * js/pull-rebase-i: completion: add missing branch.*.rebase values remote: handle the config setting branch.*.rebase=interactive pull: allow interactive rebase with --rebase=interactive
Diffstat (limited to 'builtin/pull.c')
-rw-r--r--builtin/pull.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/builtin/pull.c b/builtin/pull.c
index 9e3c73809f..c713fe065b 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -22,7 +22,8 @@ enum rebase_type {
REBASE_INVALID = -1,
REBASE_FALSE = 0,
REBASE_TRUE,
- REBASE_PRESERVE
+ REBASE_PRESERVE,
+ REBASE_INTERACTIVE
};
/**
@@ -42,6 +43,8 @@ static enum rebase_type parse_config_rebase(const char *key, const char *value,
return REBASE_TRUE;
else if (!strcmp(value, "preserve"))
return REBASE_PRESERVE;
+ else if (!strcmp(value, "interactive"))
+ return REBASE_INTERACTIVE;
if (fatal)
die(_("Invalid value for %s: %s"), key, value);
@@ -113,7 +116,7 @@ static struct option pull_options[] = {
/* Options passed to git-merge or git-rebase */
OPT_GROUP(N_("Options related to merging")),
{ OPTION_CALLBACK, 'r', "rebase", &opt_rebase,
- "false|true|preserve",
+ "false|true|preserve|interactive",
N_("incorporate changes by rebasing rather than merging"),
PARSE_OPT_OPTARG, parse_opt_rebase },
OPT_PASSTHRU('n', NULL, &opt_diffstat, NULL,
@@ -778,6 +781,8 @@ static int run_rebase(const unsigned char *curr_head,
/* Options passed to git-rebase */
if (opt_rebase == REBASE_PRESERVE)
argv_array_push(&args, "--preserve-merges");
+ else if (opt_rebase == REBASE_INTERACTIVE)
+ argv_array_push(&args, "--interactive");
if (opt_diffstat)
argv_array_push(&args, opt_diffstat);
argv_array_pushv(&args, opt_strategies.argv);