summaryrefslogtreecommitdiff
path: root/t/t9133-git-svn-nested-git-repo.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-04-29 22:29:51 -0700
committerJunio C Hamano <gitster@pobox.com>2022-04-29 22:31:17 -0700
commit5cdb38458ee5b53daada9cb767ae51a08650bd6a (patch)
tree6ea2af874599acf6a29892ad241de340c19e5d8b /t/t9133-git-svn-nested-git-repo.sh
parent362f869ff2dbc389234ecd8c4b996a9e507c39d7 (diff)
2.36 show regression fix
This only surfaced as a regression after 2.36 release, but the breakage was already there with us for at least a year. e900d494 (diff: add an API for deferred freeing, 2021-02-11) introduced a mechanism to delay freeing resources held in diff_options struct that need to be kept as long as the struct will be reused to compute diff. "git log -p" was taught to utilize the mechanism but it was done with an incorrect assumption that the underlying helper function, cmd_log_walk(), is called only once, and it is OK to do the freeing at the end of it. Alas, for "git show A B", the function is called once for each commit given, so it is not OK to free the resources until we finish calling it for all the commits given from the command line. During 2.36 release cycle, we started clearing the <pathspec> as part of this freeing, which made the bug a lot more visible. Fix this breakage by tweaking how cmd_log_walk() frees the resources at the end and using a variant of it that does not immediately free the resources to show each commit object from the command line in "git show". Protect the fix with a few new tests. Reported-by: Daniel Li <dan@danielyli.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9133-git-svn-nested-git-repo.sh')
0 files changed, 0 insertions, 0 deletions