From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Christian Couder <christian.couder@gmail.com>,
Bartosz Baranowski <bbaranow@redhat.com>,
git@vger.kernel.org
Subject: [PATCH 2/3] bisect: fix internal diff-tree config loading
Date: Fri, 22 Feb 2019 01:21:33 -0500 [thread overview]
Message-ID: <20190222062133.GB10248@sigill.intra.peff.net> (raw)
In-Reply-To: <20190222061949.GA9875@sigill.intra.peff.net>
When we run our internal diff-tree to show the bisected commit, we call
init_revisions(), then load config, then setup_revisions(). But that
order is wrong: we copy the configured defaults into the rev_info struct
during the init_revisions step, so our config load wasn't actually doing
anything.
Signed-off-by: Jeff King <peff@peff.net>
---
It does feel a little weird loading config at all here, since it would
potentially affect other in-process operations. This is where an
external process might be cleaner.
bisect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bisect.c b/bisect.c
index 8c81859835..b04d7b2f63 100644
--- a/bisect.c
+++ b/bisect.c
@@ -901,8 +901,8 @@ static void show_diff_tree(struct repository *r,
};
struct rev_info opt;
- repo_init_revisions(r, &opt, prefix);
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
+ repo_init_revisions(r, &opt, prefix);
setup_revisions(ARRAY_SIZE(argv) - 1, argv, &opt, NULL);
log_tree_commit(&opt, commit);
--
2.21.0.rc2.577.g06bbe9cbd1
next prev parent reply other threads:[~2019-02-22 6:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 10:47 git bisect - good vs bad output is different Bartosz Baranowski
2019-02-21 21:39 ` Junio C Hamano
2019-02-22 6:19 ` [PATCH 0/3] prettier bisect output Jeff King
2019-02-22 6:20 ` [PATCH 1/3] bisect: use string arguments to feed internal diff-tree Jeff King
2019-02-22 6:21 ` Jeff King [this message]
2019-03-03 17:59 ` [PATCH 2/3] bisect: fix internal diff-tree config loading Christian Couder
2019-03-05 4:15 ` Jeff King
2019-02-22 6:23 ` [PATCH 3/3] bisect: make diff-tree output prettier Jeff King
2019-02-22 17:49 ` Junio C Hamano
2019-02-23 13:44 ` Jeff King
2019-03-03 18:25 ` Christian Couder
2019-02-22 17:39 ` [PATCH 0/3] prettier bisect output Junio C Hamano
2019-03-03 18:33 ` Christian Couder
2019-03-05 4:16 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190222062133.GB10248@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=bbaranow@redhat.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).