瀏覽代碼

Port get_version fix from mkit

Alois Mahdal 10 年之前
父節點
當前提交
b8bd367451
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      setup/mk.sh

+ 1
- 1
setup/mk.sh 查看文件

@@ -203,7 +203,7 @@ get_version() {
203 203
         local lasttag=$(git tag | grep ^v | sort -V | tail -n1)
204 204
         if ! git describe --tags --exact-match HEAD >&/dev/null;
205 205
         then    # we are not at later commit than the last tag
206
-            local sha=g$(git describe --always HEAD)
206
+            local sha=g$(git log -1 --pretty=format:%h HEAD)
207 207
         fi
208 208
         if test "$(git diff --shortstat 2>/dev/null)" != "";
209 209
         then    # thr tree is "dirty", i.e. has been edited