Code

rebase: use git rev-parse -q
authorMiklos Vajna <vmiklos@frugalware.org>
Wed, 3 Dec 2008 13:26:51 +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-rebase.sh

index 023a6dc94a48f7abf2801359ad68d40909e9b6aa..ea7720d3e29650b09a2805410a08f19d73f287f5 100755 (executable)
@@ -365,10 +365,10 @@ case "$#" in
        switch_to="$2"
 
        if git show-ref --verify --quiet -- "refs/heads/$2" &&
-          branch=$(git rev-parse --verify "refs/heads/$2" 2>/dev/null)
+          branch=$(git rev-parse -q --verify "refs/heads/$2")
        then
                head_name="refs/heads/$2"
-       elif branch=$(git rev-parse --verify "$2" 2>/dev/null)
+       elif branch=$(git rev-parse -q --verify "$2")
        then
                head_name="detached HEAD"
        else