Open glencbz opened 12 months ago
Do you enable watchman? The un-ignored file is unmodified in the working copy, so it wouldn't be detected by watchman.
Perhaps, watchman clock would need to be reset on ignore pattern changed, (or contain hash of active ignore patterns) to detect changes.
Dumb question: how can I tell if I've enabled watchman? 😅
Try jj config list core.fsmonitor
. It's disabled by default. jj status -v
will also print something like "Querying Watchman".
I can reproduce the problem with fsmonitor = "watchman"
.
Minor updates to Yuya's last comment: these days, you can use jj debug watchman status
and other jj debug watchman
commands. Today, it would also be jj status --debug
instead of jj status -v
.
Description
In some cases, a
.gitignore
d file in one commit can get tracked by another commit, but the file seems to stick around in the working copy outside of the commits, ready to be tracked again!The commit topology is like:
where in A, there is a .gitignore that ignores
/path/to/ignored
./path/to/ignored
is in the working copy. B doesn't have the .gitignorenow, checking out B:
puts
/path/to/ignored
in @.Other, possibly relevant information:
/path/to/ignored
is owned byroot
(it was generated by something in a Docker container)./path/to/ignored
is binary.Expected/Actual Behavior
jj abandon
should delete the file and recreate an empty working copy commit. Instead, the newly created working copy commit still has/path/to/ignored
.jj co B
should create an empty working copy commit. Instead, every working copy commit has/path/to/ignored
in it (also causing the working copy commits to not be auto-abandoned).jj co <yet another unrelated commit>
afterjj co B
also gives similar results tojj co B
Fixable by deleting
/path/to/ignored
, as one might expect.Specifications