From: Paolo Bonzini Date: Mon, 28 Apr 2008 15:32:16 GMT Subject: [PATCH 5/7] don't rely on zero-argument "git fetch" from within git pull Message-ID: In-Reply-To: Since the series will change the meaning of zero-argument "git fetch", it is necessary that git pull does not rely on it. Instead, it resolves it using git-parse-remote, which will return either branch.*.remote or "origin" (at the end of the series, the latter will throw out a big deprecation warning). Signed-off-by: Paolo Bonzini --- git-pull.sh | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/git-pull.sh b/git-pull.sh index bf0c298..5dec4cf 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -106,10 +106,13 @@ error_on_no_merge_candidates () { exit 1 } +. git-parse-remote +if test $# = 0; then + set x $(get_default_remote); shift +fi + +origin="$1" test true = "$rebase" && { - . git-parse-remote && - origin="$1" - test -z "$origin" && origin=$(get_default_remote) reflist="$(get_remote_refs_for_fetch "$@" 2>/dev/null | sed "s|refs/heads/\(.*\):|\1|")" && oldremoteref="$(git rev-parse --verify \ -- 1.5.5