Helpful Script for git Users

Hi all!

For anyone using git on macOS with FMOD frustrated by the lack of visibility into which FMOD entities you’ve changed when you check git status or git diff, I built a little script that should help:

This script looks for any FMOD metadata paths in the output of git and appends the full FMOD path name to the output so you can always tell what Event or Snapshot or whatever that pesky metadata file is referring to. Here are some examples:

mrmiller@mrmiller-pro sapphire-kata-fmod % git status
On branch master
Your branch is ahead of 'origin/master' by 3 commits.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        new file:   Metadata/Event/{482962e6-a54e-441f-9971-8a01ccd37278}.xml (/Master/SFX/Afterlife/Evergate/Book/Void Reveal)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   Metadata/Event/{0be85c46-92bf-4ac7-8ce3-2076ea0d6dde}.xml (/Master/Cutscenes/England/After E1)
        modified:   Metadata/Event/{1944b73d-63b3-4c5f-ab3c-06bd533c9694}.xml (/Master/MX/New York/Police)

Or for git log:

mrmiller@mrmiller-pro sapphire-kata-fmod % git log --name-status
commit 66040e0bea27ead6b942651ac183f4b4a5c5423c
Author: M. R. Miller <*****>
Date:   Fri Apr 17 16:43:25 2020 -0700

    Increase dialog UI volumes.

M       Metadata/Event/{08a3e7de-d978-4130-a14c-3e8dd9058192}.xml (/Master/UI/Dialog/End)
M       Metadata/Event/{1a4f8b9f-4b96-4eaa-962c-f66f9ff93f2c}.xml (/Master/UI/Dialog/Continue)
M       Metadata/Event/{aa8b8fb9-550a-449f-827f-251dda0382ce}.xml (/Master/UI/Dialog/Begin)

commit fb414e6dfa992b20e69c18f40b465d6e669bdaf3
Author: M. R. Miller <*****>
Date:   Fri Apr 17 16:43:14 2020 -0700

    Cleanup a MX transition in Library for China.

M       Metadata/Event/{4d96c7f7-553f-4635-b1b1-31c7de1d4cf3}.xml (/Master/MX/Afterlife/Library)