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>
diff --git a/git_number.py b/git_number.py
index 1867b97..0d89d65 100755
--- a/git_number.py
+++ b/git_number.py
@@ -204,8 +204,14 @@
 
   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: