commit - a855e33f642b396e376f7933c47e61053f1902ee
commit + 675c7539c677a208d43573b3459ac144e7739b09
blob - a6554be62b8f3392936b89f049ae18a03c7d251c
blob + c1378d1455646e94cbb9862257c7c43f063eab0c
--- lib/worktree.c
+++ lib/worktree.c
err = lock_worktree(worktree, LOCK_EX);
if (err)
goto done;
+
+ err = got_worktree_status(worktree, relpath ? relpath : "",
+ repo, collect_committables, &paths, NULL, NULL);
+ if (err)
+ goto done;
+
+ /* TODO: collect commit message if not specified */
err = got_object_open_as_commit(&base_commit, repo,
worktree->base_commit_id);
if (err)
goto done;
- err = got_worktree_status(worktree, relpath ? relpath : "",
- repo, collect_committables, &paths, NULL, NULL);
- if (err)
- goto done;
-
- /* TODO: collect commit message if not specified */
-
/* TODO: walk base tree and patch it to create a new tree */
printf("committables:\n");
TAILQ_FOREACH(pe, &paths, entry) {