summaryrefslogtreecommitdiff
path: root/worktree.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-10-15 22:07:09 +0000
committerJunio C Hamano <gitster@pobox.com>2017-10-16 11:05:51 +0900
commit49e61479be913f67e66bb3fdf8de9475c41b58bd (patch)
treed11f8d92c1cd473fdd7a70661fda2e8637bfe621 /worktree.c
parent0f05154c7064f82f122b845e0fe49a487d3a8d6e (diff)
downloadgit-49e61479be913f67e66bb3fdf8de9475c41b58bd.tar.gz
refs: convert resolve_ref_unsafe to struct object_id
Convert resolve_ref_unsafe to take a pointer to struct object_id by converting one remaining caller to use struct object_id, removing the temporary NULL pointer check in expand_ref, converting the declaration and definition, and applying the following semantic patch: @@ expression E1, E2, E3, E4; @@ - resolve_ref_unsafe(E1, E2, E3.hash, E4) + resolve_ref_unsafe(E1, E2, &E3, E4) @@ expression E1, E2, E3, E4; @@ - resolve_ref_unsafe(E1, E2, E3->hash, E4) + resolve_ref_unsafe(E1, E2, E3, E4) Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'worktree.c')
-rw-r--r--worktree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/worktree.c b/worktree.c
index cb35db03fa..2799abd555 100644
--- a/worktree.c
+++ b/worktree.c
@@ -31,7 +31,7 @@ static void add_head_info(struct worktree *wt)
target = refs_resolve_ref_unsafe(get_worktree_ref_store(wt),
"HEAD",
0,
- wt->head_oid.hash, &flags);
+ &wt->head_oid, &flags);
if (!target)
return;