mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
Bugfix: Only use git for build info if the repository is actually the right one
Also adds ability to disable check with BITCOIN_GENBUILD_NO_GIT=1 in the environment
This commit is contained in:
@@ -16,7 +16,7 @@ fi
|
||||
DESC=""
|
||||
SUFFIX=""
|
||||
LAST_COMMIT_DATE=""
|
||||
if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then
|
||||
if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" -a -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" -a "$(git status --porcelain -u no --ignored "$0" | cut -b1)" != "?" ]; then
|
||||
# clean 'dirty' status of touched files that haven't been modified
|
||||
git diff >/dev/null 2>/dev/null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user