From 825769a8fe4d0529268fee7e763bc8f24ed4218e Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Wed, 7 Feb 2007 02:03:03 -0500 Subject: Teach fast-import how to clear the internal branch content. Some frontends may not be able to (easily) keep track of which files are included in the branch, and which aren't. Performing this tracking can be tedious and error prone for the frontend to do, especially if its foreign data source cannot supply the changed path list on a per-commit basis. fast-import now allows a frontend to request that a branch's tree be wiped clean (reset to the empty tree) at the start of a commit, allowing the frontend to feed in all paths which belong on the branch. This is ideal for a tar-file importer frontend, for example, as the frontend just needs to reformat the tar data stream into a gfi data stream, which may be something a few Perl regexps can take care of. :) Signed-off-by: Shawn O. Pearce --- t/t9300-fast-import.sh | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 't') diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 23a2ba78f6..357a8724dd 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -356,4 +356,55 @@ test_expect_success \ 'test $old_branch != `git-rev-parse --verify branch^0` && test $old_branch = `git-rev-parse --verify branch@{1}`' +### +### series H +### + +test_tick +cat >input < $GIT_COMMITTER_DATE +data <expect <actual +test_expect_success \ + 'H: validate old files removed, new files added' \ + 'compare_diff_raw expect actual' + +echo "$file5_data" >expect +test_expect_success \ + 'H: verify file' \ + 'git-cat-file blob H:h/e/l/lo >actual && + diff -u expect actual' + test_done -- cgit v1.2.3