diff --git a/tool/auto-style.rb b/tool/auto-style.rb index 39e7d14cb9..b673e3d177 100755 --- a/tool/auto-style.rb +++ b/tool/auto-style.rb @@ -11,7 +11,7 @@ class Git def initialize(oldrev, newrev, branch = nil) @oldrev = oldrev - @newrev = newrev + @newrev = newrev.empty? ? 'HEAD' : newrev @branch = branch # GitHub may not fetch github.event.pull_request.base.sha at checkout