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

Re: [PATCH/RFC/GSOC] make git-pull a builtin

From
Paul Tan <pyokagan@gmail.com>
Date
Mar 21, 2015, 13:23 UTC
Message-ID
<CACRoPnQp-3RGAPmoo1aM2KUA-phi138J2o82FwP9annM+xvOXA@mail.gmail.com>
In-Reply-To
<vpqwq2eyyzl.fsf@anie.imag.fr>
Hi,

Thanks for the review, though I would like to work on the proposal now before the deadline passes :)

On Thu, Mar 19, 2015 at 1:52 AM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:

Show 15 quoted lines
> Paul Tan <pyokagan@gmail.com> writes:
>
>> Ideally, I think the solution is to
>> improve the test suite and make it as comprehensive as possible, but
>> writing a comprehensive test suite may be too time consuming.
>
> time-consuming, but also very beneficial since the code would end up
> being better tested. For sure, a rewrite is a good way to break stuff,
> but anything untested can also be broken by mistake rather easily at any
> time.
>
> I'd suggest doing a bit of manual mutation testing: take your C code,
> comment-out a few lines of code, see if the tests still pass, and if
> they do, add a failing test that passes again once you uncomment the
> code.

Maybe code coverage tools could help here so we only need to focus on the code paths that are untested by the test suite. At the minimum, all of the non-trivial code paths in both the shell script and the converted builtin must be covered by tests. This should help to eliminate most sources of breakages. Anything further than that would require an experienced understanding of all the possible important inputs to be tested, which I personally feel would make the project quite tedious.

I see git already has gcov support. For shell scripts, maybe kcov[1] could be used. With some slight code changes, I managed to generate a report for the git-pull tests[2] which should at least provide a good starting point for how the tests can be improved.

[1] http://simonkagstrom.github.io/kcov/ [2] <http://www.googledrive.com/host/0B4O2AiYulllpfmJlTW4xT050OVVicnNWWS02dm52aTJ2TFIwQ2QwdWh0VHotSkU4eUNNWjg>

Regards, Paul

Previous: Matthieu MoyNext: Johannes Schindelin
Message 8 of 15 in “make git-pull a builtin”
  1. make git-pull a builtinPaul Tan, Mar 17, 2015
  2. Stephen RobinMar 18, 2015
  3. Johannes SchindelinMar 18, 2015
  4. Johannes SchindelinMar 18, 2015
  5. Paul TanMar 21, 2015
  6. Johannes SchindelinMar 21, 2015
  7. Matthieu MoyMar 18, 2015
  8. Paul TanMar 21, 2015
  9. Johannes SchindelinMar 21, 2015
  10. Paul TanMar 22, 2015
  11. Johannes SchindelinMar 23, 2015
  12. Duy NguyenMar 23, 2015
  13. Paul TanMar 24, 2015
  14. Junio C HamanoMar 18, 2015
  15. Paul TanMar 21, 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.