Commit a705578854409cad08854ff1d403dc1f0fc62084

Stefan Sperling 2019-05-07T11:45:10

pass the right path to got_object_blob_create()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/lib/worktree.c b/lib/worktree.c
index 1d24f56..6eb8ace 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -2296,7 +2296,8 @@ got_worktree_commit(struct got_object_id **new_commit_id,
 			err = got_error_from_errno();
 			goto done;
 		}
-		err = got_object_blob_create(&ct->id, pe->path, repo);
+		err = got_object_blob_create(&ct->id, ondisk_path, repo);
+		free(ondisk_path);
 		if (err)
 			goto done;
 	}