Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-16 12:39:18 +0300
committerJunio C Hamano <gitster@pobox.com>2021-10-16 21:17:03 +0300
commitccf3cc1b189f732cb1e99b08bda37e92a896047f (patch)
tree84cc8fe8107c623b65d579bc5efca7381e026652 /worktree.c
parentac0986e302b9a94fd927e8d0a811fe6dc4d4c074 (diff)
refs API: ignore errno in worktree.c's add_head_info()
The static add_head_info() function is only used indirectly by callers of get_worktrees(), none of whom care about errno, and even if they did having the faked-up one from refs_resolve_ref_unsafe() would only confuse them if they used die_errno() et al. So let's explicitly ignore it here. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'worktree.c')
-rw-r--r--worktree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/worktree.c b/worktree.c
index cfffcdb62b..fa988ee978 100644
--- a/worktree.c
+++ b/worktree.c
@@ -28,11 +28,13 @@ 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),
+ target = refs_werrres_ref_unsafe(get_worktree_ref_store(wt),
"HEAD",
0,
- &wt->head_oid, &flags);
+ &wt->head_oid, &flags,
+ &ignore_errno);
if (!target)
return;