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

Re: [RFC/ PATCH 4/5] t3030: update porcelain expected message

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 9, 2010, 20:40 UTC
Message-ID
<vpq1vcgym6j.fsf@bauges.imag.fr>
In-Reply-To
<1276087446-25112-6-git-send-email-diane.gasselin@ensimag.imag.fr>
Diane Gasselin <diane.gasselin@ensimag.imag.fr> writes:
> From: Diane <diane.gasselin@ensimag.imag.fr>

You did something strange with git format-patch or send-email. This From header should appear in the header of your email, but not in the body.

> As porcelain messages have been changed, the expected porcelain message
> tested in this test needs to be changed.

We usually try to have the test-suite pass for each commit (so that "git bisect" can be used easily among other reasons). So, you probably want to squash this patch with the one that actually changes the message. Also, I think it eases reviewing: the changes to the test-suite can be seen as a specification (particularly clear here: we know what the rest of the patch serie does reading this patch).

Another trick is to set the tests as "test_expect_failure" before introducing the feature, and mark them as "test_expect_success" when appropriate. This way, you can add new tests before adding the feature, without introducing broken commits.

Show 5 quoted lines
> +cat> expected2 <<EOF
> +error: Your local changes to the files:
> +	a
> +would be overwritten by merge.
> +EOF
I'd have phrased it like this:
error: Your local changes to these files would be overwritten by merge:
	a

to avoid splitting the message in two parts. It's more consistant with the rest of Git (git status or git reset for example). Also, your version would become hard to read if the file list is long.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Jeff King
Message 12 of 21 in “unpack_trees: nicer error messages”
  1. 0/5 unpack_trees: nicer error messagesDiane Gasselin, Jun 9, 2010
  2. 0/5 unpack_trees: nicer error messagesDiane Gasselin, Jun 9, 2010
  3. 1/5 tree-walk: do not stop when an error is detectedDiane Gasselin, Jun 9, 2010
  4. 2/5 unpack_trees: group errors by typeDiane Gasselin, Jun 9, 2010
  5. 3/5 unpack_trees_options: update porcelain messagesDiane Gasselin, Jun 9, 2010
  6. 4/5 t3030: update porcelain expected messageDiane Gasselin, Jun 9, 2010
  7. 5/5 t7609: test merge and checkout error messagesDiane Gasselin, Jun 9, 2010
  8. Matthieu MoyJun 9, 2010
  9. Diane GasselinJun 9, 2010
  10. Matthieu MoyJun 9, 2010
  11. Junio C HamanoJun 9, 2010
  12. Matthieu MoyJun 9, 2010
  13. Jeff KingJun 10, 2010
  14. Diane GasselinJun 10, 2010
  15. Diane GasselinJun 9, 2010
  16. Junio C HamanoJun 9, 2010
  17. Diane GasselinJun 10, 2010
  18. Matthieu MoyJun 9, 2010
  19. Junio C HamanoJun 9, 2010
  20. Diane GasselinJun 9, 2010
  21. Matthieu MoyJun 9, 2010

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.