anchor-dependency: update the dependency and commit if possible