Code

pull: use git rev-parse -q
authorMiklos Vajna <vmiklos@frugalware.org>
Wed, 3 Dec 2008 13:26:50 +0000 (14:26 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Dec 2008 22:27:17 +0000 (14:27 -0800)
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-pull.sh

index 1cac898a2443538144d45006b9adb3c0aaf2d1fa..2c7f432dc04254dcb9906f4d078eb16d195848ca 100755 (executable)
@@ -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.