From 7f40ab0916efd56943f55fde71d917433284fef8 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sat, 17 Jul 2010 11:00:51 -0600 Subject: fast-export: Add a --full-tree option This option adds symmetry with fast-import, enabling it to also work with complete trees instead of just incremental changes. It works by issuing a 'deleteall' directive with each commit and then listing the full set of files that make up that commit, rather than just showing the list of files that have changed since the (first) parent commit. Note that this functionality is automatically turned on when using --import-marks together with path limiting in order to avoid dropping important but unchanged files. This functionality is desired when using hand-written filters along with 'fast-export | some-filter | fast-import' as it can be easier to write in terms of complete trees than incremental changes. We could avoid the need to add this option by simply always turning it on. While the end result would be identical, it would slow things down slightly by printing many more filenames per commit which goes somewhat against the 'fast' in 'fast-export'. Signed-off-by: Elijah Newren Acked-by: Sverre Rabbelier Signed-off-by: Junio C Hamano --- t/t9350-fast-export.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 't/t9350-fast-export.sh') diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh index 6069e1f831..d831404fba 100755 --- a/t/t9350-fast-export.sh +++ b/t/t9350-fast-export.sh @@ -364,6 +364,11 @@ test_expect_success 'path limiting with import-marks does not lose unmodified fi git fast-export --import-marks=marks simple -- file file0 | grep file0 ' +test_expect_success 'full-tree re-shows unmodified files' ' + git checkout -f simple && + test $(git fast-export --full-tree simple | grep -c file0) -eq 3 +' + test_expect_success 'set-up a few more tags for tag export tests' ' git checkout -f master && HEAD_TREE=`git show -s --pretty=raw HEAD | grep tree | sed "s/tree //"` && -- cgit v1.2.3