This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update CPANPLUS::Dist::Build to cpan version 0.42
[perl5.git] / Porting / make_dot_patch.pl
index 6d2767c..b50fd85 100755 (executable)
@@ -20,28 +20,8 @@ use warnings;
 #
 # Yves
 
-use POSIX qw(strftime);
-sub isotime { strftime "%Y-%m-%d.%H:%M:%S",gmtime(shift||time) }
+use lib "Porting";
+use GitUtils qw(gen_dot_patch);
+print gen_dot_patch(@ARGV), -t STDOUT ? "\n" : "";
 
-my $sha1= shift || `git rev-parse HEAD`;
-chomp($sha1);
-my @branches=(
-          'origin/blead',
-          'origin/maint-5.10',
-          'origin/maint-5.8',
-          'origin/maint-5.8-dor',
-          'origin/maint-5.6',
-          'origin/maint-5.005',
-          'origin/maint-5.004',
-);
-my $branch;
-foreach my $b (@branches) {
-    $branch= $b and last 
-        if `git log --pretty='format:%H' $b | grep $sha1`;
-}
-
-$branch ||= "unknown-branch";
-my $tstamp= isotime(`git log -1 --pretty="format:%ct" $sha1`);
-chomp(my $describe= `git describe`);
-print join(" ", $branch, $tstamp, $sha1, $describe) . "\n";