aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-07-03 17:24:59 +0800
committerXi Ruoyao <xry111@xry111.site>2023-07-03 17:24:59 +0800
commitbf7d32821e6d6525e8f550f3f4c49d3436a22468 (patch)
treed669d7a749a6e940ba66c7ca8d7eab5208cc5c06
parent19ff1dadd1d23a070a547d78f52694bfbb6660aa (diff)
currency: Use https for git remote, and only fetch history since r11.2
It can save some network download time.
-rw-r--r--lfs-latest-git.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lfs-latest-git.php b/lfs-latest-git.php
index 90a31a928..8f933a30e 100644
--- a/lfs-latest-git.php
+++ b/lfs-latest-git.php
@@ -344,13 +344,15 @@ function get_current()
// Fetech from git and get wget-list
$current = array();
#$lfssvn = "svn://svn.linuxfromscratch.org/LFS/trunk";
- $lfsgit = "git://git.linuxfromscratch.org/lfs.git";
+ $lfsgit = "https://git.linuxfromscratch.org/lfs.git";
$tmpdir = exec( "mktemp -d /tmp/lfscheck.XXXXXX" );
$cdir = getcwd();
chdir( $tmpdir );
- #exec ( "svn --quiet export $lfssvn LFS" );
- exec ( "git clone $lfsgit LFS" );
+
+ # git-version.sh needs the history since the rx.y tag.
+ exec ( "git clone $lfsgit LFS --depth 1 --branch r11.2" );
+ exec ( "git -C LFS pull origin trunk" );
# Make version.ent
chdir( "$tmpdir/LFS" );