develooper Front page | perl.perl5.porters | Postings from October 2012


Thread Next
October 25, 2012 00:17
Message ID:
A test run in a clone of a perl from github/ruz gave this:
t/porting/cmp_version ......................................... fatal: No names found, cannot describe anything.

The warning comes because there are no tags here, and the git-describe
call's stderr is allowed to leak out.

The "ok" comes because after checking, we have $tag_to_compare and
$tag_exists both being an empty string, and treat that as a successfully
found tag.

I'm not particularly sure, but I suspect something like the patch below
is all that's needed.


diff --git a/Porting/ b/Porting/
index 97c78b2..525ffe1 100755
--- a/Porting/
+++ b/Porting/
@@ -39,10 +39,17 @@ my $null = devnull();
 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;

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About