unless (defined $tag_to_compare) {
# Thanks to David Golden for this suggestion.
- $tag_to_compare = `git describe --abbrev=0`;
+ $tag_to_compare = `git describe --abbrev=0 2>$null`;
chomp $tag_to_compare;
}
+unless (length $tag_to_compare) {
+ die "$0: Git found, but no Git tags found\n"
+ unless $tap;
+ print "1..0 # SKIP: Git found, but no Git tags found\n";
+ exit 0;
+}
+
my $tag_exists = `git --no-pager tag -l $tag_to_compare 2>$null`;
chomp $tag_exists;
@skip{
'lib/Carp/Heavy.pm',
'lib/Config.pm', # no version number but contents will vary
- 'lib/Exporter/Heavy.pm',
+ 'dist/Exporter/lib/Exporter/Heavy.pm',
'win32/FindExt.pm',
+ 'dist/Attribute-Handlers/demo/MyClass.pm', # it's just demonstration code
} = ();
# Files to skip just for particular version(s),
sub get_file_from_git {
my ($file, $tag) = @_;
local $/;
+
+ use open IN => ':raw';
return scalar `git --no-pager show $tag:$file 2>$null`;
}