From: Zbigniew Jędrzejewski-Szmek Date: Wed, 3 Jul 2024 14:10:49 +0000 (+0200) Subject: tools/fetch-distro: only fetch the configured branch X-Git-Tag: v257-rc1~850^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e84e154457b0d55e823f670c377233b0211d2b7;p=thirdparty%2Fsystemd.git tools/fetch-distro: only fetch the configured branch We don't need the other branches. This mostly cuts down on the noise in output. But add '-v' to show what we're fetching. --- diff --git a/tools/fetch-distro.py b/tools/fetch-distro.py index dacaf28bcaf..e7f9f59104e 100755 --- a/tools/fetch-distro.py +++ b/tools/fetch-distro.py @@ -76,13 +76,14 @@ def checkout_distro(args, distro: str, config: dict): args.fetch = False # no need to fetch if we just cloned def update_distro(args, distro: str, config: dict): - cmd = ['git', '-C', f'pkg/{distro}', 'fetch'] - print(f"+ {shlex.join(cmd)}") - subprocess.check_call(cmd) - branch = config['Environment']['GIT_BRANCH'] old_commit = config['Environment']['GIT_COMMIT'] + cmd = ['git', '-C', f'pkg/{distro}', 'fetch', 'origin', '-v', + f'{branch}:remotes/origin/{branch}'] + print(f"+ {shlex.join(cmd)}") + subprocess.check_call(cmd) + cmd = ['git', '-C', f'pkg/{distro}', 'rev-parse', f'refs/remotes/origin/{branch}'] print(f"+ {shlex.join(cmd)}") new_commit = subprocess.check_output(cmd, text=True).strip()