aboutsummaryrefslogtreecommitdiffhomepage
path: root/git-remote-gcrypt
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
commitda65f512a7e85293381b991ebb4c0417ac23fac6 (patch)
tree5d311b387b41ccb84925349dab7291d62251b400 /git-remote-gcrypt
parentd6df0f14539152896eec981c8decdd4f02dba09c (diff)
downloadgit-remote-gcrypt-da65f512a7e85293381b991ebb4c0417ac23fac6.tar.gz
Simplify isnull to use case
Diffstat (limited to 'git-remote-gcrypt')
-rwxr-xr-xgit-remote-gcrypt2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-remote-gcrypt b/git-remote-gcrypt
index 7d504f9..6f6a009 100755
--- a/git-remote-gcrypt
+++ b/git-remote-gcrypt
@@ -29,7 +29,7 @@ echo_git() { xecho "$@" ; } # Code clarity
echo_info() { xecho "gcrypt:" "$@" >&2; }
echo_die() { echo_info "$@" ; exit 1; }
-isnull() { [ 0 = "${#1}" ]; }
+isnull() { case "${1}" in "") true;; *) false;; esac; }
isnonnull() { ! isnull "$1"; }
iseq() { isnull "${1#"$2"}"; }
isnoteq() { ! iseq "$@"; }