1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/perl -w use strict; my $range = shift; my %app; foreach (`git diff --name-only $range`) { if (m@lib/([^/]*)@) { $app{$1} = 1; } elsif (m@erts/@) { $app{erts} = 1; } else { $app{otp} = 1; } } print join(', ', sort keys %app), "\n";