diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-12-10 01:37:50 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-12-10 01:37:50 +0100 |
commit | e020e55a62dc3281504858d4091847d18ca63b2d (patch) | |
tree | 3f3dbb2e826774665a6ea381a82eb4c20a791e3e /GIT-VERSION-GEN | |
parent | Merge branch 'ss/format-patch-use-encode-headers-for-cover-letter' (diff) | |
parent | Makefile: stop using `test -o` when unlinking duplicate executables (diff) | |
download | git-e020e55a62dc3281504858d4091847d18ca63b2d.tar.xz git-e020e55a62dc3281504858d4091847d18ca63b2d.zip |
Merge branch 'ps/ban-a-or-o-operator-with-test'
Test and shell scripts clean-up.
* ps/ban-a-or-o-operator-with-test:
Makefile: stop using `test -o` when unlinking duplicate executables
contrib/subtree: convert subtree type check to use case statement
contrib/subtree: stop using `-o` to test for number of args
global: convert trivial usages of `test <expr> -a/-o <expr>`
Diffstat (limited to 'GIT-VERSION-GEN')
-rwxr-xr-x | GIT-VERSION-GEN | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index bc3e656eb8..a9c8193a75 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -11,7 +11,7 @@ LF=' if test -f version then VN=$(cat version) || VN="$DEF_VER" -elif test -d ${GIT_DIR:-.git} -o -f .git && +elif { test -d "${GIT_DIR:-.git}" || test -f .git; } && VN=$(git describe --match "v[0-9]*" HEAD 2>/dev/null) && case "$VN" in *$LF*) (exit 1) ;; |