diff --git a/README.md b/README.md index 86b1186..e5d0b54 100644 --- a/README.md +++ b/README.md @@ -295,7 +295,7 @@ To create a shallow clone of a large repo, use `-j`: ```sh # Clone dwilding's fork of https://github.com/juju/juju and -# create a branch called update-docs, cloning with --shallow-since +# create a branch called update-docs, cloning with limited history gimmegit -j -u juju dwilding/juju update-docs ``` diff --git a/src/gimmegit/_cli.py b/src/gimmegit/_cli.py index 8d1aaa4..b4c94f5 100644 --- a/src/gimmegit/_cli.py +++ b/src/gimmegit/_cli.py @@ -164,7 +164,10 @@ def check_branch_not_taken(clone_url: str, branch: str) -> None: def clone(context: Context, jumbo: bool, extra_args: list[str]) -> None: - logger.info(f"Cloning {context.clone_url}") + if jumbo: + logger.info(f"Cloning {context.clone_url} with limited history") + else: + logger.info(f"Cloning {context.clone_url}") context.clone_dir.parent.mkdir(exist_ok=True) if context.create_branch: check_branch_not_taken(context.clone_url, context.branch) diff --git a/tests/functional/test_clone.py b/tests/functional/test_clone.py index 5b35c85..5a3a582 100644 --- a/tests/functional/test_clone.py +++ b/tests/functional/test_clone.py @@ -425,7 +425,7 @@ def test_jumbo(uv_run, test_dir): expected_dir = test_dir / "juju/dwilding-my-feature" expected_stdout = f"""\ Getting repo details -Cloning https://github.com/dwilding/juju.git +Cloning https://github.com/dwilding/juju.git with limited history Setting upstream to https://github.com/juju/juju.git Checking out a new branch my-feature based on juju:main Cloned repo: diff --git a/tests/functional/test_git_errors.py b/tests/functional/test_git_errors.py index 00a7fa8..75574c6 100644 --- a/tests/functional/test_git_errors.py +++ b/tests/functional/test_git_errors.py @@ -40,10 +40,17 @@ def test_invalid_repo(uv_run, test_dir, askpass_env, args: list[str]): text=True, ) assert result.returncode == 1 - expected_stdout = """\ + expected_stdout = ( + """\ +Getting repo details +Cloning https://github.com/dwilding/invalid.git with limited history +""" + if args[0] == "-j" + else """\ Getting repo details Cloning https://github.com/dwilding/invalid.git """ + ) assert result.stdout == expected_stdout expected_stderr = """\ Error: Unable to access repo. Is the repo private? Try configuring Git to use SSH.