]> git.ipfire.org Git - pbs.git/commitdiff
sources: Clone up to the last 256 commits
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Oct 2022 07:26:38 +0000 (07:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Oct 2022 07:26:38 +0000 (07:26 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/sources.py

index 5ddc7990b3ae6d2a4bb31e93e0b4a535190a5ecb..894810693b28dc1113e78b89d1f0af962c94f016 100644 (file)
@@ -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",