From: Amos Waterland <apw@rossby.metr.ou.edu>
To: junkio@cox.net
Cc: git@vger.kernel.org
Subject: [PATCH] Make git pull default to origin
Date: Fri, 19 Aug 2005 17:14:45 -0500 [thread overview]
Message-ID: <20050819221445.GA97789@rossby.metr.ou.edu> (raw)
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)" \
reply other threads:[~2005-08-19 22:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050819221445.GA97789@rossby.metr.ou.edu \
--to=apw@rossby.metr.ou.edu \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox