{"thread":{"id":"7292","subject":"[PATCH] Allow 'git-remote fetch' as a synonym for 'git fetch'","startedAt":"2007-03-18T09:47:21Z","lastAt":"2007-03-18T10:03:45Z","messageCount":2,"participants":["Sam Vilain"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37364","messageId":"20070318094910.7985613A382@magnus.utsl.gen.nz","threadId":"7292","inReplyTo":null,"subject":"[PATCH] Allow 'git-remote fetch' as a synonym for 'git fetch'","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2007-03-18T09:47:21Z","receivedAt":"2007-03-18T09:47:21Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"I found myself typing this when doing remote-like things.  Perhaps\nother people will find this useful.\n\nSigned-off-by: Sam Vilain <sam@vilain.net>\n---\n git-remote.perl |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/git-remote.perl b/git-remote.perl\nindex c56c5a8..305f2e3 100755\n--- a/git-remote.perl\n+++ b/git-remote.perl\n@@ -355,10 +355,14 @@ elsif ($ARGV[0] eq 'add') {\n \t}\n \tadd_remote($ARGV[1], $ARGV[2], \\%opts);\n }\n+elsif ($ARGV[0] eq 'fetch') {\n+\texec(\"git-fetch\", @ARGV[1..$#ARGV]);\n+}\n else {\n \tprint STDERR \"Usage: git remote\\n\";\n \tprint STDERR \"       git remote add <name> <url>\\n\";\n \tprint STDERR \"       git remote show <name>\\n\";\n \tprint STDERR \"       git remote prune <name>\\n\";\n+\tprint STDERR \"       git remote fetch <fetch-options> <repository> <refspec>...\\n\";\n \texit(1);\n }\n-- \n1.5.0.2.gdcde2\n"},{"id":"37366","messageId":"20070318101311.E296213A382@magnus.utsl.gen.nz","threadId":"7292","inReplyTo":"20070318094910.7985613A382@magnus.utsl.gen.nz","subject":"Re: [PATCH] git-remote: allow 'git-remote fetch' as a synonym for 'git fetch'","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2007-03-18T10:03:45Z","receivedAt":"2007-03-18T10:03:45Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"And here it is again, this time with documentation and based against\nmaint.\n\nFrom: Sam Vilain <sam@vilain.net>\nSubject: git-remote: allow 'git-remote fetch' as a synonym for 'git fetch'\n\nI found myself typing this when doing remote-like things.  Perhaps\nother people will find this useful\n\nSigned-off-by: Sam Vilain <sam@vilain.net>\n---\n Documentation/git-remote.txt |    4 ++++\n git-remote.perl              |    4 ++++\n 2 files changed, 8 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt\nindex de2658c..ab04b86 100644\n--- a/Documentation/git-remote.txt\n+++ b/Documentation/git-remote.txt\n@@ -64,6 +64,10 @@ With `-n` option, the remote heads are not confirmed first with `git\n ls-remote <name>`; cached information is used instead.  Use with\n caution.\n \n+'fetch'::\n+\n+Synonym for `git fetch <name>`, and accepts all the same options.\n+\n 'update'::\n \n Fetch updates for a named set of remotes in the repository as defined by\ndiff --git a/git-remote.perl b/git-remote.perl\nindex bd70bf1..20f9f54 100755\n--- a/git-remote.perl\n+++ b/git-remote.perl\n@@ -389,11 +389,15 @@ elsif ($ARGV[0] eq 'add') {\n \t}\n \tadd_remote($ARGV[1], $ARGV[2], \\%opts);\n }\n+elsif ($ARGV[0] eq 'fetch') {\n+\texec(\"git-fetch\", @ARGV[1..$#ARGV]);\n+}\n else {\n \tprint STDERR \"Usage: git remote\\n\";\n \tprint STDERR \"       git remote add <name> <url>\\n\";\n \tprint STDERR \"       git remote show <name>\\n\";\n \tprint STDERR \"       git remote prune <name>\\n\";\n \tprint STDERR \"       git remote update [group]\\n\";\n+\tprint STDERR \"       git remote fetch <fetch-options> <repository> <refspec>...\\n\";\n \texit(1);\n }\n-- \n1.5.0.2.gdcde2\n"}]}