Merge branch 'jk/bisect-final-output'
The final report from "git bisect" used to show the suspected culprit using a raw "diff-tree", with which there is no output for a merge commit. This has been updated to use a more modern and human readable output that still is concise enough. * jk/bisect-final-output: bisect: make diff-tree output prettier bisect: fix internal diff-tree config loading bisect: use string arguments to feed internal diff-tree
This commit is contained in:
commit
1b8f4dc580
19
bisect.c
19
bisect.c
@ -896,24 +896,15 @@ static void show_diff_tree(struct repository *r,
|
||||
const char *prefix,
|
||||
struct commit *commit)
|
||||
{
|
||||
const char *argv[] = {
|
||||
"diff-tree", "--pretty", "--stat", "--summary", "--cc", NULL
|
||||
};
|
||||
struct rev_info opt;
|
||||
|
||||
/* diff-tree init */
|
||||
git_config(git_diff_ui_config, NULL);
|
||||
repo_init_revisions(r, &opt, prefix);
|
||||
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
|
||||
opt.abbrev = 0;
|
||||
opt.diff = 1;
|
||||
|
||||
/* This is what "--pretty" does */
|
||||
opt.verbose_header = 1;
|
||||
opt.use_terminator = 0;
|
||||
opt.commit_format = CMIT_FMT_DEFAULT;
|
||||
|
||||
/* diff-tree init */
|
||||
if (!opt.diffopt.output_format)
|
||||
opt.diffopt.output_format = DIFF_FORMAT_RAW;
|
||||
|
||||
setup_revisions(0, NULL, &opt, NULL);
|
||||
setup_revisions(ARRAY_SIZE(argv) - 1, argv, &opt, NULL);
|
||||
log_tree_commit(&opt, commit);
|
||||
}
|
||||
|
||||
|
@ -681,7 +681,7 @@ test_expect_success 'bisect: --no-checkout - target in breakage' '
|
||||
check_same BROKEN_HASH6 BISECT_HEAD &&
|
||||
git bisect bad BISECT_HEAD &&
|
||||
check_same BROKEN_HASH5 BISECT_HEAD &&
|
||||
git bisect good BISECT_HEAD &&
|
||||
test_must_fail git bisect good BISECT_HEAD &&
|
||||
check_same BROKEN_HASH6 bisect/bad &&
|
||||
git bisect reset
|
||||
'
|
||||
@ -692,7 +692,7 @@ test_expect_success 'bisect: --no-checkout - target after breakage' '
|
||||
check_same BROKEN_HASH6 BISECT_HEAD &&
|
||||
git bisect good BISECT_HEAD &&
|
||||
check_same BROKEN_HASH8 BISECT_HEAD &&
|
||||
git bisect good BISECT_HEAD &&
|
||||
test_must_fail git bisect good BISECT_HEAD &&
|
||||
check_same BROKEN_HASH9 bisect/bad &&
|
||||
git bisect reset
|
||||
'
|
||||
@ -701,7 +701,7 @@ test_expect_success 'bisect: demonstrate identification of damage boundary' "
|
||||
git bisect reset &&
|
||||
git checkout broken &&
|
||||
git bisect start broken master --no-checkout &&
|
||||
git bisect run \"\$SHELL_PATH\" -c '
|
||||
test_must_fail git bisect run \"\$SHELL_PATH\" -c '
|
||||
GOOD=\$(git for-each-ref \"--format=%(objectname)\" refs/bisect/good-*) &&
|
||||
git rev-list --objects BISECT_HEAD --not \$GOOD >tmp.\$\$ &&
|
||||
git pack-objects --stdout >/dev/null < tmp.\$\$
|
||||
|
Loading…
Reference in New Issue
Block a user