aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@localhost>2013-02-14 00:00:00 +0000
committerroot <root@localhost>2013-02-14 00:00:00 +0000
commitfc6d0b6e7152b54b32bee447b4e0773ec1d3d4df (patch)
tree34cb85a4c8cb0495a82b9b191ab3b184a65cd1a2
parentbb0f05e03ad58aca0726d77015f64edfa9cc1639 (diff)
downloadgit-remote-gcrypt-fc6d0b6e7152b54b32bee447b4e0773ec1d3d4df.zip
git-remote-gcrypt-fc6d0b6e7152b54b32bee447b4e0773ec1d3d4df.tar.gz
git-remote-gcrypt-fc6d0b6e7152b54b32bee447b4e0773ec1d3d4df.tar.bz2
Fix iseq for null strings
-rwxr-xr-xgit-remote-gcrypt4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-remote-gcrypt b/git-remote-gcrypt
index 935218a..e421d85 100755
--- a/git-remote-gcrypt
+++ b/git-remote-gcrypt
@@ -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