Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-17 00:08:32 +0300
committerJunio C Hamano <gitster@pobox.com>2019-12-17 00:08:32 +0300
commit71a7de7a99a3199a9ea0660287bd4c1747f4d3b6 (patch)
tree1b8efa2809270ee2131954f26f3d6850ed19868d /builtin
parentc9f5fc91142c26c4a0f69f8eaed35c55e9c591f5 (diff)
parentcae0bc09abcb12aff79f1aea85d578df7856de4a (diff)
Merge branch 'dl/rebase-with-autobase'
"git rebase" did not work well when format.useAutoBase configuration variable is set, which has been corrected. * dl/rebase-with-autobase: rebase: fix format.useAutoBase breakage format-patch: teach --no-base t4014: use test_config() format-patch: fix indentation t3400: demonstrate failure with format.useAutoBase
Diffstat (limited to 'builtin')
-rw-r--r--builtin/log.c9
-rw-r--r--builtin/rebase.c3
2 files changed, 8 insertions, 4 deletions
diff --git a/builtin/log.c b/builtin/log.c
index e192f219d9..8c664067ca 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1372,7 +1372,7 @@ static int header_callback(const struct option *opt, const char *arg, int unset)
string_list_clear(&extra_to, 0);
string_list_clear(&extra_cc, 0);
} else {
- add_header(arg);
+ add_header(arg);
}
return 0;
}
@@ -1428,7 +1428,7 @@ static struct commit *get_base_commit(const char *base_commit,
base = lookup_commit_reference_by_name(base_commit);
if (!base)
die(_("unknown commit %s"), base_commit);
- } else if ((base_commit && !strcmp(base_commit, "auto")) || base_auto) {
+ } else if ((base_commit && !strcmp(base_commit, "auto"))) {
struct branch *curr_branch = branch_get(NULL);
const char *upstream = branch_get_upstream(curr_branch, NULL);
if (upstream) {
@@ -1732,6 +1732,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
s_r_opt.def = "HEAD";
s_r_opt.revarg_opt = REVARG_COMMITTISH;
+ if (base_auto)
+ base_commit = "auto";
+
if (default_attach) {
rev.mime_boundary = default_attach;
rev.no_inline = 1;
@@ -1995,7 +1998,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
}
memset(&bases, 0, sizeof(bases));
- if (base_commit || base_auto) {
+ if (base_commit) {
struct commit *base = get_base_commit(base_commit, list, nr);
reset_revision_walk();
clear_object_flags(UNINTERESTING);
diff --git a/builtin/rebase.c b/builtin/rebase.c
index f82fe10878..ddf33bc9d4 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1039,7 +1039,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);