{"thread":{"id":"71","subject":"[PATCH] Add lsremote command.","startedAt":"2005-04-17T05:36:51Z","lastAt":"2005-04-17T22:42:56Z","messageCount":3,"participants":["Steven Cole","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"445","messageId":"200504162336.51937.elenstev@mesatop.com","threadId":"71","inReplyTo":null,"subject":"[PATCH] Add lsremote command.","fromName":"Steven Cole","fromEmail":"elenstev@mesatop.com","sentAt":"2005-04-17T05:36:51Z","receivedAt":"2005-04-17T05:36:51Z","isPatch":true,"sender":{"key":"elenstev@mesatop.com","avatar":null},"body":"This is a fairly trivial addition, but if users are adding remote repositories\nwith git addremote, then those users should be able to list out the remote\nlist without having to know the details of where the remotes file is kept.\n\nSteven\n\n\n\nAdds lsremote command to list remotes.\n\nSigned-Off-By: Steven Cole <elenstev@mesatop.com>\n\n-------------\n\ndiff -urN git-pasky-orig/git git-pasky/git\n--- git-pasky-orig/git\t2005-04-16 22:47:22.000000000 -0600\n+++ git-pasky/git\t2005-04-16 22:49:14.000000000 -0600\n@@ -41,6 +41,7 @@\n \tlog\n \tls\t\t[TREE_ID]\n \tlsobj\t\t[OBJTYPE]\n+\tlsremote\n \tmerge\t\t-b BASE_ID FROM_ID\n \tpull\t\t[RNAME]\n \trm\t\tFILE...\n@@ -105,6 +106,7 @@\n \"log\")        gitlog.sh \"$@\";;\n \"ls\")         gitls.sh \"$@\";;\n \"lsobj\")      gitlsobj.sh \"$@\";;\n+\"lsremote\")   gitlsremote.sh \"$@\";;\n \"merge\")      gitmerge.sh \"$@\";;\n \"pull\")       gitpull.sh \"$@\";;\n \"rm\")         gitrm.sh \"$@\";;\ndiff -urN git-pasky-orig/gitlsremote.sh git-pasky/gitlsremote.sh\n--- git-pasky-orig/gitlsremote.sh\t1969-12-31 17:00:00.000000000 -0700\n+++ git-pasky/gitlsremote.sh\t2005-04-16 22:58:15.000000000 -0600\n@@ -0,0 +1,7 @@\n+#!/bin/sh\n+#\n+# ls remotes in GIT repository\n+#\n+[ -e .git/remotes ] && cat .git/remotes && exit 1\n+\n+echo 'List of remotes is empty. See git addremote.'\n"},{"id":"472","messageId":"20050417140309.GF1487@pasky.ji.cz","threadId":"71","inReplyTo":"200504162336.51937.elenstev@mesatop.com","subject":"Re: Add lsremote command.","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-04-17T14:03:09Z","receivedAt":"2005-04-17T14:03:09Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sun, Apr 17, 2005 at 07:36:51AM CEST, I got a letter\nwhere Steven Cole <elenstev@mesatop.com> told me that...\n> This is a fairly trivial addition, but if users are adding remote repositories\n> with git addremote, then those users should be able to list out the remote\n> list without having to know the details of where the remotes file is kept.\n\nCould you please send your patches inline? (Either in the body or with\ncorrect content-disposition header.)\n\nYou got the return values other way around and you are missing a\ncopyright notice at the top; you should also mention that you take no\nparameters.\n\nPlease use -s instead of -e, since it is more appropriate in this case.\nAlso, you should report the \"no remotes\" message to stderr. And always\nexit when you found that .git/remotes exists, not only if cat succeeds.\n\nKind regards,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"561","messageId":"200504171642.56686.elenstev@mesatop.com","threadId":"71","inReplyTo":"20050417140309.GF1487@pasky.ji.cz","subject":"Re: Add lsremote command.","fromName":"Steven Cole","fromEmail":"elenstev@mesatop.com","sentAt":"2005-04-17T22:42:56Z","receivedAt":"2005-04-17T22:42:56Z","isPatch":false,"sender":{"key":"elenstev@mesatop.com","avatar":null},"body":"On Sunday 17 April 2005 08:03 am, Petr Baudis wrote:\n> Dear diary, on Sun, Apr 17, 2005 at 07:36:51AM CEST, I got a letter\n> where Steven Cole <elenstev@mesatop.com> told me that...\n> > This is a fairly trivial addition, but if users are adding remote repositories\n> > with git addremote, then those users should be able to list out the remote\n> > list without having to know the details of where the remotes file is kept.\n> \n> Could you please send your patches inline? (Either in the body or with\n> correct content-disposition header.)\n> \n> You got the return values other way around and you are missing a\n> copyright notice at the top; you should also mention that you take no\n> parameters.\n> \n> Please use -s instead of -e, since it is more appropriate in this case.\n> Also, you should report the \"no remotes\" message to stderr. And always\n> exit when you found that .git/remotes exists, not only if cat succeeds.\n> \n> Kind regards,\n> \nThanks for the fixes.  Here's a better version.\nSteven\n\n This is a fairly trivial addition, but if users are adding remote repositories\n with git addremote, then those users should be able to list out the remote\n list without having to know the details of where the remotes file is kept.\n\nSigned-off-by: Steven Cole <elenstev@mesatop.com>\n\ndiff -urN git-pasky.orig/git git-pasky/git\n--- git-pasky.orig/git\t2005-04-17 15:02:37.000000000 -0600\n+++ git-pasky/git\t2005-04-17 15:04:23.000000000 -0600\n@@ -41,6 +41,7 @@\n \tlog\n \tls\t\t[TREE_ID]\n \tlsobj\t\t[OBJTYPE]\n+\tlsremote\n \tmerge\t\t-b BASE_ID FROM_ID\n \tpull\t\t[RNAME]\n \trm\t\tFILE...\n@@ -105,6 +106,7 @@\n \"log\")        gitlog.sh \"$@\";;\n \"ls\")         gitls.sh \"$@\";;\n \"lsobj\")      gitlsobj.sh \"$@\";;\n+\"lsremote\")   gitlsremote.sh \"$@\";;\n \"merge\")      gitmerge.sh \"$@\";;\n \"pull\")       gitpull.sh \"$@\";;\n \"rm\")         gitrm.sh \"$@\";;\ndiff -urN git-pasky.orig/gitlsremote.sh git-pasky/gitlsremote.sh\n--- git-pasky.orig/gitlsremote.sh\t1969-12-31 17:00:00.000000000 -0700\n+++ git-pasky/gitlsremote.sh\t2005-04-17 16:20:48.000000000 -0600\n@@ -0,0 +1,11 @@\n+#!/bin/sh\n+#\n+# Lists remote GIT repositories\n+# Copyright (c) Steven Cole 2005\n+#\n+# Takes no parameters\n+#\n+[ -s .git/remotes ] && cat .git/remotes\n+[ -s .git/remotes ] && exit\n+\n+echo \"List of remotes is empty. See git addremote.\" >&2\n\n"}]}