summaryrefslogtreecommitdiffstats
path: root/find-cherry.pl
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-07-10 13:17:36 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-07-10 13:17:36 +0200
commit0ef4d71f23fb14c664c7595428ce2a10959485c1 (patch)
tree390019e57e7e03ecc82bb817e98a485f8a3a818a /find-cherry.pl
parent6f25591576b528360d3302137d10d3189ecd4931 (diff)
downloadbin-0ef4d71f23fb14c664c7595428ce2a10959485c1.tar.gz
bin-0ef4d71f23fb14c664c7595428ce2a10959485c1.tar.xz
add find-cherry.pl
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'find-cherry.pl')
-rwxr-xr-xfind-cherry.pl28
1 files changed, 28 insertions, 0 deletions
diff --git a/find-cherry.pl b/find-cherry.pl
new file mode 100755
index 0000000..76a7665
--- /dev/null
+++ b/find-cherry.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use Cwd;
+
+my $ret;
+
+my $startdir = Cwd::cwd();
+
+for my $dir (@ARGV) {
+ chdir $startdir;
+ next unless -d $dir;
+ chdir $dir;
+
+ # ignore non git repos
+ system("git rev-parse &>/dev/null");
+ if (($? >> 8) == 0) {
+ # ignore repos without remotes
+ $ret = `git remote`;
+ next if ($ret eq "");
+
+ $ret = `git cherry -v origin/master 2>&1`;
+ if ($ret ne "") {
+ print "$dir\n";
+ print $ret;
+ }
+ }
+}