* jl/fix-test:
t1020: Get rid of 'cd "$HERE"' at the start of each test
t2016 (checkout -p): add missing &&
t1302 (core.repositoryversion): style tweaks
t2105 (gitfile): add missing &&
t1450 (fsck): remove dangling objects
tests: subshell indentation stylefix
Several tests: cd inside subshell instead of around
test_description='git fsck random collection of tests'
test_description='git fsck random collection of tests
* (HEAD) B
* (master) A
'
. ./test-lib.sh
test_expect_success setup '
git config gc.auto 0 &&
git config i18n.commitencoding ISO-8859-1 &&
test_commit A fileA one &&
git config --unset i18n.commitencoding &&
git checkout HEAD^0 &&
test_commit B fileB two &&
git tag -d A B &&
git reflog expire --expire=now --all
'
test_expect_success 'HEAD is part of refs' '
test 0 = $(git fsck | wc -l)
git reflog expire --expire=now --all &&
>empty
'
test_expect_success 'loose objects borrowed from alternate are not missing' '
@ -25,110 +27,132 @@ test_expect_success 'loose objects borrowed from alternate are not missing' '
@@ -25,110 +27,132 @@ test_expect_success 'loose objects borrowed from alternate are not missing' '
test_expect_success 'commit change from svn side' '
svn_cmd co "$svnrepo" t.svn &&
cd t.svn &&
echo second line from svn >> file &&
poke file &&
svn_cmd commit -m "second line from svn" &&
cd .. &&
(
cd t.svn &&
echo second line from svn >>file &&
poke file &&
svn_cmd commit -m "second line from svn"
) &&
rm -rf t.svn
'
@ -44,11 +46,12 @@ test_expect_success 'dcommit fails to commit because of conflict' '
@@ -44,11 +46,12 @@ test_expect_success 'dcommit fails to commit because of conflict' '
git svn fetch &&
git reset --hard refs/${remotes_git_svn} &&
svn_cmd co "$svnrepo" t.svn &&
cd t.svn &&
echo fourth line from svn >> file &&
poke file &&
svn_cmd commit -m "fourth line from svn" &&
cd .. &&
(
cd t.svn &&
echo fourth line from svn >>file &&
poke file &&
svn_cmd commit -m "fourth line from svn"
) &&
rm -rf t.svn &&
echo "fourth line from git" >> file &&
git commit -a -m "fourth line from git" &&
@ -68,11 +71,12 @@ test_expect_success 'dcommit does the svn equivalent of an index merge' "
@@ -68,11 +71,12 @@ test_expect_success 'dcommit does the svn equivalent of an index merge' "
test_expect_success 'commit another change from svn side' '
@ -41,11 +41,11 @@ test_expect_success 'import an early SVN revision into git' '
@@ -41,11 +41,11 @@ test_expect_success 'import an early SVN revision into git' '
test_expect_success 'make full git mirror of SVN' '