Thread (17 messages) flat view 17 messages, 3 authors, 2022-01-12
STALE1664d

Revision v2 of 2 in this series.

Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 0/3] refs: ab/refs-errno-cleanup fixup + remove "failure_errno"

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-12-12 19:54:24

A re-roll of a fix to my recently landed topic to remove "errno" use
from the refs API.

The only update is a rebasing on "master", this previouly semantically
conflicted with an in-flight topic that's been merged to "master".

1. https://lore.kernel.org/git/cover-0.3-00000000000-20211209T045735Z-avarab@gmail.com/ (local)

Ævar Arnfjörð Bjarmason (3):
  refs API: use "failure_errno", not "errno"
  sequencer: don't use die_errno() on refs_resolve_ref_unsafe() failure
  refs API: remove "failure_errno" from refs_resolve_ref_unsafe()

 refs.c                    | 53 +++++++++++++--------------------------
 refs.h                    |  7 +-----
 refs/files-backend.c      | 34 ++++++++-----------------
 remote.c                  |  3 +--
 sequencer.c               | 10 +++-----
 t/helper/test-ref-store.c |  3 +--
 worktree.c                | 11 +++-----
 7 files changed, 36 insertions(+), 85 deletions(-)

Range-diff against v1:
1:  b983d3b6033 = 1:  161fcad1578 refs API: use "failure_errno", not "errno"
2:  a4d1dadb9c9 = 2:  12d453d3884 sequencer: don't use die_errno() on refs_resolve_ref_unsafe() failure
3:  a42539d103c ! 3:  614590b2d10 refs API: remove "failure_errno" from refs_resolve_ref_unsafe()
    @@ refs/files-backend.c: static int files_reflog_expire(struct ref_store *ref_store
      		}
      
     
    + ## remote.c ##
    +@@ remote.c: static void read_config(struct repository *repo)
    + 
    + 	repo->remote_state->current_branch = NULL;
    + 	if (startup_info->have_repository) {
    +-		int ignore_errno;
    + 		const char *head_ref = refs_resolve_ref_unsafe(
    +-			get_main_ref_store(repo), "HEAD", 0, NULL, &flag, &ignore_errno);
    ++			get_main_ref_store(repo), "HEAD", 0, NULL, &flag);
    + 		if (head_ref && (flag & REF_ISSYMREF) &&
    + 		    skip_prefix(head_ref, "refs/heads/", &head_ref)) {
    + 			repo->remote_state->current_branch = make_branch(
    +
      ## sequencer.c ##
     @@ sequencer.c: void print_commit_summary(struct repository *r,
      	struct strbuf author_ident = STRBUF_INIT;
-- 
2.34.1.929.ge922d848c7a
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help