| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env bash | |
| 2 | |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 set -e | |
| 8 | |
| 9 . ./test-lib.sh | |
| 10 | |
| 11 setup_initsvn | |
| 12 setup_gitsvn | |
| 13 | |
| 14 ( | |
| 15 set -e | |
| 16 cd git-svn | |
| 17 | |
| 18 cat > .git/hooks/post-cl-dcommit << _EOF | |
| 19 #!/usr/bin/env bash | |
| 20 git branch -m COMMITTED | |
| 21 _EOF | |
| 22 chmod +x .git/hooks/post-cl-dcommit | |
| 23 | |
| 24 git config rietveld.server localhost:1 | |
| 25 git checkout -q --track -b work | |
| 26 echo "some work done" >> test | |
| 27 git add test; git commit -q -m "work \ | |
| 28 TBR=foo" | |
| 29 | |
| 30 test_expect_success "dcommitted code" \ | |
| 31 "$GIT_CL dcommit --no-oauth2 -f --bypass-hooks -m 'dcommit'" | |
| 32 | |
| 33 test_expect_success "post-cl-dcommit hook executed" \ | |
| 34 "git symbolic-ref HEAD | grep -q COMMITTED" | |
| 35 ) | |
| 36 SUCCESS=$? | |
| 37 | |
| 38 cleanup | |
| 39 | |
| 40 if [ $SUCCESS == 0 ]; then | |
| 41 echo PASS | |
| 42 fi | |
| OLD | NEW |