Description of problem: The version of Git in F24 gives an error when trying to expand an alias in any sub-directory of a worktree created with 'git worktree add'. Version-Release number of selected component (if applicable): git-2.7.4-2.fc24.x86_64 How reproducible: Always. Steps to Reproduce: Try to run a git alias from a sub-directory of a new worktree. $ mkdir -p /tmp/git $ cd /tmp/git $ mkdir repo1 $ cd repo1 $ git init Initialized empty Git repository in /tmp/git/repo1/.git/ $ mkdir foo $ touch foo/bar $ git add foo/bar $ git ci -m 1 [master (root-commit) 7184dab] 1 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 foo/bar $ git branch b $ git worktree add ../repo2 b Preparing ../repo2 (identifier repo2) HEAD is now at 7184dab 1 $ cd ../repo2 $ git config alias.s status $ git s On branch b nothing to commit, working directory clean $ cd foo $ git s fatal: internal error: work tree has already been set Current worktree: /tmp/git/repo2 New worktree: /tmp/git/repo2/foo Actual results: fatal: internal error: work tree has already been set Current worktree: /tmp/git/repo2 New worktree: /tmp/git/repo2/foo Expected results: The alias runs correctly. Additional info: This is discussed at http://lists-archives.com/git/855872-worktree-setup-broken-in-subdirs-with-git-alias.html but I don't understand the resolution - is the fix in a newer release? Still buggy and now fixed yet? In any case this worked fine with F22, but I can't use aliases + worktrees on F24.
I have the exact same issue. Fixed upstream in Git v2.8.0. Reference: http://git.661346.n2.nabble.com/BUG-worktree-setup-broken-in-subdirs-with-git-alias-td7645158.html
Thanks for link. It seems that it fixes the bug, according to reproducer.
git-2.7.4-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b596ee7ca9
git-2.7.4-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.