summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-12-04 21:25:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-05 14:06:18 (GMT)
commitcae0bc09abcb12aff79f1aea85d578df7856de4a (patch)
tree023283ac049a5b6282f4ecbb432ec4b6d660d968 /builtin
parent945dc55dda595a3e5449017797cb90599ed9ecb5 (diff)
downloadgit-cae0bc09abcb12aff79f1aea85d578df7856de4a.zip
git-cae0bc09abcb12aff79f1aea85d578df7856de4a.tar.gz
git-cae0bc09abcb12aff79f1aea85d578df7856de4a.tar.bz2
rebase: fix format.useAutoBase breakage
With `format.useAutoBase = true`, running rebase resulted in an error: fatal: failed to get upstream, if you want to record base commit automatically, please use git branch --set-upstream-to to track a remote branch. Or you could specify base commit by --base=<base-commit-id> manually error: git encountered an error while preparing the patches to replay these revisions: ede2467cdedc63784887b587a61c36b7850ebfac..d8f581194799ae29bf5fa72a98cbae98a1198b12 As a result, git cannot rebase them. Fix this by always passing `--no-base` to format-patch from rebase so that the effect of `format.useAutoBase` is negated. Reported-by: Christian Biesinger <cbiesinger@google.com> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/rebase.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c
index e755087..51980ab 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1012,7 +1012,8 @@ static int run_am(struct rebase_options *opts)
argv_array_pushl(&format_patch.args, "format-patch", "-k", "--stdout",
"--full-index", "--cherry-pick", "--right-only",
"--src-prefix=a/", "--dst-prefix=b/", "--no-renames",
- "--no-cover-letter", "--pretty=mboxrd", "--topo-order", NULL);
+ "--no-cover-letter", "--pretty=mboxrd", "--topo-order",
+ "--no-base", NULL);
if (opts->git_format_patch_opt.len)
argv_array_split(&format_patch.args,
opts->git_format_patch_opt.buf);