From d5f1e57f712468bc591617b738b9754bf0b0398a Mon Sep 17 00:00:00 2001 From: Thijs van der Burgt Date: Thu, 4 Apr 2024 15:40:52 +0200 Subject: [PATCH] Add `prune` to fetch Adhere to the changes introduced in Dolt: [#6413](https://github.com/dolthub/dolt/issues/6413) --- doltcli/dolt.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doltcli/dolt.py b/doltcli/dolt.py index 1cfacf7..0090bc8 100644 --- a/doltcli/dolt.py +++ b/doltcli/dolt.py @@ -990,19 +990,23 @@ def fetch( remote: str = "origin", refspecs: Union[str, List[str]] = None, force: bool = False, + prune: bool = False, **kwargs, ): """ Fetch the specified branch or list of branches from the remote provided, defaults to origin. - :param remote: the reomte to fetch from + :param remote: the remote to fetch from :param refspecs: branch or branches to fetch :param force: whether to override local history with remote + :param prune: deletes any local remote refs that are not present on the remote being fetched :return: """ args = ["fetch"] if force: args.append("--force") + if prune: + args.append("--prune") if remote: args.append(remote) if refspecs: