I'd suggest dropping git and going to a manifest file on extraction of the charm and then a comparison against that when extracting, removing old files in the manifest no longer present in the new manifest. The main goals are keeping new files introduced into the charm during unit lifecycle, while removing old files no longer in new charms when upgrading.
I'd suggest dropping git and going to a manifest file on extraction of the charm and then a comparison against that when extracting, removing old files in the manifest no longer present in the new manifest. The main goals are keeping new files introduced into the charm during unit lifecycle, while removing old files no longer in new charms when upgrading.