Since the move to consider the pile checkout always relative to the main checkout, we can't call commands from inside the the patches/ directory (or pile checkout if you will). That is because all the commands will simply append "/{pile.dir}" and then fail with a backtrace.
I was looking at a quick fix, but it became worse due to the addition of worktree config. The result from git config --get-regexp 'pile\..*' may be incorrect as the worktree config is always from the "result-branch" checkout and the checkout for the pile branch will simply return the values for the local config, not worktree.
Fix is a bit more involved, but seems possible: we need to check the worktree list output and figure out if we are in the pile checkout or result-branch checkout. Prior to even creating a Config object.
Since the move to consider the pile checkout always relative to the main checkout, we can't call commands from inside the the patches/ directory (or pile checkout if you will). That is because all the commands will simply append "/{pile.dir}" and then fail with a backtrace.
I was looking at a quick fix, but it became worse due to the addition of worktree config. The result from
git config --get-regexp 'pile\..*'
may be incorrect as the worktree config is always from the "result-branch" checkout and the checkout for the pile branch will simply return the values for the local config, not worktree.Fix is a bit more involved, but seems possible: we need to check the worktree list output and figure out if we are in the pile checkout or result-branch checkout. Prior to even creating a Config object.