From: Michael Tremer Date: Tue, 25 Oct 2022 07:26:38 +0000 (+0000) Subject: sources: Clone up to the last 256 commits X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bfa52ccf55780d4681b83f4f9ba44d70f7aca3b;p=pbs.git sources: Clone up to the last 256 commits Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/sources.py b/src/buildservice/sources.py index 5ddc7990..89481069 100644 --- a/src/buildservice/sources.py +++ b/src/buildservice/sources.py @@ -19,6 +19,9 @@ from .decorators import * # Setup logging log = logging.getLogger("pakfire.buildservice.sources") +# Fetch only up to the last N commits +GIT_DEPTH = 256 + VALID_TAGS = ( "Acked-by", "Cc", @@ -543,7 +546,7 @@ class Git(object): "--bare", # Make it shallow - "--depth", "1", + "--depth", "%s" % GIT_DEPTH, # Only copy the branch we are interested in "--single-branch",