mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
Merge branch 'rs/fast-export-pathspec-fix'
"git fast-export -- <pathspec>" lost the pathspec when showing the second and subsequent commits, which has been corrected. * rs/fast-export-pathspec-fix: 2.36 fast-export regression fix
This commit is contained in:
commit
2cc712324d
|
@ -1261,6 +1261,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
|
|||
revs.diffopt.format_callback = show_filemodify;
|
||||
revs.diffopt.format_callback_data = &paths_of_changed_objects;
|
||||
revs.diffopt.flags.recursive = 1;
|
||||
revs.diffopt.no_free = 1;
|
||||
while ((commit = get_revision(&revs)))
|
||||
handle_commit(commit, &revs, &paths_of_changed_objects);
|
||||
|
||||
|
|
|
@ -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 &&
|
||||
(
|
||||
|
|
Loading…
Reference in a new issue