v5 * address Ævar's comment; punt on clearing errno. Han-Wen Nienhuys (6): refs: remove EINVAL errno output from specification of read_raw_ref_fn refs/files-backend: stop setting errno from lock_ref_oid_basic refs: make errno output explicit for read_raw_ref_fn refs: add failure_errno to refs_read_raw_ref() signature refs: explicitly return failure_errno from parse_loose_ref_contents refs: make errno output explicit for refs_resolve_ref_unsafe refs.c | 60 ++++++++++++++++++++++++----------- refs/debug.c | 4 +-- refs/files-backend.c | 73 ++++++++++++++++++++++--------------------- refs/packed-backend.c | 15 ++++----- refs/refs-internal.h | 40 ++++++++++++++++-------- 5 files changed, 116 insertions(+), 76 deletions(-) base-commit: 670b81a890388c60b7032a4f5b879f2ece8c4558 Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1012%2Fhanwen%2Feinval-sideband-v4 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1012/hanwen/einval-sideband-v4 Pull-Request: https://github.com/git/git/pull/1012 Range-diff vs v3: 1: e2a0e5387ab ! 1: d6a41c3c0cb refs: remove EINVAL errno output from specification of read_raw_ref_fn @@ Commit message Spotted by Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>. Signed-off-by: Han-Wen Nienhuys <hanwen@xxxxxxxxxx> - Reviewed-by: Jonathan Tan <jonathantanmy@xxxxxxxxxx> ## refs/refs-internal.h ## @@ refs/refs-internal.h: typedef int reflog_expire_fn(struct ref_store *ref_store, 2: c594c9c5c67 ! 2: ff7ea6efcba refs/files-backend: stop setting errno from lock_ref_oid_basic @@ Commit message documented to use and/or preserve errno) Signed-off-by: Han-Wen Nienhuys <hanwen@xxxxxxxxxx> - Reviewed-by: Jonathan Tan <jonathantanmy@xxxxxxxxxx> - Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> + Reviewed-By: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> ## refs/files-backend.c ## @@ refs/files-backend.c: static int create_reflock(const char *path, void *cb) 3: b017caf54ba ! 3: ff5696b0875 refs: make errno output explicit for read_raw_ref_fn @@ Commit message relevant. Signed-off-by: Han-Wen Nienhuys <hanwen@xxxxxxxxxx> - Reviewed-by: Jonathan Tan <jonathantanmy@xxxxxxxxxx> - Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> + Reviewed-By: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> ## refs.c ## @@ refs.c: int refs_read_raw_ref(struct ref_store *ref_store, 4: 4aaa9d3bd6f ! 4: 9c933706cb0 refs: add failure_errno to refs_read_raw_ref() signature @@ Commit message This lets us use the explicit errno output parameter in refs_resolve_ref_unsafe. Signed-off-by: Han-Wen Nienhuys <hanwen@xxxxxxxxxx> - Reviewed-by: Jonathan Tan <jonathantanmy@xxxxxxxxxx> - Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> + Reviewed-By: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> ## refs.c ## @@ refs.c: done: -: ----------- > 5: ab147afb38d refs: explicitly return failure_errno from parse_loose_ref_contents 5: ed5347d7bb6 ! 6: 0526a41b4b3 refs: make errno output explicit for refs_resolve_ref_unsafe @@ Commit message that needs error information to make logic decisions, so update that caller Signed-off-by: Han-Wen Nienhuys <hanwen@xxxxxxxxxx> - Reviewed-by: Jonathan Tan <jonathantanmy@xxxxxxxxxx> - Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> + Reviewed-By: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> ## refs/files-backend.c ## @@ refs/files-backend.c: static struct ref_lock *lock_ref_oid_basic(struct files_ref_store *refs, -- gitgitgadget