Skip to content
Snippets Groups Projects
Commit b43d1756 authored by serge-sans-paille's avatar serge-sans-paille
Browse files

Bug 1797243 - dump commit information when fetching git archive r=glandium

parent 7e080260
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ import multiprocessing
import os
import pathlib
import random
import re
import stat
import subprocess
import sys
......@@ -572,6 +573,14 @@ def git_checkout_archive(
if repo.startswith('https://github.com/'):
if not include_dot_git and not _github_submodule_required(repo, commit):
log("Using github archive service to speedup archive creation")
# Always log sha1 info, either from commit or resolved from repo.
if re.match(r"^[a-fA-F0-9]{40}$", commit):
revision = commit
else:
ref_output = subprocess.check_output(["git", "ls-remote", repo,
'refs/heads/' + commit])
revision, _ = ref_output.decode().split(maxsplit=1)
log("Fetching revision {}".format(revision))
return _git_checkout_github_archive(dest_path, repo, commit, prefix)
with tempfile.TemporaryDirectory() as td:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment