{"thread":{"id":"1596","subject":"[PATCH] Make git pull default to origin","startedAt":"2005-08-19T22:14:45Z","lastAt":"2005-08-19T22:14:45Z","messageCount":1,"participants":["Amos Waterland"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"7578","messageId":"20050819221445.GA97789@rossby.metr.ou.edu","threadId":"1596","inReplyTo":null,"subject":"[PATCH] Make git pull default to origin","fromName":"Amos Waterland","fromEmail":"apw@rossby.metr.ou.edu","sentAt":"2005-08-19T22:14:45Z","receivedAt":"2005-08-19T22:14:45Z","isPatch":true,"sender":{"key":"apw@debian.org","avatar":null},"body":"Currently, typing `git pull' without a third argument will result in an\nerror message.  Make it default to orgin, which is what the user\ntypically means.\n\nSigned-off-by: Amos Waterland <apw@rossby.metr.ou.edu>\n\n---\n\n git-pull-script |   11 +++++++++--\n 1 files changed, 9 insertions(+), 2 deletions(-)\n\nde9b7753b008a1dc1bdd46f87c76ee3cd9a81d19\ndiff --git a/git-pull-script b/git-pull-script\n--- a/git-pull-script\n+++ b/git-pull-script\n@@ -1,10 +1,17 @@\n #!/bin/sh\n #\n . git-sh-setup-script || die \"Not a git archive\"\n-. git-parse-remote \"$@\"\n+\n+if [ $# -eq 0 ]; then\n+    remote=\"origin\"\n+else\n+    remote=\"$@\"\n+fi\n+\n+. git-parse-remote \"$remote\"\n merge_name=\"$_remote_name\"\n \n-git-fetch-script \"$@\" || exit 1\n+git-fetch-script \"$remote\" || exit 1\n \n git-resolve-script \\\n \t\"$(cat \"$GIT_DIR\"/HEAD)\" \\\n"}]}