Misc trivia: Avoid untracked test file and fix Makefile dependencies#2106
Conversation
|
Belatedly adding test/mpileup/mp_2018.fa.fai does actually make it annoying to update to this commit if you've previously run the tests, and could interfere with bisecting and running the tests if you didn't also run So it might be better to change the test/mpileup directory to git-ignore and |
|
Is the the only reason the *.fai files in the test/mpileup directory are in git is to stop them being marked as untracked files? |
Also correct inadvertently executable .sam file.
|
The short answer is yes, I think. But really I suspect adding them was just a The goal is to stop them from appearing as untracked files. That can be done either by git-adding them, or by git-ignoring and There is an additional benefit to having these files in git: an advantage of the git-adding approach is that you could notice the “change not staged for commit” if the output from indexing ever changed. But if one wanted to check that, one should really add a proper test comparing to expected output instead. The disadvantage of now git-adding the file at this late date is that if the file already exists on current develop (because you've run the tests), updating to this commit produces “error: The following untracked working tree files would be overwritten by checkout” and you must delete it yourself first. The same thing would happen forevermore when bisecting across this commit, which would be quite annoying. I expected that the same thing would happen in reverse if I instead removed the other test/mpileup/*.fa.fai files. However (perhaps because they go from tracked to ignored from Git's point of view) it does not, and both updating to such a commit and back again and bisecting across it work just fine. Hence I've replaced this PR with an alternative that nukes .fai files from Git in this subdirectory. (I think there are still checked-in index files in other test/ subdirectories.) |
Running tests via
make testleaves an untracked unignored file:The other .fai index files in test/mpileup/ are committed rather than ignored, cleaned, and regenerated on each test run, so commit this one too. Also correct inadvertently executable .sam file.
Also the usual accumulated dependency trivia.