On 9/12/2018 12:45 PM, Derrick Stolee via GitGitGadget wrote:
We have coverage targets in our Makefile for using gcov to display line
coverage based on our test suite. The way I like to do it is to run:
make coverage-test
make coverage-report
Very nice, I was unaware of the coverage test make targets. I like the
new report; it makes it easier to verify any new changes are actually
tested.
4. The lines in read-cache.c are part of a new block for the condition "if
(expand_name_field)" as part of an optimization. These lines should
probably be covered before that series is merged to 'next'. I understand
that Ben and Duy are continuing work in this direction [1].
This code is only exercised when the index format is V4 but the default
is version 2/3 [1]. To enable the test suite to use version 4 and test
those code paths will require the addition of a new
GIT_TEST_INDEX_VERSION environment variable. I'll add that to my TODO list.
[1] https://git-scm.com/docs/git/2.1.0