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

Re: [RFC/PATCH 2/2] Testing the new code

From
Stefan Beller <sbeller@google.com>
Date
Aug 3, 2015, 16:23 UTC
Message-ID
<CAGZ79kYBvQ9vfmDNs2_WTLU0OrHShS7_fLnjHgYxX9C29PdDsA@mail.gmail.com>
In-Reply-To
<xmqqio8zakhv.fsf@gitster.dls.corp.google.com>
On Fri, Jul 31, 2015 at 6:02 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>> -module_list()
>> +module_list_shell()
>>  {
>>       eval "set $(git rev-parse --sq --prefix "$wt_prefix" -- "$@")"
>>       (
>> @@ -187,6 +187,29 @@ module_list()
>>       '
>>  }
>>
>> +module_list()
>> +{
>> +     # call both the old and new code
>> +     module_list_shell $@ >/u/git_submodule_module_list_shell 2>/u/git_submodule_module_list_shell2
>> +     git submodule--helper --module_list $@ >/u/git_submodule_module_list 2>/u/git_submodule_module_list2
>
> You seem to be discarding the double-quote around $@ in both of
> these two places.  Intended?

No, not at all. This was a bit sloppy. This patch was rather showing off how I intend to test the previous patch. The idea came from a talk[1] at oscon which presented refactoring code with this differential strategy (except that they used it on a larger code base and collected the diffs between the new and old code for a while in production instead of just relying on the test suite passing).

[1] http://www.oscon.com/open-source-2015/public/schedule/detail/41888
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 15 in “add: remove dead code”
  1. add: remove dead codeStefan Beller, Jul 31, 2015
  2. Junio C HamanoJul 31, 2015
  3. 0/2 Submodules: refactoring the `module_list` functionStefan Beller, Jul 31, 2015
  4. 1/2 submodule: implement `module_list` as a builtin helperStefan Beller, Jul 31, 2015
  5. Junio C HamanoAug 1, 2015
  6. Stefan BellerAug 3, 2015
  7. Junio C HamanoAug 3, 2015
  8. submodule: implement `module_list` as a builtin helperStefan Beller, Aug 3, 2015
  9. Junio C HamanoAug 3, 2015
  10. Stefan BellerAug 3, 2015
  11. submodule: implement `module_list` as a builtin helperStefan Beller, Aug 3, 2015
  12. 2/2 Testing the new codeStefan Beller, Jul 31, 2015
  13. Junio C HamanoAug 1, 2015
  14. Stefan BellerAug 3, 2015
  15. Junio C HamanoAug 3, 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.