git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Cole <elenstev@mesatop.com>
To: Petr Baudis <pasky@ucw.cz>
Cc: git@vger.kernel.org
Subject: Re: Add lsremote command.
Date: Sun, 17 Apr 2005 16:42:56 -0600	[thread overview]
Message-ID: <200504171642.56686.elenstev@mesatop.com> (raw)
In-Reply-To: <20050417140309.GF1487@pasky.ji.cz>

On Sunday 17 April 2005 08:03 am, Petr Baudis wrote:
> Dear diary, on Sun, Apr 17, 2005 at 07:36:51AM CEST, I got a letter
> where Steven Cole <elenstev@mesatop.com> told me that...
> > 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.
> 
> Could you please send your patches inline? (Either in the body or with
> correct content-disposition header.)
> 
> You got the return values other way around and you are missing a
> copyright notice at the top; you should also mention that you take no
> parameters.
> 
> Please use -s instead of -e, since it is more appropriate in this case.
> Also, you should report the "no remotes" message to stderr. And always
> exit when you found that .git/remotes exists, not only if cat succeeds.
> 
> Kind regards,
> 
Thanks for the fixes.  Here's a better version.
Steven

 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.

Signed-off-by: Steven Cole <elenstev@mesatop.com>

diff -urN git-pasky.orig/git git-pasky/git
--- git-pasky.orig/git	2005-04-17 15:02:37.000000000 -0600
+++ git-pasky/git	2005-04-17 15:04:23.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-17 16:20:48.000000000 -0600
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Lists remote GIT repositories
+# Copyright (c) Steven Cole 2005
+#
+# Takes no parameters
+#
+[ -s .git/remotes ] && cat .git/remotes
+[ -s .git/remotes ] && exit
+
+echo "List of remotes is empty. See git addremote." >&2


      reply	other threads:[~2005-04-17 22:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200504171642.56686.elenstev@mesatop.com \
    --to=elenstev@mesatop.com \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).