git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add lsremote command.
@ 2005-04-17  5:36 Steven Cole
  2005-04-17 14:03 ` Petr Baudis
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Cole @ 2005-04-17  5:36 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

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


[-- Attachment #2: add-lsremote-command.diff --]
[-- Type: text/x-diff, Size: 1013 bytes --]

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.'

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-17 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-17  5:36 [PATCH] Add lsremote command Steven Cole
2005-04-17 14:03 ` Petr Baudis
2005-04-17 22:42   ` Steven Cole

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).