From: Rob Browning Date: Sun, 1 Feb 2015 21:08:02 +0000 (-0600) Subject: Always pass --always to git-describe X-Git-Tag: 0.27-rc2~13 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=commitdiff_plain;h=76a51c07e478ddd0d647fc83aa4bf24ba31cd8fc Always pass --always to git-describe Without this the build might fail if the git history is short enough, perhaps via a shallow clone. Signed-off-by: Rob Browning Tested-by: Rob Browning --- diff --git a/Makefile b/Makefile index b129a7e..1870a87 100644 --- a/Makefile +++ b/Makefile @@ -153,13 +153,13 @@ export-docs: Documentation/all rm -f $${GIT_INDEX_FILE} && \ git add -f Documentation/*.1 && \ git update-ref refs/heads/man \ - $$(echo "Autogenerated man pages for $$(git describe)" \ + $$(echo "Autogenerated man pages for $$(git describe --always)" \ | git commit-tree $$(git write-tree --prefix=Documentation) \ -p refs/heads/man) && \ rm -f $${GIT_INDEX_FILE} && \ git add -f Documentation/*.html && \ git update-ref refs/heads/html \ - $$(echo "Autogenerated html pages for $$(git describe)" \ + $$(echo "Autogenerated html pages for $$(git describe --always)" \ | git commit-tree $$(git write-tree --prefix=Documentation) \ -p refs/heads/html) diff --git a/format-subst.pl b/format-subst.pl index 8a331bf..42b255d 100755 --- a/format-subst.pl +++ b/format-subst.pl @@ -19,7 +19,7 @@ while (<>) { s{ \$Format:\%d\$ }{ - my $tag = fix(ex('git describe --match="[0-9]*"')); + my $tag = fix(ex('git describe --always --match="[0-9]*"')); "(tag: bup-$tag)" }ex;