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

Re: [PATCH v2] sha1-file: test the error behavior of alt_odb_usable()

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 9, 2019, 09:43 UTC
Message-ID
<xmqq5zrn7bua.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<8736mra7nq.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> I'll leave it up to you if you want to queue just the test patch or drop

As I said in a separate message, I think it is good to make sure that fsck does not crash. I do not think it is good to grep in its output.

> it. I figured I'd re-send just that since I figured just fixing the
> blindspot of the current behavior would be a good thing on its own, not
> as an endorsement of the current behavior, just a "this is the current
> known behavior" regression test.

If the behaviour is undesirable one, we could document the current "breakage" with "test_expect_failure", whether we plan to fix it immediately. It is OK if readers cannot tell between a bug that is expected to stay forever with us, or a bug that somebody is actively working on.

But unfortunately, there is no separate "test_merely_documenting", that is different from "test_expect_success", so even if we claim "this is not an endorsement, but is merely documenting the current behaviour" when we add such a test, there is no way for future readers to tell between the two, short of going back to "git blame" and seeing the log message.

For that reason, I do not think it is a good practice to document the "current behaviour that happens to be" the same way as "the behaviour we desire" in test_expect_success.

Previous: Ævar Arnfjörð BjarmasonNext: Jeff King
Message 17 of 29 in “How de-duplicate similar repositories with alternates”
  1. Ævar Arnfjörð BjarmasonNov 29, 2018
  2. Ævar Arnfjörð BjarmasonNov 29, 2018
  3. Stefan BellerNov 29, 2018
  4. Ævar Arnfjörð BjarmasonNov 29, 2018
  5. Duy NguyenNov 29, 2018
  6. Jeff KingDec 4, 2018
  7. Derrick StoleeDec 4, 2018
  8. Jeff KingDec 4, 2018
  9. Ævar Arnfjörð BjarmasonDec 4, 2018
  10. 1/3 sha1-file: test the error behavior of alt_odb_usable()Ævar Arnfjörð Bjarmason, Dec 4, 2018
  11. sha1-file: test the error behavior of alt_odb_usable()Ævar Arnfjörð Bjarmason, Mar 28, 2019
  12. Jeff KingMar 29, 2019
  13. Ævar Arnfjörð BjarmasonMar 29, 2019
  14. Ævar Arnfjörð BjarmasonApr 8, 2019
  15. Junio C HamanoApr 9, 2019
  16. Ævar Arnfjörð BjarmasonApr 9, 2019
  17. Junio C HamanoApr 9, 2019
  18. Jeff KingApr 9, 2019
  19. Junio C HamanoApr 9, 2019
  20. 0/3 sha1-file: warn if alternate is a git repo (not object dir)Ævar Arnfjörð Bjarmason, Dec 4, 2018
  21. 2/3 sha1-file: emit error if an alternate looks like a repositoryÆvar Arnfjörð Bjarmason, Dec 4, 2018
  22. Junio C HamanoDec 5, 2018
  23. Jeff KingDec 5, 2018
  24. 3/3 sha1-file: change alternate "error:" message to "warning:"Ævar Arnfjörð Bjarmason, Dec 4, 2018
  25. Junio C HamanoDec 5, 2018
  26. Jeff KingDec 5, 2018
  27. Junio C HamanoDec 5, 2018
  28. Ævar Arnfjörð BjarmasonDec 4, 2018
  29. Derrick StoleeDec 4, 2018

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.