@ -150,20 +150,22 @@ test_expect_success 'setup submodule' '
git checkout -f master &&
git checkout -f master &&
mkdir sub &&
mkdir sub &&
cd sub &&
(
git init &&
cd sub &&
echo test file > file &&
git init &&
git add file &&
echo test file > file &&
git commit -m sub_initial &&
git add file &&
cd .. &&
git commit -m sub_initial
) &&
git submodule add "`pwd`/sub" sub &&
git submodule add "`pwd`/sub" sub &&
git commit -m initial &&
git commit -m initial &&
test_tick &&
test_tick &&
cd sub &&
(
echo more data >> file &&
cd sub &&
git add file &&
echo more data >> file &&
git commit -m sub_second &&
git add file &&
cd .. &&
git commit -m sub_second
) &&
git add sub &&
git add sub &&
git commit -m second
git commit -m second
@ -264,19 +266,20 @@ test_expect_success 'cope with tagger-less tags' '
test_expect_success 'setup for limiting exports by PATH' '
test_expect_success 'setup for limiting exports by PATH' '
mkdir limit-by-paths &&
mkdir limit-by-paths &&
cd limit-by-paths &&
(
git init &&
cd limit-by-paths &&
echo hi > there &&
git init &&
git add there &&
echo hi > there &&
git commit -m "First file" &&
git add there &&
echo foo > bar &&
git commit -m "First file" &&
git add bar &&
echo foo > bar &&
git commit -m "Second file" &&
git add bar &&
git tag -a -m msg mytag &&
git commit -m "Second file" &&
echo morefoo >> bar &&
git tag -a -m msg mytag &&
git add bar &&
echo morefoo >> bar &&
git commit -m "Change to second file" &&
git add bar &&
cd ..
git commit -m "Change to second file"
)
'
'
cat > limit-by-paths/expected << EOF
cat > limit-by-paths/expected << EOF
@ -297,10 +300,11 @@ M 100644 :1 there
EOF
EOF
test_expect_success 'dropping tag of filtered out object' '
test_expect_success 'dropping tag of filtered out object' '
(
cd limit-by-paths &&
cd limit-by-paths &&
git fast-export --tag-of-filtered-object=drop mytag -- there > output &&
git fast-export --tag-of-filtered-object=drop mytag -- there > output &&
test_cmp output expected &&
test_cmp output expected
cd ..
)
'
'
cat >> limit-by-paths/expected << EOF
cat >> limit-by-paths/expected << EOF
@ -313,10 +317,11 @@ msg
EOF
EOF
test_expect_success 'rewriting tag of filtered out object' '
test_expect_success 'rewriting tag of filtered out object' '
(
cd limit-by-paths &&
cd limit-by-paths &&
git fast-export --tag-of-filtered-object=rewrite mytag -- there > output &&
git fast-export --tag-of-filtered-object=rewrite mytag -- there > output &&
test_cmp output expected &&
test_cmp output expected
cd ..
)
'
'
cat > limit-by-paths/expected << EOF
cat > limit-by-paths/expected << EOF
@ -343,13 +348,13 @@ M 100644 :2 there
EOF
EOF
test_expect_failure 'no exact-ref revisions included' '
test_expect_failure 'no exact-ref revisions included' '
cd limit-by-paths &&
(
git fast-export master~2..master~1 > output &&
cd limit-by-paths &&
test_cmp output expected &&
git fast-export master~2..master~1 > output &&
cd ..
test_cmp output expected
)
'
'
test_expect_success 'set-up a few more tags for tag export tests' '
test_expect_success 'set-up a few more tags for tag export tests' '
git checkout -f master &&
git checkout -f master &&
HEAD_TREE=`git show -s --pretty=raw HEAD | grep tree | sed "s/tree //"` &&
HEAD_TREE=`git show -s --pretty=raw HEAD | grep tree | sed "s/tree //"` &&