Skip to content

Commit 72a4a19

Browse files
committed
commit id uses 7 first chars
1 parent 5195139 commit 72a4a19

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libdoc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fi
5757

5858
if command -v git >/dev/null && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
5959
commit_id=$(git rev-parse HEAD)
60-
commit_id=$(expr substr "$commit_id" $(expr length "$commit_id" - 7) 8)
60+
commit_id=$(expr substr "$commit_id" 1 7)
6161
else
6262
commit_id=""
6363
fi

sitedoc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fi
5252

5353
if command -v git >/dev/null && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
5454
commit_id=$(git rev-parse HEAD)
55-
commit_id=$(expr substr "$commit_id" $(expr length "$commit_id" - 7) 8)
55+
commit_id=$(expr substr "$commit_id" 1 7)
5656
else
5757
commit_id=""
5858
fi

0 commit comments

Comments
 (0)