git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] fix git-parse-remote.sh for remotes that contain slashes

From
Stefan Naewe <stefan.naewe@gmail.com>
Date
Jan 14, 2011, 11:36 UTC
Message-ID
<1295005000-11562-1-git-send-email-stefan.naewe@gmail.com>
In-Reply-To
<20110114090645.GA13060@pengutronix.de>
Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
---
 git-parse-remote.sh |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 5f47b18..7cf204e 100644
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -7,8 +7,12 @@ GIT_DIR=$(git rev-parse -q --git-dir) || :;
 get_data_source () {
 	case "$1" in
 	*/*)
-		echo ''
-		;;
+		if test "$(git config --get "remote.$1.url")"
+		then
+			echo config
+		else
+			echo ''
+		fi ;;
 	.)
 		echo self
 		;;
-- 
1.7.3.5
Previous: Uwe Kleine-KönigNext: Junio C Hamano
Message 2 of 8 in “bug: request-pull broken when remote name contains a slash”
  1. Uwe Kleine-KönigJan 14, 2011
  2. fix git-parse-remote.sh for remotes that contain slashesStefan Naewe, Jan 14, 2011
  3. Junio C HamanoJan 14, 2011
  4. get_remote_url(): use the same data source as ls-remote to get remote urlsUwe Kleine-König, Feb 28, 2011
  5. Junio C HamanoFeb 28, 2011
  6. Uwe Kleine-KönigMar 1, 2011
  7. 1/2 get_remote_url(): use the same data source as ls-remote to get remote urlsUwe Kleine-König, Mar 1, 2011
  8. 2/2 git-request-pull: open-code the only invocation of get_remote_urlUwe Kleine-König, Mar 1, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.