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

[PATCH] Allow 'git-remote fetch' as a synonym for 'git fetch'

From
Sam Vilain <sam@vilain.net>
Date
Mar 18, 2007, 09:47 UTC
Message-ID
<20070318094910.7985613A382@magnus.utsl.gen.nz>

I found myself typing this when doing remote-like things. Perhaps other people will find this useful.

Signed-off-by: Sam Vilain <sam@vilain.net>
---
 git-remote.perl |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/git-remote.perl b/git-remote.perl
index c56c5a8..305f2e3 100755
--- a/git-remote.perl
+++ b/git-remote.perl
@@ -355,10 +355,14 @@ elsif ($ARGV[0] eq 'add') {
 	}
 	add_remote($ARGV[1], $ARGV[2], \%opts);
 }
+elsif ($ARGV[0] eq 'fetch') {
+	exec("git-fetch", @ARGV[1..$#ARGV]);
+}
 else {
 	print STDERR "Usage: git remote\n";
 	print STDERR "       git remote add <name> <url>\n";
 	print STDERR "       git remote show <name>\n";
 	print STDERR "       git remote prune <name>\n";
+	print STDERR "       git remote fetch <fetch-options> <repository> <refspec>...\n";
 	exit(1);
 }
-- 
1.5.0.2.gdcde2
Next: Sam Vilain
Message 1 of 2 in “Allow 'git-remote fetch' as a synonym for 'git fetch'”
  1. Allow 'git-remote fetch' as a synonym for 'git fetch'Sam Vilain, Mar 18, 2007
  2. Sam VilainMar 18, 2007

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.