From 575b91914340270d2a857ac3ed75f0acd7d9e157 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 22 Jan 2013 09:24:36 +0200 Subject: Don't show errors from git fetch when using the git backend --- git-remote-gcrypt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git-remote-gcrypt') diff --git a/git-remote-gcrypt b/git-remote-gcrypt index b22503d..f35f9ba 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -92,7 +92,7 @@ gitception_get() # Take care to preserve FETCH_HEAD local ret_=: obj_id= f_head="$GIT_DIR/FETCH_HEAD" [ -e "$f_head" ] && command mv -f "$f_head" "$f_head.$$~" || : - git fetch -q -f "$1" "$Gref_rbranch:$Gref" 2>/dev/tty >/dev/null && + git fetch -q -f "$1" "$Gref_rbranch:$Gref" >/dev/null && obj_id="$(git ls-tree "$Gref" | xgrep -E '\b'"$2"'$' | awk '{print $3}')" && isnonnull "$obj_id" && git cat-file blob "$obj_id" && ret_=: || { ret_=false && : ; } @@ -147,7 +147,7 @@ gitception_new_repo() local empty_tree=4b825dc642cb6eb9a060e54bf8d69288fbee4904 # get any file to update Gref, and if it's not updated we create empty git update-ref -d "$Gref" || : - gitception_get "$1" "x" || : + gitception_get "$1" "x" 2>/dev/null >&2 || : git rev-parse -q --verify "$Gref" >/dev/null && return 0 || commit_id=$(anon_commit "$empty_tree") && git update-ref "$Gref" "$commit_id" -- cgit v1.2.3