diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-02-11 16:55:58 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-11 16:55:58 -0800 |
commit | 03bdcfcc78f476d58449c9635e95916b7b71f3dd (patch) | |
tree | 882cd230084f9259e1143fbf0cb6e26ebe7e0b95 /worktree.c | |
parent | Merge branch 'gh/doc-typos' (diff) | |
parent | refs API: remove "failure_errno" from refs_resolve_ref_unsafe() (diff) | |
download | tgif-03bdcfcc78f476d58449c9635e95916b7b71f3dd.tar.xz |
Merge branch 'ab/no-errno-from-resolve-ref-unsafe'
Remaining code-clean-up.
* ab/no-errno-from-resolve-ref-unsafe:
refs API: remove "failure_errno" from refs_resolve_ref_unsafe()
sequencer: don't use die_errno() on refs_resolve_ref_unsafe() failure
Diffstat (limited to 'worktree.c')
-rw-r--r-- | worktree.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/worktree.c b/worktree.c index 6f598dcfcd..e8f6f6ae6f 100644 --- a/worktree.c +++ b/worktree.c @@ -28,13 +28,11 @@ static void add_head_info(struct worktree *wt) { int flags; const char *target; - int ignore_errno; target = refs_resolve_ref_unsafe(get_worktree_ref_store(wt), "HEAD", 0, - &wt->head_oid, &flags, - &ignore_errno); + &wt->head_oid, &flags); if (!target) return; @@ -416,7 +414,6 @@ const struct worktree *find_shared_symref(struct worktree **worktrees, const char *symref_target; struct ref_store *refs; int flags; - int ignore_errno; if (wt->is_bare) continue; @@ -434,8 +431,7 @@ const struct worktree *find_shared_symref(struct worktree **worktrees, refs = get_worktree_ref_store(wt); symref_target = refs_resolve_ref_unsafe(refs, symref, 0, - NULL, &flags, - &ignore_errno); + NULL, &flags); if ((flags & REF_ISSYMREF) && symref_target && !strcmp(symref_target, target)) { existing = wt; @@ -563,7 +559,6 @@ int other_head_refs(each_ref_fn fn, void *cb_data) struct worktree *wt = *p; struct object_id oid; int flag; - int ignore_errno; if (wt->is_current) continue; @@ -573,7 +568,7 @@ int other_head_refs(each_ref_fn fn, void *cb_data) if (refs_resolve_ref_unsafe(get_main_ref_store(the_repository), refname.buf, RESOLVE_REF_READING, - &oid, &flag, &ignore_errno)) + &oid, &flag)) ret = fn(refname.buf, &oid, flag, cb_data); if (ret) break; |