Re: [PATCH v6] Add new git-related helper to contrib
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 22, 2013, 19:54 UTC
- Message-ID
- <7vk3mqiycx.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <7vr4gyizti.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 22 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes: > >> diff --git a/contrib/related/git-related b/contrib/related/git-related >> new file mode 100755 >> index 0000000..b96dcdd >> --- /dev/null >> +++ b/contrib/related/git-related >> @@ -0,0 +1,124 @@ >> +#!/usr/bin/env ruby >> + >> +# This script finds people that might be interested in a patch >> +# usage: git related <file> >> + >> +$since = '5-years-ago' >> +$min_percent = 10 >> + >> +def fmt_person(name, email) >> + '%s <%s>' % [name, email] >> +end > > Micronit. I suspect you do not need this helper, unless later > patches start using it.
Not that matters terribly, but "later patches start using it in a different way" may be needed as a clarification.
The current two callers capture both "%s <%s>" as two separate groups but they do not need to; they can do "(%s <%s>)" and pass $1 to this function, I think.