.DS_Store, .Rhistory, and .Rproj.user/ are all present in a working checkout of this repo and are all ignored only by a machine-local global gitignore:
$ git check-ignore -v .DS_Store .Rhistory .Rproj.user
/Users/<user>/.gitignore:5:.DS_Store .DS_Store
/Users/<user>/.gitignore:2:.Rhistory .Rhistory
/Users/<user>/.gitignore:1:.Rproj.user .Rproj.user
$ git config --get core.excludesFile
~/.gitignore
The repo's own .gitignore covers /.quarto/, /_site/, /_freeze/, /*.deb, .positai, and **/*.quarto_ipynb — none of these three.
Nothing is tracked today (git ls-files finds no match), so this is a latent gap rather than a live defect. It bites whoever does not have that global config: a new collaborator, a CI job, or an agent working in a container. A git add -A from any of those commits editor and OS residue, and .Rproj.user/ in particular is a directory of local RStudio state.
The reason it is worth closing rather than leaving to convention is that the protection is invisible from inside the repo. Someone checking whether the repo is safe reads .gitignore, sees the Quarto entries, and has no way to notice that three more rules are being supplied from outside it.
Patch
/.quarto/
/_site/
/_freeze/
/*.deb
.positai
+
+# Editor and OS residue. Do not rely on a contributor's global gitignore --- it
+# is invisible from inside the repo, so someone reading this file cannot tell
+# these are covered.
+.DS_Store
+.Rhistory
+.Rproj.user/
**/*.quarto_ipynb
Related
Morrison-Lab/gha#606 is adding a check-junk-files workflow that fails on tracked .DS_Store and friends. That catches the problem after it happens; this closes the door beforehand. Worth adopting the workflow here too once it lands, alongside the rest of the gha migration in #82.
.DS_Store,.Rhistory, and.Rproj.user/are all present in a working checkout of this repo and are all ignored only by a machine-local global gitignore:The repo's own
.gitignorecovers/.quarto/,/_site/,/_freeze/,/*.deb,.positai, and**/*.quarto_ipynb— none of these three.Nothing is tracked today (
git ls-filesfinds no match), so this is a latent gap rather than a live defect. It bites whoever does not have that global config: a new collaborator, a CI job, or an agent working in a container. Agit add -Afrom any of those commits editor and OS residue, and.Rproj.user/in particular is a directory of local RStudio state.The reason it is worth closing rather than leaving to convention is that the protection is invisible from inside the repo. Someone checking whether the repo is safe reads
.gitignore, sees the Quarto entries, and has no way to notice that three more rules are being supplied from outside it.Patch
Related
Morrison-Lab/gha#606 is adding a
check-junk-filesworkflow that fails on tracked.DS_Storeand friends. That catches the problem after it happens; this closes the door beforehand. Worth adopting the workflow here too once it lands, alongside the rest of the gha migration in #82.