summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-16 21:08:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-16 21:08:32 (GMT)
commit71a7de7a99a3199a9ea0660287bd4c1747f4d3b6 (patch)
tree1b8efa2809270ee2131954f26f3d6850ed19868d /builtin/log.c
parentc9f5fc91142c26c4a0f69f8eaed35c55e9c591f5 (diff)
parentcae0bc09abcb12aff79f1aea85d578df7856de4a (diff)
downloadgit-71a7de7a99a3199a9ea0660287bd4c1747f4d3b6.zip
git-71a7de7a99a3199a9ea0660287bd4c1747f4d3b6.tar.gz
git-71a7de7a99a3199a9ea0660287bd4c1747f4d3b6.tar.bz2
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/log.c')
-rw-r--r--builtin/log.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/log.c b/builtin/log.c
index e192f21..8c66406 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);