X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Porting%2Fmake_dot_patch.pl;h=b50fd85a48cd86eb9025f3f4ad51dc4ae6c3159f;hb=d2369d0b6913709d85b3c192d66d4bb758cc434a;hp=cf545ac8091692c805ac52e13ba347010d559d00;hpb=031cefa092a35217a3ac4abe595ffb31b4d6ec81;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Porting/make_dot_patch.pl b/Porting/make_dot_patch.pl index cf545ac..b50fd85 100755 --- a/Porting/make_dot_patch.pl +++ b/Porting/make_dot_patch.pl @@ -1,3 +1,4 @@ +#!/usr/bin/perl use strict; use warnings; @@ -19,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";