remote-bzr: simplify test checks
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras committed
May 24, 2013 at 21:29 UTC
0067ecc82b2dbef64d3768484eb6a1b4ca2c27d2
1 file changed
+5
-12
contrib/remote-helpers/test-bzr.sh
+5
-12
@@ -18,15 +18,8 @@ if ! python -c 'import bzrlib'; then
18
fi
19
20
check () {
21
- (
22
- cd $1 &&
23
- git log --format='%s' -1 &&
24
- git symbolic-ref HEAD
25
- ) > actual &&
26
- (
27
- echo $2 &&
28
- echo "refs/heads/$3"
29
- ) > expected &&
21
+ echo $3 > expected &&
22
+ git --git-dir=$1/.git log --format='%s' -1 $2 > actual
23
test_cmp expected actual
24
}
25
@@ -42,7 +35,7 @@ test_expect_success 'cloning' '
35
) &&
36
37
git clone "bzr::bzrrepo" gitrepo &&
45
- check gitrepo one master
38
+ check gitrepo HEAD one
39
'
40
41
test_expect_success 'pulling' '
@@ -54,7 +47,7 @@ test_expect_success 'pulling' '
47
48
(cd gitrepo && git pull) &&
49
57
- check gitrepo two master
50
+ check gitrepo HEAD two
51
'
52
53
test_expect_success 'pushing' '
@@ -89,7 +82,7 @@ test_expect_success 'roundtrip' '
82
83
(cd gitrepo && git pull && git push) &&
84
92
- check gitrepo four master &&
85
+ check gitrepo HEAD four &&
86
87
(
88
cd gitrepo &&