fix commit_HEAD_changes on empty repo