From 0ef4d71f23fb14c664c7595428ce2a10959485c1 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 10 Jul 2011 13:17:36 +0200 Subject: add find-cherry.pl Signed-off-by: Florian Pritz --- find-cherry.pl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 find-cherry.pl (limited to 'find-cherry.pl') 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; + } + } +} -- cgit v1.2.3-24-g4f1b