summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2022-04-30 14:31:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-04-30 18:50:33 (GMT)
commitd1c25272f5c5f78ae302f07ea0b5832c601e373b (patch)
tree38b16bf1c40018a9c5b71834b391b6b2ee8c7d0d /builtin
parent362f869ff2dbc389234ecd8c4b996a9e507c39d7 (diff)
downloadgit-d1c25272f5c5f78ae302f07ea0b5832c601e373b.zip
git-d1c25272f5c5f78ae302f07ea0b5832c601e373b.tar.gz
git-d1c25272f5c5f78ae302f07ea0b5832c601e373b.tar.bz2
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 'builtin')
-rw-r--r--builtin/fast-export.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 510139e..921091d 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -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);