Commit bcec9e74 authored by John Budorick's avatar John Budorick Committed by Commit Bot

Pass user name and email to git-number's initial commit.

Bug: 728618
Change-Id: I0706f9c0b6d17e82a77cad95a9264038f594b80d
Reviewed-on: https://chromium-review.googlesource.com/521222Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
parent 7cf96a4b
......@@ -204,8 +204,14 @@ def load_generation_numbers(targets):
if git.tree(REF) is None:
empty = git.mktree({})
commit_hash = git.run('commit-tree', '-m', 'Initial commit from git-number',
empty)
commit_hash = git.run(
# Git user.name and/or user.email may not be configured, so specifying
# them explicitly. They are not used, but requried by Git.
'-c', 'user.name=%s' % AUTHOR_NAME,
'-c', 'user.email=%s' % AUTHOR_EMAIL,
'commit-tree',
'-m', 'Initial commit from git-number',
empty)
git.run('update-ref', REF, commit_hash)
with git.ScopedPool(kind=POOL_KIND) as pool:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment