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

Re: [PATCH] subdirectory tests: code cleanup, uncomment test

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 18, 2015, 22:03 UTC
Message-ID
<20150518220318.GE5586@google.com>
In-Reply-To
<CAGZ79kZ9h=Oev_mymFBRNyAGokAe8-vWh_D12VZYHTUv20Djvg@mail.gmail.com>
Stefan Beller wrote:
> I am not happy with (historic) either, maybe "(explicit GIT_DIR)"
> is describing the test better without giving the reader the thoughts
> as you raised here?

The general principle I use is to try to briefly describe what hypothesis the code is trying to test, so that if it fails someone knows what that means.

In this case, I could do
	test_expect_success 'no file/rev ambiguity with explicit GIT_DIR=.' '
[...]
Show 5 quoted lines
>>>               cd foo.git &&
>>> +             # older Git needed help by exporting GIT_DIR=.
>>> +             # to realize that it is inside a bare repository.
>>> +             # We keep this test around for regression testing.
>>>               GIT_DIR=. git show -s HEAD

I don't think this comment is needed, since it doesn't make it clearer what the test is about.

Thanks, Jonathan

Previous: Stefan BellerNext: Junio C Hamano
Message 9 of 10 in “t1020: cleanup subdirectory tests a little”
  1. t1020: cleanup subdirectory tests a littleStefan Beller, May 18, 2015
  2. Junio C HamanoMay 18, 2015
  3. Junio C HamanoMay 18, 2015
  4. Stefan BellerMay 18, 2015
  5. Junio C HamanoMay 18, 2015
  6. subdirectory tests: code cleanup, uncomment testStefan Beller, May 18, 2015
  7. Junio C HamanoMay 18, 2015
  8. Stefan BellerMay 18, 2015
  9. Jonathan NiederMay 18, 2015
  10. Junio C HamanoMay 19, 2015

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.