Skip to content

Commit

Permalink
commit id uses 7 first chars
Browse files Browse the repository at this point in the history
  • Loading branch information
alandefreitas committed May 3, 2023
1 parent 5195139 commit 72a4a19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libdoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fi

if command -v git >/dev/null && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
commit_id=$(git rev-parse HEAD)
commit_id=$(expr substr "$commit_id" $(expr length "$commit_id" - 7) 8)
commit_id=$(expr substr "$commit_id" 1 7)
else
commit_id=""
fi
Expand Down
2 changes: 1 addition & 1 deletion sitedoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fi

if command -v git >/dev/null && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
commit_id=$(git rev-parse HEAD)
commit_id=$(expr substr "$commit_id" $(expr length "$commit_id" - 7) 8)
commit_id=$(expr substr "$commit_id" 1 7)
else
commit_id=""
fi
Expand Down

0 comments on commit 72a4a19

Please sign in to comment.