You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, a .gitignored 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:
@
|
A B
| /
P
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 .gitignore
now, checking out B:
@
|
A B
| /
P
puts /path/to/ignored in @.
Other, possibly relevant information:
/path/to/ignored is owned by root (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> after jj co B also gives similar results to jj co B
Fixable by deleting /path/to/ignored, as one might expect.
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
The text was updated successfully, but these errors were encountered: