git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 3/6] t1404: document function test_update_rejected

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Jun 10, 2016, 08:14 UTC
Message-ID
<8d628cac9086238c1507c08838963a7900a1cd32.1465544913.git.mhagger@alum.mit.edu>
In-Reply-To
<cover.1465544913.git.mhagger@alum.mit.edu>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 t/t1404-update-ref-errors.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh
index 541cad1..7cfeaa9 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" &&
-- 
2.8.1
Previous: Michael HaggertyNext: Michael Haggerty
Message 5 of 10 in “Improve test coverage of update-ref error messages”
  1. 0/6 Improve test coverage of update-ref error messagesMichael Haggerty, Jun 10, 2016
  2. 1/6 t1404: rename file to t1404-update-ref-errors.shMichael Haggerty, Jun 10, 2016
  3. 4/6 t1404: add more tests of update-ref error handlingMichael Haggerty, Jun 10, 2016
  4. 2/6 t1404: remove "prefix" argument to test_update_rejectedMichael Haggerty, Jun 10, 2016
  5. 3/6 t1404: document function test_update_rejectedMichael Haggerty, Jun 10, 2016
  6. 6/6 lock_ref_for_update(): avoid a symref resolutionMichael Haggerty, Jun 10, 2016
  7. 5/6 lock_ref_for_update(): make error handling more uniformMichael Haggerty, Jun 10, 2016
  8. David TurnerJun 10, 2016
  9. Michael HaggertyJun 13, 2016
  10. Michael HaggertyJun 13, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.