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

[PATCH] Make git pull default to origin

From
AWAmos Waterland <apw@rossby.metr.ou.edu>
Date
Aug 19, 2005, 22:14 UTC
Message-ID
<20050819221445.GA97789@rossby.metr.ou.edu>

Currently, typing `git pull' without a third argument will result in an error message. Make it default to orgin, which is what the user typically means.

Signed-off-by: Amos Waterland <apw@rossby.metr.ou.edu>
---
 git-pull-script |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
de9b7753b008a1dc1bdd46f87c76ee3cd9a81d19
diff --git a/git-pull-script b/git-pull-script
--- a/git-pull-script
+++ b/git-pull-script
@@ -1,10 +1,17 @@
 #!/bin/sh
 #
 . git-sh-setup-script || die "Not a git archive"
-. git-parse-remote "$@"
+
+if [ $# -eq 0 ]; then
+    remote="origin"
+else
+    remote="$@"
+fi
+
+. git-parse-remote "$remote"
 merge_name="$_remote_name"
 
-git-fetch-script "$@" || exit 1
+git-fetch-script "$remote" || exit 1
 
 git-resolve-script \
 	"$(cat "$GIT_DIR"/HEAD)" \
Message 1 of 1 in “Make git pull default to origin”
  1. Make git pull default to originAmos Waterland, Aug 19, 2005

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.