Date: Thu, 21 Jan 2021 15:03:55 GMT From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 9e98065cf17d - main - newvers.sh: avoid bare git invocation Message-ID: <202101211503.10LF3tK6021706@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9e98065cf17d0e4831928a5acbd7bc75a351c7f6 commit 9e98065cf17d0e4831928a5acbd7bc75a351c7f6 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2021-01-21 15:00:20 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2021-01-21 15:03:39 +0000 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 --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 92c275d19fb9..7d2ac14223b6 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -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}"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101211503.10LF3tK6021706>