Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: git-split-comm…
Fetching contributors…

Cannot retrieve contributors at this time

executable file 28 lines (23 sloc) 0.492 kb
#!/usr/bin/perl
my %opt;
use Getopt::Std;
getopts("q", \%opt);
@ARGV = qw(HEAD ORIG_HEAD) unless @ARGV;
for my $rev (@ARGV) {
chomp(my $res = qx{git rev-parse $rev^{tree}});
if ($?) { $BAD++ }
else { push @{$hash{$res}}, $rev }
}
exit 2 if $BAD;
if (keys(%hash) == 1) {
my ($res) = keys %hash;
print "$res\n" unless $opt{"q"};
exit 0;
} else {
unless ($opt{"q"}) {
for my $res (keys %hash) {
print $res, " ", join(" ", @{$hash{$res}}), "\n";
}
}
exit 1;
}
Jump to Line
Something went wrong with that request. Please try again.