Skip to content

Commit d3d20ed

Browse files
committed
Use email and name to identify contributors, similar to what git does
`git shortlog -sne | wc -l` is the reference.
1 parent 1a494a9 commit d3d20ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/info/repo.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ impl std::hash::Hash for Sig {
4747
self.email_lowercase
4848
.as_ref()
4949
.map(|email_lc| email_lc.hash(state))
50-
.unwrap_or_else(|| self.email.hash(state))
50+
.unwrap_or_else(|| self.email.hash(state));
51+
self.name.hash(state);
5152
}
5253
}
5354

@@ -79,6 +80,7 @@ impl Ord for Sig {
7980
|| self.email.cmp(&other.email),
8081
|(a_email_lc, b_email_lc)| a_email_lc.cmp(b_email_lc),
8182
)
83+
.then_with(|| self.name.cmp(&other.name))
8284
}
8385
}
8486

0 commit comments

Comments
 (0)