summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
+ }
+ }
+}