From 1a7e58db58d326ecddddd36ef465e7ff7e2484e3 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 14 Feb 2013 00:00:00 +0000 Subject: [PATCH] Write gitception_get in a simpler way --- git-remote-gcrypt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/git-remote-gcrypt b/git-remote-gcrypt index 8a1ac71..077e420 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -43,10 +43,10 @@ gitception_get() local RETVAL FHEAD="$GIT_DIR/FETCH_HEAD" [ -e "$FHEAD" ] && command mv -f "$FHEAD" "$FHEAD.$$~" || : - git fetch -q -f "$1" HEAD:"$GREF" 2>/dev/tty >/dev/null && \ - OBJID=$(git ls-tree "$GREF" | xgrep -E "\b$2$" | - awk '{print $3}') && [ -n "$OBJID" ] && \ - git cat-file blob "$OBJID" && RETVAL=: || \ + git fetch -q -f "$1" HEAD:"$GREF" 2>/dev/tty >/dev/null && + OBJID="$(git ls-tree "$GREF" | + xgrep -E "\b$2$" | awk '{print $3}')" && + [ -n "$OBJID" ] && git cat-file blob "$OBJID" && RETVAL=: || { RETVAL=false && : ; } [ -e "$FHEAD.$$~" ] && command mv -f "$FHEAD.$$~" "$FHEAD" || : $RETVAL