newvers.sh: avoid bare git invocation
git may not be in the path, and $git_cmd includes some commandline arguments. Reported by: mjg Tested by: mjg
This commit is contained in:
parent
0c864213ef
commit
9e98065cf1
@ -252,7 +252,7 @@ fi
|
||||
|
||||
if [ -n "$git_cmd" ] ; then
|
||||
git=$($git_cmd rev-parse --verify --short HEAD 2>/dev/null)
|
||||
if [ "$(git rev-parse --is-shallow-repository)" = false ] ; then
|
||||
if [ "$($git_cmd rev-parse --is-shallow-repository)" = false ] ; then
|
||||
git_cnt=$($git_cmd rev-list --count HEAD 2>/dev/null)
|
||||
if [ -n "$git_cnt" ] ; then
|
||||
git="c${git_cnt}-g${git}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user