diff options
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | src/bulk_ln.c | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -10,7 +10,8 @@ create many links. ```sh git init -b none -git fetch --depth=1 http://git.hiddenalpha.ch/bulk-ln.git master:master +git fetch --depth=99 http://git.hiddenalpha.ch/bulk-ln.git master:master +git fetch --depth=1 http://git.hiddenalpha.ch/bulk-ln.git --tags git checkout master lua src/bulk_ln.c ./bulk-ln --help diff --git a/src/bulk_ln.c b/src/bulk_ln.c index f3cda22..a954100 100644 --- a/src/bulk_ln.c +++ b/src/bulk_ln.c @@ -29,7 +29,7 @@ do \ && if test -z "$PROJECT_VERSION" ;then true \ && tag="$(git tag|grep -E '^v'|sed -E 's,^v,,'|sort -V|tail -n1)" \ - && cnt="$(git rev-list --count "v${tag:?}"..HEAD)" \ + && cnt="$(git rev-list --count "v${tag?}"..HEAD 2>/dev/null||true)" \ && hsh="$(git rev-parse --short HEAD)" \ && if test -n "$tag" -a -n "$cnt" -a -n "$hsh" ;then true \ && PROJECT_VERSION="${tag:?}-${cnt:?}-g${hsh:?}" \ |
