Method: Mailmap::Map#include_email?

Defined in:
lib/mailmap/map.rb

#include_email?(email) ⇒ Boolean

Return true if the email is defined as either of proper or commit email, otherwise false. The comparison is case-insensitive.

Parameters:

  • email (String)

    the email

Returns:

  • (Boolean)

91
92
93
94
95
96
# File 'lib/mailmap/map.rb', line 91

def include_email?(email)
  email = email.downcase
  any? do |_proper_name, proper_email, _commit_name, commit_email|
    proper_email&.downcase == email || commit_email == email
  end
end