diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-05-06 00:36:24 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-05-06 00:36:24 +0300 |
commit | 8e5c46e31571a1b1e88458dacc5d62e9c59eca6f (patch) | |
tree | c9fa6b5145e6f5918d79eb3e51f14bf344402164 /builtin | |
parent | 899df5f690b23900712b57ff088e450df76f7596 (diff) | |
parent | f8781bfda31756acdc0ae77da7e70337aedae7c9 (diff) |
Merge branch 'jc/diff-tree-stdin-fix' into maint
"diff-tree --stdin" has been broken for about a year, but 2.36
release broke it even worse by breaking running the command with
<pathspec>, which in turn broke "gitk" and got noticed. This has
been corrected by aligning its behaviour to that of "log".
This fixes a regression in 2.36 and is slate to go to 2.36.1
source: <xmqq7d7bsu2n.fsf@gitster.g>
* jc/diff-tree-stdin-fix:
2.36 gitk/diff-tree --stdin regression fix
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/diff-tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c index 0e0ac1f167..116097a404 100644 --- a/builtin/diff-tree.c +++ b/builtin/diff-tree.c @@ -195,6 +195,7 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix) int saved_dcctc = 0; opt->diffopt.rotate_to_strict = 0; + opt->diffopt.no_free = 1; if (opt->diffopt.detect_rename) { if (!the_index.cache) repo_read_index(the_repository); @@ -217,6 +218,8 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix) } opt->diffopt.degraded_cc_to_c = saved_dcctc; opt->diffopt.needed_rename_limit = saved_nrl; + opt->diffopt.no_free = 0; + diff_free(&opt->diffopt); } return diff_result_code(&opt->diffopt, 0); |