Describe the bug
Since Jujutsu 0.34.0, jj will created colocated jj/git repositories (meaning both .jj/ and .git/ exist) by default: https://docs.jj-vcs.dev/latest/changelog/#0340-2025-10-01
treefmt however detects the repository type as git as soon as .git/ is present, ignoring the presence of .jj/:
|
switch walkType { |
|
case Auto: |
|
// for now, we keep it simple and try git first, jujutsu second, and filesystem last |
|
reader, err = NewReader(Git, root, path, db, statz) |
|
if err != nil { |
|
reader, err = NewReader(Jujutsu, root, path, db, statz) |
|
if err != nil { |
|
reader, err = NewReader(Filesystem, root, path, db, statz) |
|
} |
|
} |
To Reproduce
Steps to reproduce the behavior:
jj git clone ...
- Move around files
- Run
treefmt and see it complain about "Path ... is in the worktree but appears to have been removed from the filesystem"
Expected behavior
treefmt detects colocated jj/git repositories as jj repositories.
System information
NixOS 25.11, jj 0.35.0, treefmt 2.4.0
Describe the bug
Since Jujutsu 0.34.0,
jjwill created colocatedjj/gitrepositories (meaning both.jj/and.git/exist) by default: https://docs.jj-vcs.dev/latest/changelog/#0340-2025-10-01treefmthowever detects the repository type asgitas soon as.git/is present, ignoring the presence of.jj/:treefmt/walk/walk.go
Lines 213 to 222 in 0a2f334
To Reproduce
Steps to reproduce the behavior:
jj git clone ...treefmtand see it complain about "Path ... is in the worktree but appears to have been removed from the filesystem"Expected behavior
treefmtdetects colocatedjj/gitrepositories asjjrepositories.System information
NixOS 25.11,
jj0.35.0,treefmt2.4.0