From: root Date: Thu, 14 Feb 2013 00:00:00 +0000 (+0000) Subject: Write gitception_get in a simpler way X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=1a7e58db58d326ecddddd36ef465e7ff7e2484e3;p=gamesguru%2Fgit-remote-gcrypt.git Write gitception_get in a simpler way --- 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