mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 10:13:34 +08:00
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.
This commit is contained in:
parent
82c459f910
commit
8e84e15445
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user