Definitely something like Option B: it’d be much easier to implement and won’t interfere with however I choose to use Git. Easier for you and a better experience for us.
(What I currently do is have a pair of shell scripts or batch files: one deleted the unpacked tree and unzips the EPUB, the other deletes the EPUB then correctly zips up the directory. I use Sigil as usual, then use the unpacker script before I commit with Git; and when I’ve done something with Git—change branch, for example—I run the packer script.)
|