Commit 69185643da8c9e26b4e750f5c35826f2fe7baf21

Stefan Sperling 2019-07-12T16:09:08

remove unused variable in commit_worktree()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/lib/worktree.c b/lib/worktree.c
index 01e747a..cf36673 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -3244,7 +3244,6 @@ commit_worktree(struct got_object_id **new_commit_id,
 	const struct got_error *err = NULL, *unlockerr = NULL;
 	struct got_pathlist_entry *pe;
 	const char *head_ref_name = NULL;
-	struct got_reference *head_ref = NULL;
 	struct got_commit_object *head_commit = NULL;
 	struct got_reference *head_ref2 = NULL;
 	struct got_object_id *head_commit_id2 = NULL;
@@ -3360,8 +3359,6 @@ done:
 	if (head_commit)
 		got_object_commit_close(head_commit);
 	free(head_commit_id2);
-	if (head_ref)
-		got_ref_close(head_ref);
 	if (head_ref2) {
 		unlockerr = got_ref_unlock(head_ref2);
 		if (unlockerr && err == NULL)