mirror of
https://github.com/truenas/scale-build.git
synced 2025-12-24 04:50:48 +00:00
Add logger context for checkout target
This commit is contained in:
@@ -14,15 +14,15 @@ def update_git_manifest(git_remote, git_sha, mode='a+'):
|
||||
|
||||
def retrieve_git_remote_and_sha(path):
|
||||
return {
|
||||
'url': run(['git', '-C', path, 'remote', 'get-url', 'origin']).stdout.strip(),
|
||||
'sha': run(['git', '-C', path, 'rev-parse', '--short', 'HEAD']).stdout.strip(),
|
||||
'url': run(['git', '-C', path, 'remote', 'get-url', 'origin'], log=False).stdout.strip(),
|
||||
'sha': run(['git', '-C', path, 'rev-parse', '--short', 'HEAD'], log=False).stdout.strip(),
|
||||
}
|
||||
|
||||
|
||||
def retrieve_git_branch(path):
|
||||
return run(['git', '-C', path, 'branch', '--show-current']).stdout.strip()
|
||||
return run(['git', '-C', path, 'branch', '--show-current'], log=False).stdout.strip()
|
||||
|
||||
|
||||
def branch_exists_in_repository(origin, branch):
|
||||
cp = run(['git', 'ls-remote', origin])
|
||||
cp = run(['git', 'ls-remote', origin], log=False)
|
||||
return bool(re.findall(fr'/{branch}\n', cp.stdout, re.M))
|
||||
|
||||
Reference in New Issue
Block a user