What actions trigger the bug:
Two different, unrelated repositories with emacs source code tree. My tree(s)
looks like this:
~/repos/emsrc/emacs/
~/repos/enacs-tests/emacs/
Where in both the last "emacs/" is the Emacs source tree from main git
repository.
~/repos/emsrc/emacs/ is the one I use for my "everyday" Emacs. I build Emacs
now
and then once in a week or few weeks with a script, and I make each build in its
own our-of-source worktree. The other one is one where I used to do some tests.
It shouldn't matter since all worktrees are contained withing parent directory,
which in one case is "emsrc" and in the other case "emacs-tests", but for some
reason project.el sees the wrong one.
1. create two parent folders each one containing a copy of emacs sources
1. create out of source worktree for Emacs source under one of those
2. navigate to the worktree/lisp/progmodes
3. run M-: (project-known-project-roots)
In my Emacs, I am in my currently installed emacs worktree, where git root is
~/repos/emsrc/emacs but project.el returns ("~/repos/emacs-tests/emacs/") as a
result