flyingcircusio / batou

batou is a universal, fractal deployment utility using Python.
https://batou.readthedocs.org
Other
47 stars 12 forks source link

batou.git.Clone: Not pruning old branches #387

Open frlan opened 10 months ago

frlan commented 10 months ago

We are using basic clone

        self += batou.lib.git.Clone(
            <some_clone_url>,
            revision=<some_revision>
            target=<some_target>,
        )

for some time. But it appers that the checkout folder is not getting pruned by old, obsolete branches

$ git branch -a | grep "remotes/" -c
1060

after running git fetch --prune:

git branch -a | grep "remotes/" -c
39

In very active projects this might lead to bigger unneeded disc consumption (some git gc might be missing, too) and increased deployment times