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

Re: [PATCH] Tests: document test_submodule_{,forced_}switch()

From
Stefan Beller <sbeller@google.com>
Date
Nov 7, 2017, 17:27 UTC
Message-ID
<CAGZ79kZ3yaKGh2g2QosdzDigi4uXsuRs_v2imL8kPEo8a+qeXg@mail.gmail.com>
In-Reply-To
<xmqq8tfihn3a.fsf@gitster.mtv.corp.google.com>
On Mon, Nov 6, 2017 at 5:52 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 23 quoted lines
> Jonathan Tan <jonathantanmy@google.com> writes:
>
>> Factor out the commonalities from test_submodule_switch() and
>> test_submodule_forced_switch() in lib-submodule-update.sh, and document
>> their usage.
>>
>> This also makes explicit (through the KNOWN_FAILURE_FORCED_SWITCH_TESTS
>> variable) the fact that, currently, all functionality tested using
>> test_submodule_forced_switch() do not correctly handle the situation in
>> which a submodule is replaced with an ordinary directory.
>>
>> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
>> ---
>> I find tests that use lib-submodule-update.sh difficult to understand
>> due to the lack of clarity of what test_submodule_switch() and others do
>> with their argument - I hope this will make things easier for future
>> readers.
>> ---
>>  t/lib-submodule-update.sh | 250 +++++++++-------------------------------------
>>  1 file changed, 46 insertions(+), 204 deletions(-)
>
> I suspect that the benefit of this is a lot larger than "document" a
> test helper function or two ;-)  "document & clean-up", perhaps?
It is.
Show 5 quoted lines
>
> I didn't compare the before-and-after with fine toothed comb, but
> a cursory look didn't find anything glaringly questionable other
> than the above.
>
I have reviewed the patch and thinks it withstands the test of a fine comb.
Previous: Junio C HamanoNext: Jonathan Tan
Message 3 of 4 in “Tests: document test_submodule_{,forced_}switch()”
  1. Tests: document test_submodule_{,forced_}switch()Jonathan Tan, Nov 6, 2017
  2. Junio C HamanoNov 7, 2017
  3. Stefan BellerNov 7, 2017
  4. Tests: clean up and document submodule helpersJonathan Tan, Nov 7, 2017

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.