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
commit1a7e58db58d326ecddddd36ef465e7ff7e2484e3 (patch)
tree937da31587a1e7ffadd4631582cb76b587e5ecac /git-remote-gcrypt
parent903e9a5bbc9f0be3567efb45b5390d16ed215547 (diff)
downloadgit-remote-gcrypt-1a7e58db58d326ecddddd36ef465e7ff7e2484e3.tar.gz
Write gitception_get in a simpler way
Diffstat (limited to 'git-remote-gcrypt')
-rwxr-xr-xgit-remote-gcrypt8
1 files 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