I was using [`git-new-workdir`](http://nuclearsquid.com/writings/git-new-workdir/) and recently switched to using the newer form [`git worktree`](https://github.com/blog/2042-git-2-5-including-multiple-worktrees-and-triang...) however found this stops the plugin working.
The reason appears to be that instead of a `.git` directory in the 'worktee directory' there is a `.git` file that contains a reference to the original directory. e.g. `gitdir: /home/ubuntu/origdir.git/.git/worktrees/newdir.git`.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/285
Here's a little test setup to formalize the use-case:
``` mkdir r1 cd r1
git init echo "f1" >> f1 git add f1 git commit -a -m "added f1" git config user.name testuser git config user.email testuser@ git commit -a -m "added f1"
git worktree add ../w1 -b work1 echo "f1:r1" >> f1 git status
cd ../w1 git status echo "f2" >> f2 git add f2 git commit -a -m "f2" echo "f1:w1" >> f1 git status ```
Then in Geany, open both files: `r1/f1` and `w1/f1`. Check:
1. The Version Control actions should be available for both files 2. Status for each of the `f1` files should show the corresponding branch names (`master`, `work1`) and state: `modified`. 3. Diff for each file should list the respective changes (single line added `f1:r1`, `f1:w1`) 4. Commit dialog should list only one `f1` file (per tree) 5. Commit should succeed for each of the trees 6. Final history for each file should list only tree-specific commits.
In the current Geany version (1.37), the step 1. above is failing for the `w1/f1` file (worktree-based).
Closed #285 via #1028.
github-comments@lists.geany.org