fi
check () {
- (
- cd $1 &&
- git log --format='%s' -1 &&
- git symbolic-ref HEAD
- ) > actual &&
- (
- echo $2 &&
- echo "refs/heads/$3"
- ) > expected &&
+ echo $3 > expected &&
+ git --git-dir=$1/.git log --format='%s' -1 $2 > actual
test_cmp expected actual
}
bzr commit -m one
) &&
- git clone "bzr::$PWD/bzrrepo" gitrepo &&
- check gitrepo one master
+ git clone "bzr::bzrrepo" gitrepo &&
+ check gitrepo HEAD one
'
test_expect_success 'pulling' '
(cd gitrepo && git pull) &&
- check gitrepo two master
+ check gitrepo HEAD two
'
test_expect_success 'pushing' '
(cd gitrepo && git pull && git push) &&
- check gitrepo four master &&
+ check gitrepo HEAD four &&
(
cd gitrepo &&
) &&
(
- git clone "bzr::$PWD/bzrrepo" gitrepo &&
+ git clone "bzr::bzrrepo" gitrepo &&
cd gitrepo &&
git -c core.quotepath=false ls-files > ../actual
) &&
) &&
(
- git clone "bzr::$PWD/bzrrepo" gitrepo &&
+ git clone "bzr::bzrrepo" gitrepo &&
cd gitrepo &&
echo test >> "ærø" &&
bzr commit -m one
) &&
- git clone "bzr::$PWD/bzrrepo" gitrepo &&
+ git clone "bzr::bzrrepo" gitrepo &&
(
cd bzrrepo &&
) &&
(
- git clone "bzr::$PWD/bzrrepo" gitrepo &&
+ git clone "bzr::bzrrepo" gitrepo &&
cd gitrepo &&
git for-each-ref --format "%(refname:short)" refs/remotes/origin > ../actual
) &&
bzr commit -m two
) &&
- git clone "bzr::$PWD/bzrrepo" gitrepo &&
+ git clone "bzr::bzrrepo" gitrepo &&
(
cd bzrrepo &&