def METHOD_NAME(in_git_dir):
    with in_git_dir.join('foo').ensure_dir().as_cwd():
        args = _args(command='try-repo', repo='../foo', files=[])
        assert args.repo is not None
        assert os.path.exists(args.repo)
        main._adjust_args_and_chdir(args)
        assert os.getcwd() == in_git_dir
        assert os.path.exists(args.repo)
        assert args.repo == 'foo'