public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] git sync: silence 'git rev-parse' errors
@ 2015-01-17 12:28 Michał Górny
  2015-01-17 22:07 ` Zac Medico
  0 siblings, 1 reply; 6+ messages in thread
From: Michał Górny @ 2015-01-17 12:28 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-18 16:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-17 12:28 [gentoo-portage-dev] [PATCH] git sync: silence 'git rev-parse' errors Michał Górny
2015-01-17 22:07 ` Zac Medico
2015-01-18  0:31   ` Michał Górny
2015-01-18  0:52     ` Zac Medico
2015-01-18 10:34   ` [gentoo-portage-dev] [PATCH v2] git sync: replace 'git rev-parse' with safer '.git' check Michał Górny
2015-01-18 16:48     ` Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox