From da65f512a7e85293381b991ebb4c0417ac23fac6 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 14 Feb 2013 00:00:00 +0000 Subject: [PATCH] Simplify isnull to use case --- git-remote-gcrypt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 "$@"; }