git-pile / git-pile

Manage a pile of patches on top of a git branch
GNU Lesser General Public License v2.1
18 stars 7 forks source link

Commands can't be called from pile checkout on > 1.0 #104

Closed lucasdemarchi closed 1 year ago

lucasdemarchi commented 1 year ago

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.