Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2016-06-10 09:55:40 +0300
committerJunio C Hamano <gitster@pobox.com>2016-06-20 21:49:00 +0300
commit017f7221abe6129a41c6a7d2b4ce990f477be74f (patch)
treee9c51e6eed62676f75775e7f65d3990d1832f9f6 /t/t1404-update-ref-errors.sh
parent0e4b63b5a8b8d369720f0671040113e347221042 (diff)
t1404: document function test_update_rejected
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1404-update-ref-errors.sh')
-rwxr-xr-xt/t1404-update-ref-errors.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh
index 541cad12a4..7cfeaa99ba 100755
--- a/t/t1404-update-ref-errors.sh
+++ b/t/t1404-update-ref-errors.sh
@@ -3,6 +3,16 @@
test_description='Test git update-ref error handling'
. ./test-lib.sh
+# Create some references, perhaps run pack-refs --all, then try to
+# create some more references. Ensure that the second creation fails
+# with the correct error message.
+# Usage: test_update_rejected <before> <pack> <create> <error>
+# <before> is a ws-separated list of refs to create before the test
+# <pack> (true or false) tells whether to pack the refs before the test
+# <create> is a list of variables to attempt creating
+# <error> is a string to look for in the stderr of update-ref.
+# All references are created in the namespace specified by the current
+# value of $prefix.
test_update_rejected () {
before="$1" &&
pack="$2" &&