t3404 static check of bad SHA-1 failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

in t3404 test 91 - static check of bad SHA-1 fails (with ksh) with a
syntax error in git-rebase.
git-rebase[6]: test: argument expected

Reason is, again, a test -z without quotes in git-rebase--interactive:
*** ../git-rebase--interactive.orig     Tue May 10 17:36:59 2016
--- ../git-rebase--interactive  Fri May 13 17:57:27 2016
***************
*** 870,876 ****
                badsha=1
        else
                sha1_verif="$(git rev-parse --verify --quiet $1^{commit})"
!               if test -z $sha1_verif
                then
                        badsha=1
                fi
--- 870,876 ----
                badsha=1
        else
                sha1_verif="$(git rev-parse --verify --quiet $1^{commit})"
!               if test -z "$sha1_verif"
                then
                        badsha=1
                fi

Maybe it would be a good idea, to quote the test -z $1 in the same
function check_commit_sha too.
The test completes successfully without it, but since it's an user
option, I think it should be quoted.
Then there would be no more unquoted test -z anymore :-)

Armin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]