From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CE8F1138A1A for ; Sat, 17 Jan 2015 12:29:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A2582E0943; Sat, 17 Jan 2015 12:28:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3E112E0942 for ; Sat, 17 Jan 2015 12:28:59 +0000 (UTC) Received: from pomiot.lan (mgorny-1-pt.tunnel.tserv28.waw1.ipv6.he.net [IPv6:2001:470:70:353::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 955E53406BA; Sat, 17 Jan 2015 12:28:57 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-portage-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-portage-dev] [PATCH] git sync: silence 'git rev-parse' errors Date: Sat, 17 Jan 2015 13:28:52 +0100 Message-Id: <1421497732-15029-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.2.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 21626c15-c2db-4eca-a69c-891c493e41ba X-Archives-Hash: 63d163fd3563bd22bca7c17248b02340 Discard the git-rev-parse error output to avoid 'fatal: Not a git repository [...]' errors when checking whether the repository exists. --- pym/portage/sync/modules/git/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/portage/sync/modules/git/git.py b/pym/portage/sync/modules/git/git.py index b97d501..02da037 100644 --- a/pym/portage/sync/modules/git/git.py +++ b/pym/portage/sync/modules/git/git.py @@ -36,7 +36,7 @@ class GitSync(SyncBase): if not os.path.exists(self.repo.location): return False - exitcode = portage.process.spawn_bash("cd %s ; git rev-parse" %\ + exitcode = portage.process.spawn_bash("cd %s ; git rev-parse 2>/dev/null" %\ (portage._shell_quote(self.repo.location),), **portage._native_kwargs(self.spawn_kwargs)) if exitcode == 128: -- 2.2.1