Set git user info for Homebrew committing

The `git commit` command wants to set both an author and a committer.
The `--author` flag only sets the author,
leaving git without a value for the committer,
causing git to attempt to autodiscover that value.

To work around it, use the `-c` git flag to temporarily set the relevant
config variables for the scope of the command.
This commit is contained in:
Aneesh Agrawal 2017-01-13 01:18:54 -05:00
parent cc8bee8f89
commit 90735661fe

View file

@ -52,8 +52,10 @@ update_brew() {
> "${tmp_dir}/Formula/servo-bin.rb"
git -C "${tmp_dir}" add ./Formula/servo-bin.rb
git -C "${tmp_dir}" commit \
--author="Tom Servo <servo@servo.org>" \
git -C "${tmp_dir}" \
-c user.name="Tom Servo" \
-c user.email="servo@servo.org" \
commit \
--message="Version bump: ${version}"
git -C "${tmp_dir}" push -qf \