mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Force /bin/echo in git section
Apple's version of bash version 3, when called as /bin/sh, uses an internal echo command which doesn't handle the "-n" argument and contaminates the git version string. /bin/echo correctly handles the -n argument. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20654 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
cef7c42d93
commit
db9ca59763
@ -69,12 +69,12 @@ if test -d "${real_gitdir}"
|
|||||||
then
|
then
|
||||||
githead=`git --git-dir "${real_gitdir}" log -1 --pretty=format:"%h" HEAD 2>/dev/null` # short hash only
|
githead=`git --git-dir "${real_gitdir}" log -1 --pretty=format:"%h" HEAD 2>/dev/null` # short hash only
|
||||||
if test $? = 0 ; then
|
if test $? = 0 ; then
|
||||||
echo -n $githead
|
/bin/echo -n $githead
|
||||||
# Add a "+" to the hash if there deleted or modified files (not excluded by .gitignore and friends)
|
# Add a "+" to the hash if there deleted or modified files (not excluded by .gitignore and friends)
|
||||||
# "Ignores" untracked files
|
# "Ignores" untracked files
|
||||||
# [ $(git --git-dir "${real_gitdir}" ls-files -dkm 2>/dev/null | wc -l) -gt 0 ] && echo -n "+"
|
# [ $(git --git-dir "${real_gitdir}" ls-files -dkm 2>/dev/null | wc -l) -gt 0 ] && /bin/echo -n "+"
|
||||||
# Includes untracked files
|
# Includes untracked files
|
||||||
[ $(git --git-dir "${real_gitdir}" ls-files -dkmo --exclude-standard 2>/dev/null | wc -l) -gt 0 ] && echo -n "+"
|
[ $(git --git-dir "${real_gitdir}" ls-files -dkmo --exclude-standard 2>/dev/null | wc -l) -gt 0 ] && /bin/echo -n "+"
|
||||||
echo
|
echo
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user