Chromium Code Reviews| Index: git_number.py |
| diff --git a/git_number.py b/git_number.py |
| index 6c11cee23433332d2ddd748570efa6d2bec8badc..e1c69f159f7c2bc2603fdee76e57f604b47f21e7 100755 |
| --- a/git_number.py |
| +++ b/git_number.py |
| @@ -134,6 +134,12 @@ def finalize(targets): |
| idx = os.path.join(git.run('rev-parse', '--git-dir'), 'number.idx') |
| env = os.environ.copy() |
| env['GIT_INDEX_FILE'] = idx |
| + # Git user.name and/or user.email may not be configured, so specifying them |
|
agable
2014/04/02 23:29:47
Nonono. These environment variables, if present, o
|
| + # explicitly. They are not used, but requried by Git. |
| + env['GIT_AUTHOR_NAME'] = 'git-number' |
| + env['GIT_AUTHOR_EMAIL'] = 'chrome-infrastructure-team@google.com' |
| + env['GIT_COMMITTER_NAME'] = env['GIT_AUTHOR_NAME'] |
| + env['GIT_COMMITTER_EMAIL'] = env['GIT_AUTHOR_EMAIL'] |
| progress_message = 'Finalizing: (%%(count)d/%d)' % len(DIRTY_TREES) |
| with git.ProgressPrinter(progress_message) as inc: |
| @@ -157,7 +163,7 @@ def finalize(targets): |
| for t in targets: |
| commit_cmd.extend(['-p', binascii.hexlify(t)]) |
| commit_cmd.append(tree_id) |
| - commit_hash = git.run(*commit_cmd) |
| + commit_hash = git.run(*commit_cmd, env=env) |
| git.run('update-ref', REF, commit_hash) |
| DIRTY_TREES.clear() |