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 1883715800D for ; Sat, 31 Dec 2022 14:11:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5AB1BE0824; Sat, 31 Dec 2022 14:11:34 +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 3A9BDE0824 for ; Sat, 31 Dec 2022 14:11:34 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 28A01335D74 for ; Sat, 31 Dec 2022 14:11:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7D2156F2 for ; Sat, 31 Dec 2022 14:11:31 +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: <1672495883.16246ea32371ff70c8941756af75ddefb8c97f4e.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: 16246ea32371ff70c8941756af75ddefb8c97f4e X-VCS-Branch: master Date: Sat, 31 Dec 2022 14:11:31 +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: f0b54181-1106-4afc-9afd-f5aa499aa00d X-Archives-Hash: b82360d21ef06ca57f3758bf1a0288b7 commit: 16246ea32371ff70c8941756af75ddefb8c97f4e Author: Florian Schmaus gentoo org> AuthorDate: Sat Dec 31 10:29:02 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sat Dec 31 14:11:23 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=16246ea3 git.py: fix "is-shallow-repository" check by stripping \n The output of git commands has a trailing newline character which we usually strip. Fixes: da8e7d193563a2b0c88a523083b2a3466ff4526e ("sync: git: only perform shallow updates if the repository is shallow") Signed-off-by: Florian Schmaus gentoo.org> Closes: https://github.com/gentoo/portage/pull/968 Signed-off-by: Sam James gentoo.org> NEWS | 2 ++ lib/portage/sync/modules/git/git.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 088ab5f15..3dda33ea1 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ Bug fixes: Whirlpool is considered deprecated within Portage and we recommend that repository maintainers remove it from `metadata/layout.conf`! +* Fix "is shallow git repository" check. + portage-3.0.42 (2022-12-26) -------------- diff --git a/lib/portage/sync/modules/git/git.py b/lib/portage/sync/modules/git/git.py index fe8a2c995..88f19cccf 100644 --- a/lib/portage/sync/modules/git/git.py +++ b/lib/portage/sync/modules/git/git.py @@ -237,7 +237,7 @@ class GitSync(NewBase): is_shallow_cmd, cwd=portage._unicode_encode(self.repo.location), ) - ) + ).rstrip("\n") if is_shallow_res == "false": sync_depth = 0 else: