Message ID | pull.1054.v3.git.git.1629207607.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Aug 17 2021, Han-Wen Nienhuys via GitGitGadget wrote: > This continues the work in https://github.com/git/git/pull/847, which the > gitgitgadget erroneously closed. > > Changes relative to last series (version 20 Jul 2021, tip: 4a5891f ) > > * fix HTTP serving > * fix t1501 (use absolute paths.) > * fix git-new-workdir > * fixes for FreeBSD (thanks, carenas@gmail.com!) > What's the overall status of this topic vis-a-vis whether it's being proposed to be integrated or is in more RFC form? Since we discussed the non-working GIT_TEST_REFTABLE=true in [1] & [2] there's been fixes to the REFFILES for the tests which has already landed as c9780bb2ca8 (Merge branch 'hn/prep-tests-for-reftable', 2021-07-13). But e.g. running t1410-reflog.sh reveals an assert failure() in this library's own code: git: reftable/record.c:1075: reftable_record_copy_from: Assertion `src->ops->type == rec->ops->type' failed. (A *lot* of things in the test suite still fail, I didn't look in any detail. Just highlighting that it's not just remaining failures due to hardcoding of .git/refs/*). I took your reply in [2] to mean that you were on board with the plan I proposed in [1], but aside from the limited REFFILES fixes the structure of what's here seems relatively unchanged. So is this series still considered RFC-esque, or what's the plan to move this forward at this point? 1. https://lore.kernel.org/git/87h7jqz7k5.fsf@evledraar.gmail.com 2. https://lore.kernel.org/git/CAFQ2z_P8vgY0RRT+XSH9K3VDQt39FLqXx6qfeZqaZPkwhq1w+A@mail.gmail.com
On Mon, Aug 23 2021, Ævar Arnfjörð Bjarmason wrote: > On Tue, Aug 17 2021, Han-Wen Nienhuys via GitGitGadget wrote: > >> This continues the work in https://github.com/git/git/pull/847, which the >> gitgitgadget erroneously closed. >> >> Changes relative to last series (version 20 Jul 2021, tip: 4a5891f ) >> >> * fix HTTP serving >> * fix t1501 (use absolute paths.) >> * fix git-new-workdir >> * fixes for FreeBSD (thanks, carenas@gmail.com!) >> > > What's the overall status of this topic vis-a-vis whether it's being > proposed to be integrated or is in more RFC form? > > Since we discussed the non-working GIT_TEST_REFTABLE=true in [1] & [2] > there's been fixes to the REFFILES for the tests which has already > landed as c9780bb2ca8 (Merge branch 'hn/prep-tests-for-reftable', > 2021-07-13). > > But e.g. running t1410-reflog.sh reveals an assert failure() in this > library's own code: > > git: reftable/record.c:1075: reftable_record_copy_from: Assertion > `src->ops->type == rec->ops->type' failed. > > (A *lot* of things in the test suite still fail, I didn't look in any > detail. Just highlighting that it's not just remaining failures due to > hardcoding of .git/refs/*). > > I took your reply in [2] to mean that you were on board with the plan I > proposed in [1], but aside from the limited REFFILES fixes the structure > of what's here seems relatively unchanged. > > So is this series still considered RFC-esque, or what's the plan to move > this forward at this point? > > 1. https://lore.kernel.org/git/87h7jqz7k5.fsf@evledraar.gmail.com > 2. https://lore.kernel.org/git/CAFQ2z_P8vgY0RRT+XSH9K3VDQt39FLqXx6qfeZqaZPkwhq1w+A@mail.gmail.com Just a note: I didn't notice the outstanding REFFILES fixes that were about to hit "master", so this was written with a branch rebased without those fixes. But in either case there's a lot of failures. Running the full test suite also reveals at least a couple of tests running into this: BUG: refs.c:1039: free called on a prepared reference transaction t1400-update-ref.sh is one of them, t5510-fetch.sh is the other one. We then have t5304-prune.sh, t3200-branch.sh and t2400-worktree-add.sh running into the assertion I noted above, in addition to the t1410-reflog.sh test I noted above.
diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c index d7137d1213..9323931eeb 100644 --- a/refs/reftable-backend.c +++ b/refs/reftable-backend.c @@ -108,7 +108,7 @@ static const char *bare_ref_name(const char *ref) static int git_reftable_read_raw_ref(struct ref_store *ref_store, const char *refname, struct object_id *oid, struct strbuf *referent, - unsigned int *type); + unsigned int *type, int *failure_errno); static void clear_reftable_log_record(struct reftable_log_record *log) { @@ -425,13 +424,14 @@ static int fixup_symrefs(struct ref_store *ref_store, for (i = 0; i < transaction->nr; i++) { struct ref_update *update = transaction->updates[i]; struct object_id old_oid; + int failure_errno; err = git_reftable_read_raw_ref(ref_store, update->refname, &old_oid, &referent, /* mutate input, like files-backend.c */ - &update->type); - if (err < 0 && errno == ENOENT && + &update->type, &failure_errno); + if (err < 0 && failure_errno == ENOENT && is_null_oid(&update->old_oid)) { err = 0; } @@ -1602,7 +1603,7 @@ static int reftable_error_to_errno(int err) static int git_reftable_read_raw_ref(struct ref_store *ref_store, const char *refname, struct object_id *oid, struct strbuf *referent, - unsigned int *type) + unsigned int *type, int *failure_errno) { struct git_reftable_ref_store *refs = (struct git_reftable_ref_store *)ref_store; @@ -1626,13 +1627,11 @@ static int git_reftable_read_raw_ref(struct ref_store *ref_store, err = reftable_stack_read_ref(stack, refname, &ref); if (err > 0) { - errno = ENOENT; + *failure_errno = ENOENT; err = -1; goto done; } if (err < 0) { - errno = reftable_error_to_errno(err); - err = -1; goto done; }