mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: pass upstream rev to scripts/get_maintainer.pl
Date: Wed, 9 Dec 2009 10:06:39 +0100	[thread overview]
Message-ID: <20091209090639.GA23236@pengutronix.de> (raw)

Hello,

I often face the "problem" that get_maintainer.pl yields my name, too,
as the commits I want to send are included in HEAD.

I think the nicest fix for that would be to be able to pass an upstream
rev à la:

	scripts/get_maintainer.pl --upstream linus/master ...

.  As my knowledge of perl is quite limited I only provide you with
my quick'n'dirty patch I usually use, just to give you an idea.

Best regards
Uwe

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 81a67a4..2f27c13 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -715,7 +715,7 @@ sub recent_git_signoffs {
 	return;
     }
 
-    $cmd = "git log --since=${email_git_since} -- ${file}";
+    $cmd = "git log --since=${email_git_since} linus/master -- ${file}";
 
     $output = `${cmd}`;
     $output =~ s/^\s*//gm;
@@ -785,12 +785,12 @@ sub git_assign_blame {
 	    my $diff_start = $2;
 	    my $diff_length = $3;
 	    next if (!("$file" eq "$diff_file"));
-	    $cmd = "git blame -l -L $diff_start,+$diff_length $file";
+	    $cmd = "git blame -l -L $diff_start,+$diff_length linus/master -- $file";
 	    @commits = save_commits($cmd, @commits);
 	}
     } else {
 	if (-f $file) {
-	    $cmd = "git blame -l $file";
+	    $cmd = "git blame -l linus/master -- $file";
 	    @commits = save_commits($cmd, @commits);
 	}
     }

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

             reply	other threads:[~2009-12-09  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-09  9:06 Uwe Kleine-König [this message]
2009-12-09 14:07 ` Joe Perches
2009-12-09 14:13   ` Mark Brown
2009-12-09 14:23     ` Joe Perches
2009-12-09 15:11       ` Mark Brown
2009-12-09 15:19   ` Uwe Kleine-König

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=20091209090639.GA23236@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®