commit 087fb88cd8e5db9d9fdcf25440bced2d15fe55c8 from: Stefan Sperling date: Sun Aug 04 10:52:33 2019 UTC call get_worktree_paths_from_argv() after unveil(2) where possible commit - 6d022e974716847d3f3c3bc97dac50e61663c49c commit + 087fb88cd8e5db9d9fdcf25440bced2d15fe55c8 blob - 0b09fb1668f2ec1610a7dcc8531b8b0d42862b1c blob + 601609820b09afb7c7b0510eb66d9c98f1661668 --- got/got.c +++ got/got.c @@ -1158,10 +1158,6 @@ cmd_update(int argc, char *argv[]) goto done; error = check_rebase_or_histedit_in_progress(worktree); - if (error) - goto done; - - error = get_worktree_paths_from_argv(&paths, argc, argv, worktree); if (error) goto done; @@ -1171,6 +1167,10 @@ cmd_update(int argc, char *argv[]) error = apply_unveil(got_repo_get_path(repo), 0, got_worktree_get_root_path(worktree)); + if (error) + goto done; + + error = get_worktree_paths_from_argv(&paths, argc, argv, worktree); if (error) goto done; @@ -2456,10 +2456,6 @@ cmd_status(int argc, char *argv[]) error = got_worktree_open(&worktree, cwd); if (error != NULL) - goto done; - - error = get_worktree_paths_from_argv(&paths, argc, argv, worktree); - if (error) goto done; error = got_repo_open(&repo, got_worktree_get_repo_path(worktree)); @@ -2468,6 +2464,10 @@ cmd_status(int argc, char *argv[]) error = apply_unveil(got_repo_get_path(repo), 1, got_worktree_get_root_path(worktree)); + if (error) + goto done; + + error = get_worktree_paths_from_argv(&paths, argc, argv, worktree); if (error) goto done; @@ -3309,10 +3309,6 @@ cmd_commit(int argc, char *argv[]) error = got_worktree_histedit_in_progress(&histedit_in_progress, worktree); - if (error) - goto done; - - error = get_worktree_paths_from_argv(&paths, argc, argv, worktree); if (error) goto done; @@ -3332,6 +3328,10 @@ cmd_commit(int argc, char *argv[]) if (error) goto done; + error = get_worktree_paths_from_argv(&paths, argc, argv, worktree); + if (error) + goto done; + cl_arg.editor = editor; cl_arg.cmdline_log = logmsg; cl_arg.worktree_path = got_worktree_get_root_path(worktree);