]> Nutra Git (v1) - gamesguru/git-remote-gcrypt.git/commitdiff
Fix iseq for null strings
authorroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
committerroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
git-remote-gcrypt

index 935218a995afbd712ef448ed3027c3de02e5f112..e421d8591c91561fc7c80a2d12ecf044b27733fe 100755 (executable)
@@ -39,9 +39,9 @@ echo_git() { xecho "$@" ; }  # Code clarity
 echo_info() { xecho "gcrypt:" "$@" >&2; }
 echo_die() { echo_info "$@" ; exit 1; }
 
-isnull() { case "${1}" in "") true;; *) false;; esac; }
+isnull() { case "$1" in "") return 0;; *) return 1;; esac; }
 isnonnull() { ! isnull "$1"; }
-iseq() { isnull "${1#"$2"}"; }
+iseq() { case "$1" in "$2") return 0;; *) return 1;; esac; }
 isnoteq() { ! iseq "$@"; }
 
 # Append $2 to $1 with a newline separator