Message ID | 20190624095533.22162-1-pclouds@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | Kill the_repository in tree-walk.c | expand |
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes: > This is the continuation of nd/sha1-name-c-wo-the-repository. In that > series I sealed off one place in sha1-name.c that cannot walk trees > from arbitrary repositories. With tree-walk.c taking 'struct > repository *' directly, that check in there can now be removed. Thanks. With these queued on 'master', t7814 seems to become flaky (tried running it with --stress, with and without these patches). Are we touching a wrong index file in some codepaths or something?
Hi Junio, On Wed, 26 Jun 2019, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes: > > > This is the continuation of nd/sha1-name-c-wo-the-repository. In that > > series I sealed off one place in sha1-name.c that cannot walk trees > > from arbitrary repositories. With tree-walk.c taking 'struct > > repository *' directly, that check in there can now be removed. > > Thanks. > > With these queued on 'master', t7814 seems to become flaky (tried > running it with --stress, with and without these patches). Are we > touching a wrong index file in some codepaths or something? It's not flaky, as it fails consistently, and yes, we're touching the wrong repository in at least this one code path. I think I would have wished for a more careful conversion in this patch series, as it does touch critical code paths. Given that this bug was only caught by a failing CI build, it does make me wonder what other bugs are hidden and would slip into our code base just because of gaps in the code coverage. Ciao, Dscho
On 6/27/2019 9:04 AM, Johannes Schindelin wrote: > Given that this bug was only caught by a failing CI build, it does make me > wonder what other bugs are hidden and would slip into our code base just > because of gaps in the code coverage. Here are the lines introduced by this series that are not covered by the test suite. I'm not asking you to write tests to cover these lines, but please re-examine the lines to be sure the correct conversion was made. Thanks, -Stolee > Uncovered code in 'pu' not in 'jch' > -------------------------------------------------------- > > archive.c > 47f956bd 421) err = get_tree_entry(ar_args->repo, > 47f956bd 422) &tree->object.oid, > > fast-import.c > 35d7cdbe 2565) char *buf = read_object_with_reference(the_repository, > 35d7cdbe 2566) &n->oid, > > match-trees.c > 3fe87a7f 294) if (get_tree_entry(r, hash2, del_prefix, shifted, &mode)) > > t/helper/test-match-trees.c > 3fe87a7f 23) shift_tree(the_repository, &one->object.oid, &two->object.oid, &shifted, -1); > > Nguyễn Thái Ngọc Duy 35d7cdbe sha1-file.c: remove the_repo from read_object_with_reference() > Nguyễn Thái Ngọc Duy 3fe87a7f match-trees.c: remove the_repo from shift_tree*() > Nguyễn Thái Ngọc Duy 47f956bd tree-walk.c: remove the_repo from get_tree_entry()