OLD | NEW |
---|---|
(Empty) | |
1 #!/bin/bash | |
2 | |
3 set -e | |
4 | |
5 . ./test-lib.sh | |
6 | |
7 setup_initsvn | |
8 setup_gitsvn | |
9 | |
10 ( | |
11 set -e | |
12 cd git-svn | |
13 | |
14 cat > .git/hooks/post-cl-dcommit << _EOF | |
15 #!/bin/bash | |
16 git branch -m COMMITTED | |
17 _EOF | |
18 chmod +x .git/hooks/post-cl-dcommit | |
19 | |
20 git config rietveld.server localhost:1 | |
21 git checkout -q --track -b work | |
22 echo "some work done" >> test | |
23 git add test; git commit -q -m "work" | |
24 | |
25 test_expect_success "dcommitted code" \ | |
26 "$GIT_CL dcommit -f --tbr --bypass-hooks -m 'dcommit'" | |
27 | |
28 test_expect_success "post-cl-dcommit hook executed" \ | |
29 "git symbolic-ref HEAD | grep -q COMMITTED" | |
30 ) | |
31 SUCCESS=$? | |
32 | |
33 cleanup | |
34 | |
35 if [ $SUCCESS == 0 ]; then | |
36 echo PASS | |
37 fi | |
OLD | NEW |