diff options
author | René Scharfe <l.s.r@web.de> | 2022-04-30 17:31:43 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-04-30 21:50:33 +0300 |
commit | d1c25272f5c5f78ae302f07ea0b5832c601e373b (patch) | |
tree | 38b16bf1c40018a9c5b71834b391b6b2ee8c7d0d /t/t9350-fast-export.sh | |
parent | 362f869ff2dbc389234ecd8c4b996a9e507c39d7 (diff) |
2.36 fast-export regression fix
e900d494dc (diff: add an API for deferred freeing, 2021-02-11) added a
way to allow reusing diffopts: the no_free bit. 244c27242f (diff.[ch]:
have diff_free() call clear_pathspec(opts.pathspec), 2022-02-16) made
that mechanism mandatory.
git fast-export doesn't set no_free, so path limiting stopped working
after the first commit. Set the flag and add a basic test to make sure
only changes to the specified files are exported.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9350-fast-export.sh')
-rwxr-xr-x | t/t9350-fast-export.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh index 7b7a18dd2c..fc99703fc5 100755 --- a/t/t9350-fast-export.sh +++ b/t/t9350-fast-export.sh @@ -500,6 +500,13 @@ test_expect_success 'path limiting with import-marks does not lose unmodified fi grep file0 actual ' +test_expect_success 'path limiting works' ' + git fast-export simple -- file >actual && + sed -ne "s/^M .* //p" <actual | sort -u >actual.files && + echo file >expect && + test_cmp expect actual.files +' + test_expect_success 'avoid corrupt stream with non-existent mark' ' test_create_repo avoid_non_existent_mark && ( |