def METHOD_NAME(wandb_init, git_repo):
    with unittest.mock.patch.dict("os.environ", WANDB_DISABLE_GIT="true"):
        run = wandb_init()
        assert git_repo.last_commit
        assert run._commit is None
        run.finish()