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

[PATCH 0/5] Improve test coverage of update-ref error messages

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Jun 7, 2016, 11:50 UTC
Message-ID
<cover.1465299118.git.mhagger@alum.mit.edu>

The logic for deciding what error to emit under various update-ref failure scenarios is nontrivial. Add a bunch of tests of these error messages. Then improve a few error messages that were not ideal. One or two other error messages could still be improved, but that would take more work so I will skip it for now.

This patch series applies on top of mh/split-under-lock. Improving the testing of that patch series was in fact the main motivation for this one. It didn't turn up any serious errors, so I don't think that this patch series needs to hold up the other one. On the other hand, each of the patch series changes some error messages, so if possible it would be preferable to ship them in the same Git release.

Happily, this branch doesn't conflict with either of the other large patch series that are queued up in this area (mh/ref-iterators [2] and ref-store [3]).

These patches are also available from my GitHub account [4] as branch update-ref-errors.

Michael

[1] http://thread.gmane.org/gmane.comp.version-control.git/293800 [2] http://thread.gmane.org/gmane.comp.version-control.git/296322 [3] http://thread.gmane.org/gmane.comp.version-control.git/296409 [4] https://github.com/mhagger/git

Michael Haggerty (5):
  t1404: rename file to t1404-update-ref-errors.sh
  t1404: document function test_update_rejected
  t1404: add more tests of update-ref error handling
  lock_ref_for_update(): make error handling more uniform
  lock_ref_for_update(): avoid a symref resolution
 refs/files-backend.c               |  77 ++++---
 t/t1404-update-ref-df-conflicts.sh | 181 -----------------
 t/t1404-update-ref-errors.sh       | 402 +++++++++++++++++++++++++++++++++++++
 3 files changed, 447 insertions(+), 213 deletions(-)
 delete mode 100755 t/t1404-update-ref-df-conflicts.sh
 create mode 100755 t/t1404-update-ref-errors.sh
-- 
2.8.1
Next: Michael Haggerty
Message 1 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.