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

[PATCH 2/5] t1404: document function test_update_rejected

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Jun 7, 2016, 11:50 UTC
Message-ID
<2561c38f85648144d665e870ca42c133a3a78909.1465299118.git.mhagger@alum.mit.edu>
In-Reply-To
<cover.1465299118.git.mhagger@alum.mit.edu>
And declare its variables to be local.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 t/t1404-update-ref-errors.sh | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh
index 2818460..a62d62a 100755
--- a/t/t1404-update-ref-errors.sh
+++ b/t/t1404-update-ref-errors.sh
@@ -3,7 +3,11 @@
 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.
 test_update_rejected () {
+	local prefix before pack create error &&
 	prefix="$1" &&
 	before="$2" &&
 	pack="$3" &&
-- 
2.8.1
Previous: Michael HaggertyNext: Johannes Sixt
Message 3 of 11 in “Improve test coverage of update-ref error messages”
  1. 0/5 Improve test coverage of update-ref error messagesMichael Haggerty, Jun 7, 2016
  2. 1/5 t1404: rename file to t1404-update-ref-errors.shMichael Haggerty, Jun 7, 2016
  3. 2/5 t1404: document function test_update_rejectedMichael Haggerty, Jun 7, 2016
  4. Johannes SixtJun 7, 2016
  5. Junio C HamanoJun 7, 2016
  6. Michael HaggertyJun 9, 2016
  7. Junio C HamanoJun 9, 2016
  8. Michael HaggertyJun 10, 2016
  9. 3/5 t1404: add more tests of update-ref error handlingMichael Haggerty, Jun 7, 2016
  10. 4/5 lock_ref_for_update(): make error handling more uniformMichael Haggerty, Jun 7, 2016
  11. 5/5 lock_ref_for_update(): avoid a symref resolutionMichael Haggerty, Jun 7, 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.