KungFuFurby / AddMusicKFF

Fork of AddMusicK, a compiler/inserter of music for Super Mario World
23 stars 14 forks source link

Ignoring and removing output files so they don't show up as dirty in Git? #267

Open nyanpasu64 opened 2 years ago

nyanpasu64 commented 2 years ago

When I run AddMusicK in the original Git source tree, there are some output files which get marked as dirty in Git:

Additionally, asm/SNES/bin/brrXX.bin hasn't been marked as dirty yet. But it appears to be an output (not input) of assembleSNESDriver2(), which is only called when inserting into a ROM (I don't have a ROM). So I think these files should also be treated in the same way.

One alternative to removing these files from Git is for me to run git update-index --skip-worktree ... locally. It would work on my machine, and not other people checking out this repo.

On the other hand, removing files from source control results in those files not being present in fresh clones (bad if they're useful for reference and rarely changed, but good if these files don't match the actual files written when you run AddMusicK, making them an indication of functional changes at best and actively misleading at worst).

I have noticed that when I run ./addmusick -norom originals/03\ Boss\ Clear.txt on an unmodified checkout of master, all 3 bullet points above show as altered in Git, indicating that these files are stale and don't match the actual files created by AddMusicK, which supports removing them. (I'm less confident about removing brrXX.bin, which I assume will not change upon ROM insertion, as long as the stock samples aren't altered. Though I don't exactly understand the contents of RATS tags, so I may be wrong... sigh binary hacking and in-band signalling 😔)


(Currently these "git dirty" messages serve as an indication of functional changes. Is it intended that the stock AMK writes SongSampleList.asm, main.bin, and musicXX.bin which don't match the repo contents? Or is it a mistake that the contents of the files have changed?)

KungFuFurby commented 2 years ago

These are files that were included with the stock AddmusicK bundle in the first place. Of the files in question...

Various other output files have already been added to .gitignore: this otherwise would have been a much bigger pile of "dirty" files. They specifically relate to the compiled binaries and other generated files that don't get included in a stock AddmusicK distribution by default.

There is one folder that I failed to add to .gitignore that I should do: Visualizations. That is an auto-generated case that I accidentally forgot to include. I did do stats, though.