All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH 2/4] get_maintainer: remove quoting on hash label
Date: Mon, 26 May 2014 13:33:11 -0700	[thread overview]
Message-ID: <20140526203354.618701914@networkplumber.org> (raw)
In-Reply-To: 20140526203309.782169359@networkplumber.org

[-- Attachment #1: get_maintainer-label.patch --]
[-- Type: text/plain, Size: 4874 bytes --]

Don't need to quote hash labels, especially when initializing.
Code is cleaner if unquoted.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

--- a/scripts/get_maintainer.pl	2014-05-26 13:09:47.000000000 -0700
+++ b/scripts/get_maintainer.pl	2014-05-26 13:27:49.000000000 -0700
@@ -94,69 +94,63 @@ my $rfc822_char = '[\\000-\\377]';
 my %VCS_cmds;
 
 my %VCS_cmds_git = (
-    "execute_cmd" => \&git_execute_cmd,
-    "available" => '(which("git") ne "") && (-e ".git")',
-    "find_signers_cmd" =>
-	"git log --no-color --follow --since=\$email_git_since " .
-	    '--numstat --no-merges ' .
-	    '--format="GitCommit: %H%n' .
-		      'GitAuthor: %an <%ae>%n' .
-		      'GitDate: %aD%n' .
-		      'GitSubject: %s%n' .
-		      '%b%n"' .
-	    " -- \$file",
-    "find_commit_signers_cmd" =>
-	"git log --no-color " .
-	    '--numstat ' .
-	    '--format="GitCommit: %H%n' .
-		      'GitAuthor: %an <%ae>%n' .
-		      'GitDate: %aD%n' .
-		      'GitSubject: %s%n' .
-		      '%b%n"' .
-	    " -1 \$commit",
-    "find_commit_author_cmd" =>
-	"git log --no-color " .
-	    '--numstat ' .
-	    '--format="GitCommit: %H%n' .
-		      'GitAuthor: %an <%ae>%n' .
-		      'GitDate: %aD%n' .
-		      'GitSubject: %s%n"' .
-	    " -1 \$commit",
-    "blame_range_cmd" => "git blame -l -L \$diff_start,+\$diff_length \$file",
-    "blame_file_cmd" => "git blame -l \$file",
-    "commit_pattern" => "^GitCommit: ([0-9a-f]{40,40})",
-    "blame_commit_pattern" => "^([0-9a-f]+) ",
-    "author_pattern" => "^GitAuthor: (.*)",
-    "subject_pattern" => "^GitSubject: (.*)",
-    "stat_pattern" => "^(\\d+)\\t(\\d+)\\t\$file\$",
+    execute_cmd => \&git_execute_cmd,
+    available   => '(which("git") ne "") && (-e ".git")',
+
+    find_signers_cmd =>
+      "git log --no-color --follow --since=\$email_git_since "
+      . '--numstat --no-merges '
+      . '--format="GitCommit: %H%n'
+      . 'GitAuthor: %an <%ae>%n'
+      . 'GitDate: %aD%n'
+      . 'GitSubject: %s%n' . '%b%n"'
+      . " -- \$file",
+    find_commit_signers_cmd => "git log --no-color "
+      . '--numstat '
+      . '--format="GitCommit: %H%n'
+      . 'GitAuthor: %an <%ae>%n'
+      . 'GitDate: %aD%n'
+      . 'GitSubject: %s%n' . '%b%n"'
+      . " -1 \$commit",
+    find_commit_author_cmd => "git log --no-color "
+      . '--numstat '
+      . '--format="GitCommit: %H%n'
+      . 'GitAuthor: %an <%ae>%n'
+      . 'GitDate: %aD%n'
+      . 'GitSubject: %s%n"'
+      . " -1 \$commit",
+    blame_range_cmd => "git blame -l -L \$diff_start,+\$diff_length \$file",
+    blame_file_cmd  => "git blame -l \$file",
+    commit_pattern  => "^GitCommit: ([0-9a-f]{40,40})",
+    blame_commit_pattern => "^([0-9a-f]+) ",
+    author_pattern       => "^GitAuthor: (.*)",
+    subject_pattern      => "^GitSubject: (.*)",
+    stat_pattern         => "^(\\d+)\\t(\\d+)\\t\$file\$",
 );
 
 my %VCS_cmds_hg = (
-    "execute_cmd" => \&hg_execute_cmd,
-    "available" => '(which("hg") ne "") && (-d ".hg")',
-    "find_signers_cmd" =>
-	"hg log --date=\$email_hg_since " .
-	    "--template='HgCommit: {node}\\n" .
-	                "HgAuthor: {author}\\n" .
-			"HgSubject: {desc}\\n'" .
-	    " -- \$file",
-    "find_commit_signers_cmd" =>
-	"hg log " .
-	    "--template='HgSubject: {desc}\\n'" .
-	    " -r \$commit",
-    "find_commit_author_cmd" =>
-	"hg log " .
-	    "--template='HgCommit: {node}\\n" .
-		        "HgAuthor: {author}\\n" .
-			"HgSubject: {desc|firstline}\\n'" .
-	    " -r \$commit",
-    "blame_range_cmd" => "",		# not supported
-    "blame_file_cmd" => "hg blame -n \$file",
-    "commit_pattern" => "^HgCommit: ([0-9a-f]{40,40})",
-    "blame_commit_pattern" => "^([ 0-9a-f]+):",
-    "author_pattern" => "^HgAuthor: (.*)",
-    "subject_pattern" => "^HgSubject: (.*)",
-    "stat_pattern" => "^(\\d+)\t(\\d+)\t\$file\$",
+    execute_cmd => \&hg_execute_cmd,
+    available   => '(which("hg") ne "" ) && ( -d ".hg" )',
+    find_signers_cmd => "hg log --date=\$email_hg_since "
+      . "--template='HgCommit: {node}\\n"
+      . "HgAuthor: {author}\\n"
+      . "HgSubject: {desc}\\n'"
+      . " -- \$file",
+    find_commit_signers_cmd => "hg log "
+      . "--template='HgSubject: {desc}\\n'"
+      . " -r \$commit",
+    find_commit_author_cmd => "hg log "
+      . "--template='HgCommit: {node}\\n"
+      . "HgAuthor: {author}\\n"
+      . "HgSubject: {desc|firstline}\\n'"
+      . " -r \$commit",
+    blame_range_cmd      => "",                               # not supported
+    blame_file_cmd       => "hg blame -n \$file",
+    commit_pattern       => "^HgCommit: ([0-9a-f]{40,40})",
+    blame_commit_pattern => "^([ 0-9a-f]+):",
+    author_pattern       => "^HgAuthor: (.*)",
+    subject_pattern      => "^HgSubject: (.*)",
+    stat_pattern         => "^(\\d+)\t(\\d+)\t\$file\$",
 );
 
 my $conf = which_conf(".get_maintainer.conf");


  parent reply	other threads:[~2014-05-26 20:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26 20:33 [PATCH 0/4] get_maintainer script cleanups Stephen Hemminger
2014-05-26 20:33 ` [PATCH 1/4] get_maintainer: use three argument open Stephen Hemminger
2014-05-26 20:33 ` Stephen Hemminger [this message]
2014-05-26 20:33 ` [PATCH 3/4] get_maintainer: use array for defining available version control Stephen Hemminger
2014-05-26 20:33 ` [PATCH 4/4] get_maintainer: use anonymous function instead of eval Stephen Hemminger
2014-05-27  1:00 ` [PATCH 0/4] get_maintainer script cleanups Joe Perches
2014-05-27  1:03   ` Joe Perches
2014-05-27  1:09     ` Stephen Hemminger
2014-05-27  1:22     ` [PATCH 5/4] get_maintainer: shut up perl critic Stephen Hemminger
2014-05-27  1:32       ` Joe Perches
2014-05-27 17:00         ` Stephen Hemminger
2014-05-27  1:06   ` [PATCH 0/4] get_maintainer script cleanups Stephen Hemminger

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=20140526203354.618701914@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.