Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 23 lines (16 sloc) 0.612 kb
#!/usr/bin/ruby
# Verifies that git configs "user.name" and "user.email" have acceptable values.
require 'fileutils'
require File.expand_path("#{File.dirname(__FILE__)}/../rules/util.rb")
name = open('|git config user.name').read.strip
email = open('|git config user.email').read.strip
if(!name || name.length == 0)
raise "Please set git config user.name"
end
if(!email || email.length == 0)
raise "Please set git config user.email"
end
if(email.endsWith('.local') || email.include?('(none)') || !email.include?('@'))
puts "user.email: "+email
raise "Invalid git config user.email. Please fix it."
end
Jump to Line
Something went wrong with that request. Please try again.