Message ID | pull.1054.v2.git.git.1629145036.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes: > 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!) Thanks, will take a look later after the release is done; nice to see these fix-up changes already applied in the series.
On Mon, Aug 16, 2021 at 10:49 PM Junio C Hamano <gitster@pobox.com> wrote: > > "Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > 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!) > > Thanks, will take a look later after the release is done; nice to > see these fix-up changes already applied in the series. You're welcome. Slight tangent: for the series, the bottom-most commit (which introduces the hash identifiers) could be a separate topic which graduates sooner.
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; }