unveil worktree in cmd_log(); fixes 'got log path/to/file'
diff --git a/got/got.c b/got/got.c
index 37ac5ae..378b382 100644
--- a/got/got.c
+++ b/got/got.c
@@ -844,7 +844,8 @@ cmd_log(int argc, char *argv[])
goto done;
}
- error = apply_unveil(repo_path, NULL);
+ error = apply_unveil(repo_path,
+ worktree ? got_worktree_get_root_path(worktree) : NULL);
if (error)
goto done;