blob: 5c509db6fc378ebf646833d349ef12fd192f2774 [file] [log] [blame]
Jeff Kingca74c452007-11-17 07:56:03 -05001#!/bin/sh
2
3test_description='remote push rejects are reported by client'
4
5. ./test-lib.sh
6
7test_expect_success 'setup' '
Eric Sunshinefb23bd72018-07-01 20:23:47 -04008 write_script .git/hooks/update <<-\EOF &&
9 exit 1
10 EOF
Jeff Kingca74c452007-11-17 07:56:03 -050011 echo 1 >file &&
12 git add file &&
13 git commit -m 1 &&
14 git clone . child &&
15 cd child &&
16 echo 2 >file &&
17 git commit -a -m 2
18'
19
Stephan Beyerd492b312008-07-12 17:47:52 +020020test_expect_success 'push reports error' 'test_must_fail git push 2>stderr'
Jeff Kingca74c452007-11-17 07:56:03 -050021
22test_expect_success 'individual ref reports error' 'grep rejected stderr'
23
24test_done