Update: After filing this, I noticed this issue is already listed as a "limitation" in the README. I hope it can be fixed, in any case it might make sense to have a thread about it here.
I ran jjc hunks in a repo, and it resulted in a symlink called _ilyagrignore and a file called .workmux.yaml becoming tracked. This is likely because it is in the global gitignore (~/.config/git/ignore), not in the repo gitignore. In other words, my ~/.config/git/ignore contains:
_ilyagrignore/*
# Can also be a symlink
_ilyagrignore
.workmux.yaml
jj and git both correctly treat these files as ignored. For example,
$ git check-ignore _ilyagrignore --verbose
/Users/ilyagr/.config/git/ignore:11:_ilyagrignore _ilyagrignore
Demo of the bug:
$ jj status
The working copy has no changes.
Working copy (@) : zkmkpm a2ad381 (empty) (no description set)
Parent commit (@-): qkolry 7bf1daa (empty) (no description set)
$ jjc -V
jjc 0.1.0
$ jjc hunks
add _ilyagrignore (file-level change; hunk selection not supported yet)
$ jj status
Working copy changes:
A _ilyagrignore
Working copy (@) : zkmkpm 3df9338 (no description set)
Parent commit (@-): qkolry 7bf1daa (empty) (no description set)
Workaround: I end up needing to run $ jj file untrack _ilyagrignore after any jjc commands.
And BTW, if it would help to move some jj functions to jj-lib for a cleaner solution, that is absolutely something to try (I haven't checked whether there's a PR already). It might be a bit slower than just fixing it in
jjcfor now, maybe with a TODO comment.