From: Graham Knop Date: Sat, 9 Feb 2013 02:23:34 +0000 (-0500) Subject: fix changes check when diff.mnemonicprefix is set X-Git-Tag: v0.001000~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c373c51bbd69922d50c1ef464cd98e05cf166865;p=p5sagit%2FDistar.git fix changes check when diff.mnemonicprefix is set --- diff --git a/lib/Distar.pm b/lib/Distar.pm index 8e33320..fc6cae4 100644 --- a/lib/Distar.pm +++ b/lib/Distar.pm @@ -80,7 +80,7 @@ sub run_preflight { my @cached = grep /^\+/, `git diff --cached -U0`; @cached > 0 or die "Please add:\n\n$ARGV[0] - $ymd\n\nto Changes and git add"; @cached == 2 or die "Pre-commit Changes not just Changes line"; - $cached[0] eq "+++ b/Changes\n" or die "Changes not changed"; + $cached[0] =~ /^\+\+\+ .\/Changes\n/ or die "Changes not changed"; $cached[1] eq "+$ARGV[0] - $ymd\n" or die "Changes new line should be: \n\n$ARGV[0] - $ymd\n "; }