mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Pass user name and email to git-number's initial commit.
Bug: 728618 Change-Id: I0706f9c0b6d17e82a77cad95a9264038f594b80d Reviewed-on: https://chromium-review.googlesource.com/521222 Reviewed-by: Aaron Gable <agable@chromium.org> Commit-Queue: John Budorick <jbudorick@chromium.org>
This commit is contained in:
committed by
Commit Bot
parent
7cf96a4b4b
commit
bcec9e7415
@@ -204,8 +204,14 @@ def load_generation_numbers(targets):
|
|||||||
|
|
||||||
if git.tree(REF) is None:
|
if git.tree(REF) is None:
|
||||||
empty = git.mktree({})
|
empty = git.mktree({})
|
||||||
commit_hash = git.run('commit-tree', '-m', 'Initial commit from git-number',
|
commit_hash = git.run(
|
||||||
empty)
|
# 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)
|
git.run('update-ref', REF, commit_hash)
|
||||||
|
|
||||||
with git.ScopedPool(kind=POOL_KIND) as pool:
|
with git.ScopedPool(kind=POOL_KIND) as pool:
|
||||||
|
|||||||
Reference in New Issue
Block a user