summaryrefslogtreecommitdiff
path: root/mkgitver
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2020-08-03 10:23:43 -0700
committerWayne Davison <wayne@opencoder.net>2020-08-03 10:23:43 -0700
commit16b7670614daad3293047ac0568621e4a2f493f9 (patch)
treebb404bdd1e8273d982d5d320b7dc5a8ba75f3513 /mkgitver
parent72b2a81f90b5f273ffb721077066e5e5258dcb5f (diff)
downloadrsync-16b7670614daad3293047ac0568621e4a2f493f9.tar.gz
A couple more mkgitver tweaks
- Support git worktree checkouts (has non-dir .git) - Use --always for someone who may be missing a tag.
Diffstat (limited to 'mkgitver')
-rwxr-xr-xmkgitver4
1 files changed, 2 insertions, 2 deletions
diff --git a/mkgitver b/mkgitver
index 113cb64a..309beda7 100755
--- a/mkgitver
+++ b/mkgitver
@@ -2,8 +2,8 @@
srcdir=`dirname $0`
-if test -d "$srcdir/.git"; then
- gitver=\"`git describe --abbrev=8`\" || exit 1
+if test -e "$srcdir/.git"; then
+ gitver=\"`git describe --abbrev=8 --always`\" || exit 1
else
gitver=RSYNC_VERSION
fi