proj/gagit:main commit in: /

Michał Górny <[email protected]> Wed, 05 Aug 2026 11:34:22 +0000 (UTC)
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1785928523.fcc8870b2c231ebc1ad4d3d032dae3cd2756e4c3.mgorny@gentoo>
commit:     fcc8870b2c231ebc1ad4d3d032dae3cd2756e4c3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  5 11:15:23 2026 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Aug  5 11:15:23 2026 +0000
URL:        https://gitweb.gentoo.org/proj/gagit.git/commit/?id=fcc8870b

Silence errors from 'git remote' calls

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 gagit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gagit b/gagit
index e750b29..fecf812 100755
--- a/gagit
+++ b/gagit
@@ -51,7 +51,7 @@ find_remote() {
 	mapfile -t remotes < <(git remote)
 	# prefer [codeberg, upstream, origin], fall back to all branches
 	for r in codeberg upstream origin "${remotes[@]}"; do
-		url=$(git remote get-url "${r}")
+		url=$(git remote get-url "${r}" 2>/dev/null)
 		case ${url} in
 			*ssh://[email protected]/*|[email protected]:*)
 				echo "${r}"