git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] contacts: introduce --since and --min-percent

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jan 16, 2015, 21:23 UTC
Message-ID
<1421443439-54809-1-git-send-email-artagnon@gmail.com>
In-Reply-To
<1421441933-54183-1-git-send-email-artagnon@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 contrib/contacts/git-contacts     |  4 ++++
 contrib/contacts/git-contacts.txt | 16 ++++++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/contrib/contacts/git-contacts b/contrib/contacts/git-contacts
index dbe2abf..5dde920 100755
--- a/contrib/contacts/git-contacts
+++ b/contrib/contacts/git-contacts
@@ -8,6 +8,7 @@
 use strict;
 use warnings;
 use IPC::Open2;
+use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev);
 
 my $since = '5-years-ago';
 my $min_percent = 10;
@@ -158,6 +159,9 @@ sub mailmap_contacts {
 	return \%mapped;
 }
 
+my $rv = GetOptions('since=s' => \$since, 'min-percent=i' => \$min_percent);
+exit 1 if (!$rv);
+
 if (!@ARGV) {
 	die "No input revisions or patch files\n";
 }
diff --git a/contrib/contacts/git-contacts.txt b/contrib/contacts/git-contacts.txt
index dd914d1..a50c97f 100644
--- a/contrib/contacts/git-contacts.txt
+++ b/contrib/contacts/git-contacts.txt
@@ -31,6 +31,16 @@ discuss proposed changes, or for finding the list of recipients to Cc: when
 submitting a patch series via `git send-email`. For the latter case, `git
 contacts` can be used as the argument to `git send-email`'s `--cc-cmd` option.
 
+OPTIONS
+-------
+
+--min-percent::
+	The minimum threshold of blame percentage that a person must
+	exceed in order to be reported.
+
+--since::
+        Depth of history to dig.
+
 
 DISCUSSION
 ----------
@@ -83,10 +93,8 @@ $ git send-email --cc-cmd='git contacts' feature/*.patch
 LIMITATIONS
 -----------
 
-Several conditions controlling a person's significance are currently
-hard-coded, such as minimum participation level (10%), blame date-limiting (5
-years), and `-C` level for detecting moved and copied lines (a single `-C`). In
-the future, these conditions may become configurable.
+The `-C` level for detecting moved and copied lines (a single `-C`) is
+hard-coded. In the future, this may become configurable.
 
 
 GIT
-- 
2.2.1
Previous: Eric SunshineNext: Ramkumar Ramachandra
Message 3 of 4 in “contacts: introduce --since and --min-percent”
  1. contacts: introduce --since and --min-percentRamkumar Ramachandra, Jan 16, 2015
  2. Eric SunshineJan 16, 2015
  3. contacts: introduce --since and --min-percentRamkumar Ramachandra, Jan 16, 2015
  4. Ramkumar RamachandraJan 21, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.