Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show the real commit hash for `./servo --version`, not the bundle hash #26720

Merged
merged 4 commits into from Jun 6, 2020
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Use binary strings for compatibility with Python 3

  • Loading branch information
camelid committed May 31, 2020
commit 2e5ad99022b9107631c42f976fb5488ca295f7c0
@@ -741,10 +741,10 @@ def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit

git_sha = None
# Check if it's a bundle commit
if git_commit_subject.startswith("Shallow version of commit "):
if git_commit_subject.startswith(b"Shallow version of commit "):
# This is a bundle commit
# Get the SHA-1 from the bundle subject: "Shallow version of commit {sha1}"
git_sha = git_commit_subject.split(' ')[-1].strip()
git_sha = git_commit_subject.split(b' ')[-1].strip()
# Shorten hash
# NOTE: Partially verifies the hash, but it will still pass if it's, e.g., a tree
git_sha = subprocess.check_output([
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.