Skip to content

Commit

Permalink
pull: use git rev-parse -q
Browse files Browse the repository at this point in the history
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Miklos Vajna authored and Junio C Hamano committed Dec 3, 2008
1 parent a86e8c1 commit 2d17985
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions git-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ test true = "$rebase" && {
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 \
"refs/remotes/$origin/$reflist" 2>/dev/null)"
oldremoteref="$(git rev-parse -q --verify \
"refs/remotes/$origin/$reflist")"
}
orig_head=$(git rev-parse --verify HEAD 2>/dev/null)
orig_head=$(git rev-parse -q --verify HEAD)
git fetch $verbosity --update-head-ok "$@" || exit 1

curr_head=$(git rev-parse --verify HEAD 2>/dev/null)
curr_head=$(git rev-parse -q --verify HEAD)
if test -n "$orig_head" && test "$curr_head" != "$orig_head"
then
# The fetch involved updating the current branch.
Expand Down

0 comments on commit 2d17985

Please sign in to comment.