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

[PATCH] Add lsremote command.

From
SCSteven Cole <elenstev@mesatop.com>
Date
Apr 17, 2005, 05:36 UTC
Message-ID
<200504162336.51937.elenstev@mesatop.com>

This is a fairly trivial addition, but if users are adding remote repositories with git addremote, then those users should be able to list out the remote list without having to know the details of where the remotes file is kept.

Steven
Adds lsremote command to list remotes.
Signed-Off-By: Steven Cole <elenstev@mesatop.com>
-------------

diff -urN git-pasky-orig/git git-pasky/git --- git-pasky-orig/git 2005-04-16 22:47:22.000000000 -0600 +++ git-pasky/git 2005-04-16 22:49:14.000000000 -0600

@@ -41,6 +41,7 @@
 	log
 	ls		[TREE_ID]
 	lsobj		[OBJTYPE]
+	lsremote
 	merge		-b BASE_ID FROM_ID
 	pull		[RNAME]
 	rm		FILE...
@@ -105,6 +106,7 @@
 "log")        gitlog.sh "$@";;
 "ls")         gitls.sh "$@";;
 "lsobj")      gitlsobj.sh "$@";;
+"lsremote")   gitlsremote.sh "$@";;
 "merge")      gitmerge.sh "$@";;
 "pull")       gitpull.sh "$@";;
 "rm")         gitrm.sh "$@";;
diff -urN git-pasky-orig/gitlsremote.sh git-pasky/gitlsremote.sh
--- git-pasky-orig/gitlsremote.sh	1969-12-31 17:00:00.000000000 -0700
+++ git-pasky/gitlsremote.sh	2005-04-16 22:58:15.000000000 -0600
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# ls remotes in GIT repository
+#
+[ -e .git/remotes ] && cat .git/remotes && exit 1
+
+echo 'List of remotes is empty. See git addremote.'
Next: Petr Baudis
Message 1 of 3 in “Add lsremote command.”
  1. Add lsremote command.Steven Cole, Apr 17, 2005
  2. Petr BaudisApr 17, 2005
  3. Steven ColeApr 17, 2005

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.