make sure we only commit the changes on the ddoc when needed