git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] contacts: introduce --since and --min-percent
Date: Fri, 16 Jan 2015 16:11:51 -0500	[thread overview]
Message-ID: <CAPig+cS5is73damiYgCmWp3QzmBX+E38f26oyn2nwG0FO2AStQ@mail.gmail.com> (raw)
In-Reply-To: <1421441933-54183-1-git-send-email-artagnon@gmail.com>

On Fri, Jan 16, 2015 at 3:58 PM, Ramkumar Ramachandra
<artagnon@gmail.com> wrote:
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
> diff --git a/contrib/contacts/git-contacts b/contrib/contacts/git-contacts
> index dbe2abf..b06f2e1 100755
> --- a/contrib/contacts/git-contacts
> +++ b/contrib/contacts/git-contacts
> @@ -8,12 +8,16 @@
>  use strict;
>  use warnings;
>  use IPC::Open2;
> +use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;

Most of the rest of the codebase uses qw(...) rather than qw/.../.

>  my $since = '5-years-ago';
>  my $min_percent = 10;
>  my $labels_rx = qr/Signed-off-by|Reviewed-by|Acked-by|Cc/i;
>  my %seen;
>
> +my $rv = GetOptions('since=s' => \$since, 'min-percent=i' => \$min_percent);
> +exit 1 if (!$rv);

This would make more sense if moved down to the point where the script
arguments are processed (just before the 'if (!@ARGV)' line, for
instance).

These new options should be documented in git-contacts.txt. Also, the
"Limitations" section of the documentation says that these values are
currently hard-coded, so it deserves an update as well.

>  sub format_contact {
>         my ($name, $email) = @_;
>         return "$name <$email>";
> --
> 2.2.1

  reply	other threads:[~2015-01-16 21:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 20:58 [PATCH] contacts: introduce --since and --min-percent Ramkumar Ramachandra
2015-01-16 21:11 ` Eric Sunshine [this message]
2015-01-16 21:23 ` [PATCH v2] " Ramkumar Ramachandra
2015-01-21 17:09   ` Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPig+cS5is73damiYgCmWp3QzmBX+E38f26oyn2nwG0FO2AStQ@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).