Precious files and the .jj directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm aware of the many discussions about precious files [1] [2] [3],
but I wanted to highlight a particularly pernicious category of
precious files that are really hard to do the right thing about with
Git: namely, other version control systems. In particular, as I
learned in [4], `git clean -ixd` will of course list `.jj` to delete
and delete it if you have it in gitignore. But yet having it untracked
results in it possibly accidentally getting added and also clutters up
`git status`.

It's my understanding that git has more file deletion edge cases of
gitignored files than of untracked ones so the latter is theoretically
safer. Is that correct?

[1]: https://lore.kernel.org/git/pull.1627.git.1703643931314.gitgitgadget@xxxxxxxxx/
[2]: https://lore.kernel.org/git/871s7r4wuv.fsf@xxxxxxxxxxxxxxxxxxx/
[3]: https://lore.kernel.org/git/7v4oepaup7.fsf@xxxxxxxxxxxxxxxxxxxxxxxx/
[4]: https://maddie.wtf/posts/2025-07-21-jujutsu-for-busy-devs

The part about these that is especially pernicious is that git does
the right thing to `.git`, there are not that many of *these*
particular file patterns, and they generally merit the same treatment
as .git as deleting them results in somewhere between frustrating and
catastrophic loss of work. The one other example of one I've seen
other than .jj is .sl, though that's only colocated with git if you
are up to serious shimming shenanigans with broken tools (nix flakes
etc) as AFAIK it is not supposed to be used colocated normally.

Should these be special cased somehow? Should they be simply caught by
the precious-files work when it eventually gets done?

Regards,
Jade




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux