From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A8DF6158021 for ; Fri, 21 Oct 2022 02:34:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA156E07FE; Fri, 21 Oct 2022 02:34:24 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AE300E07FE for ; Fri, 21 Oct 2022 02:34:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 743F4340CC0 for ; Fri, 21 Oct 2022 02:34:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EDA4F617 for ; Fri, 21 Oct 2022 02:34:21 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1666308979.f101272f139e1494dcef90554bbc24db5f66d401.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/sync/modules/git/, / X-VCS-Repository: proj/portage X-VCS-Files: NEWS lib/portage/sync/modules/git/git.py X-VCS-Directories: / lib/portage/sync/modules/git/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f101272f139e1494dcef90554bbc24db5f66d401 X-VCS-Branch: master Date: Fri, 21 Oct 2022 02:34:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c5bd6cda-dddf-4576-9817-631b7b84fae0 X-Archives-Hash: eb832596301550e64b99bf535dc28a6b commit: f101272f139e1494dcef90554bbc24db5f66d401 Author: Philipp Rösner protonmail com> AuthorDate: Tue Oct 18 20:40:03 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Oct 20 23:36:19 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f101272f sync: git: Fix sync printing local repo path In the add_safe_directory method in the git sync module the subprocess calling 'git config --get safe.directory ' prints the path to the local repo. Directing the subprocess output to DEVNULL fixes the issue. Bug: https://bugs.gentoo.org/875812 Signed-off-by: Philipp Rösner protonmail.com> Closes: https://github.com/gentoo/portage/pull/924 Signed-off-by: Sam James gentoo.org> NEWS | 2 ++ lib/portage/sync/modules/git/git.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 3e2a5a2d6..39c94efac 100644 --- a/NEWS +++ b/NEWS @@ -36,6 +36,8 @@ Bug fixes: * emerge(1), make.conf(5), xpak(5): document BINPKG_FORMAT and the gpkg binary packate format further. +* sync: git: Fix sync printing local repo path (bug #875812) + portage-3.0.38.1 (2022-10-04) -------------- diff --git a/lib/portage/sync/modules/git/git.py b/lib/portage/sync/modules/git/git.py index 31ce5febf..b4c470160 100644 --- a/lib/portage/sync/modules/git/git.py +++ b/lib/portage/sync/modules/git/git.py @@ -362,7 +362,8 @@ class GitSync(NewBase): "--get", "safe.directory", f"^{location_escaped}$", - ] + ], + stdout=subprocess.DEVNULL, ) if result.returncode == 1: result = subprocess.run( @@ -373,6 +374,7 @@ class GitSync(NewBase): "--add", "safe.directory", self.repo.location, - ] + ], + stdout=subprocess.DEVNULL, ) return result.returncode == 0