Optimize git-fs a little using defer.