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
It seems that if jj status sees a new directory, and then you add that directory to .gitignore, subsequent jj status still display the new directory.
Steps to Reproduce the Problem
$ jj git init
Initialized repo in "."
$ jj st
The working copy is clean
Working copy : ooxxnqmq c92b8794 (empty) (no description set)
Parent commit: zzzzzzzz 00000000 (empty) (no description set)
$ echo "dir1" >> .gitignore
$ jj st
Working copy changes:
A .gitignore
Working copy : ooxxnqmq 5b959ca8 (no description set)
Parent commit: zzzzzzzz 00000000 (empty) (no description set)
$ mkdir dir1
$ touch dir1/file
$ jj st
Working copy changes:
A .gitignore
Working copy : ooxxnqmq 5b959ca8 (no description set)
Parent commit: zzzzzzzz 00000000 (empty) (no description set)
All working as expected until this point. The new directory is ignored. Now flip the order: add and see the new file before adding to .gitignore.
$ mkdir dir2
$ touch dir2/touch
$ jj st
Working copy changes:
A .gitignore
A dir2/file
Working copy : ooxxnqmq b72deba5 (no description set)
Parent commit: zzzzzzzz 00000000 (empty) (no description set)
$ echo "dir2" >> .gitignore
$ jj st
Working copy changes:
A .gitignore
A dir2/file
Working copy : ooxxnqmq 324d3283 (no description set)
Parent commit: zzzzzzzz 00000000 (empty) (no description set)
Expected Behavior
The last jj st should not display dir2/file.
Actual Behavior
The last jj st still displays dir2/file. Even jj commit commits the ignored file:
$ jj commit
Working copy now at: sxvyqstk 23454da1 (empty) (no description set)
Parent commit : ooxxnqmq 7abb61df Adding files
$ jj show o
Commit ID: 7abb61dfde0717bc20f9c1c27e3b1acf4b1adacf
Change ID: ooxxnqmqkwuonlouovnuwzuzpzvnmsyp
Author: Michael Pratt <[email protected]> (2024-03-20 17:37:18.000 -04:00)
Committer: Michael Pratt <[email protected]> (2024-03-20 17:49:02.000 -04:00)
Adding files
Added regular file .gitignore:
1: dir1
2: dir2
Added regular file dir2/touch:
(empty)
Specifications
Platform: linux-amd64
Version: Internal pre-release version
The text was updated successfully, but these errors were encountered:
Just to double-check that I'm not missing something silly about .gitignore file syntax, I tried this in a colocated repo, but as expected in the final state git status displays only the .gitignore file, not dir2.
prattmic
changed the title
JJ status stale cache of .gitignore?
jj status stale cache of .gitignore
Mar 20, 2024
Description
It seems that if
jj status
sees a new directory, and then you add that directory to .gitignore, subsequentjj status
still display the new directory.Steps to Reproduce the Problem
All working as expected until this point. The new directory is ignored. Now flip the order: add and see the new file before adding to .gitignore.
Expected Behavior
The last
jj st
should not displaydir2/file
.Actual Behavior
The last
jj st
still displaysdir2/file
. Evenjj commit
commits the ignored file:Specifications
The text was updated successfully, but these errors were encountered: