summaryrefslogtreecommitdiff
path: root/bin/git-qt-cherry-pick
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-08-27 19:33:06 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-09-14 13:45:24 +0200
commitc9308a65e72f91681a509460a32dc3952091569d (patch)
treecc7aabb26e31f1e0bb138bb3984960741ce2ffd0 /bin/git-qt-cherry-pick
parent82e8849026258223eee01e4cf215a251595c53c5 (diff)
downloadqtrepotools-c9308a65e72f91681a509460a32dc3952091569d.tar.gz
mention the source repository in the fake cherry-picked-from line
Change-Id: Id8fe98870f8881a57e5ca70baecac4f770fc6734 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'bin/git-qt-cherry-pick')
-rwxr-xr-xbin/git-qt-cherry-pick4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/git-qt-cherry-pick b/bin/git-qt-cherry-pick
index 28ea847..62aff97 100755
--- a/bin/git-qt-cherry-pick
+++ b/bin/git-qt-cherry-pick
@@ -217,6 +217,8 @@ if (!$push) {
$dst_cd = $cd_other;
}
+my $short_src = $$cand[0][$inv];
+$short_src =~ s,^.*/,,;
my $needid = -1;
for my $commit (@commits) {
my @revs;
@@ -240,7 +242,7 @@ for my $commit (@commits) {
} elsif (s/^(--- \@old\@|\+\+\+ \@new\@)\/([^\n]+)/$1."\/".map_name($2)/e) {
} elsif ($_ eq "---\n") {
$patch .= "\n" if (!$empty);
- $patch .= "(cherry picked from commit ".$sha1.")\n";
+ $patch .= "(cherry picked from ".$short_src."/".$sha1.")\n";
if (!$haveid) {
$needid = int(grep /codereview/, `${dst_cd}git remote -v`) if ($needid < 0);
$patch .= "Change-Id: I".$sha1."\n" if ($needid);