Suggested-by: Duy Nguyen <pclo...@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contre...@gmail.com>
---
 contrib/related/git-related    |  2 +-
 contrib/related/test-related.t | 12 ++++--------
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/contrib/related/git-related b/contrib/related/git-related
index f94f5f4..3399307 100755
--- a/contrib/related/git-related
+++ b/contrib/related/git-related
@@ -56,7 +56,7 @@ class Persons
   end
 
   def self.get(name, email)
-    id = [name, email]
+    id = email.downcase
     person = @@index[id]
     if not person
       person = @@index[id] = Person.new(name, email)
diff --git a/contrib/related/test-related.t b/contrib/related/test-related.t
index 9da2693..a19ad32 100755
--- a/contrib/related/test-related.t
+++ b/contrib/related/test-related.t
@@ -44,8 +44,7 @@ test_expect_success "others" "
        git format-patch --stdout -1 master > patch &&
        git related patch | sort > actual &&
        cat > expected <<-EOF &&
-       John Doe <j...@doe.com> (author: 33%)
-       John Poppins <j...@doe.com> (author: 33%)
+       John Poppins <j...@doe.com> (author: 66%)
        Jon Stewart <j...@stewart.com> (reviewer: 33%, author: 33%)
        EOF
        test_cmp expected actual
@@ -56,8 +55,7 @@ test_expect_success "multiple patches" "
        git format-patch --stdout -1 master^ > patch2 &&
        git related patch1 patch2 | sort > actual &&
        cat > expected <<-EOF &&
-       John Doe <j...@doe.com> (author: 25%)
-       John Poppins <j...@doe.com> (author: 25%)
+       John Poppins <j...@doe.com> (author: 50%)
        Jon Stewart <j...@stewart.com> (reviewer: 25%, author: 25%)
        Pablo Escobar <pa...@escobar.com> (author: 25%)
        EOF
@@ -67,8 +65,7 @@ test_expect_success "multiple patches" "
 test_expect_success "from committish" "
        git related -1 master | sort > actual &&
        cat > expected <<-EOF &&
-       John Doe <j...@doe.com> (author: 33%)
-       John Poppins <j...@doe.com> (author: 33%)
+       John Poppins <j...@doe.com> (author: 66%)
        Jon Stewart <j...@stewart.com> (reviewer: 33%, author: 33%)
        EOF
        test_cmp expected actual
@@ -77,8 +74,7 @@ test_expect_success "from committish" "
 test_expect_success "from single rev committish" "
        git related -1 master | sort > actual &&
        cat > expected <<-EOF &&
-       John Doe <j...@doe.com> (author: 33%)
-       John Poppins <j...@doe.com> (author: 33%)
+       John Poppins <j...@doe.com> (author: 66%)
        Jon Stewart <j...@stewart.com> (reviewer: 33%, author: 33%)
        EOF
        test_cmp expected actual
-- 
1.8.4-fc

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to