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
}
) &&
git clone "bzr::bzrrepo" gitrepo &&
- check gitrepo one master
+ 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 &&