summaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-12-02 01:56:09 +0100
committerJunio C Hamano <gitster@pobox.com>2008-12-02 16:54:01 -0800
commit757c7f60a78004fc3d0ea62f44320d54ef430c10 (patch)
treec709ceb199291ba5da5181722cbe2a8ecb082caa /git-stash.sh
parent9b3b7fd8072783e2ec20b3cf622713d39b1c8af4 (diff)
downloadgit-757c7f60a78004fc3d0ea62f44320d54ef430c10.tar.gz
git-stash: use git rev-parse -q
Don't redirect stderr to /dev/null, use -q to suppress the output on stderr. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/git-stash.sh b/git-stash.sh
index b9ace99704..c0532e8751 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -30,7 +30,7 @@ clear_stash () {
then
die "git stash clear with parameters is unimplemented"
fi
- if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
+ if current=$(git rev-parse -q --verify $ref_stash)
then
git update-ref -d $ref_stash $current
fi
@@ -129,7 +129,7 @@ save_stash () {
}
have_stash () {
- git rev-parse --verify $ref_stash >/dev/null 2>&1
+ git rev-parse -q --verify $ref_stash >/dev/null
}
list_stash () {
@@ -229,16 +229,16 @@ drop_stash () {
fi
# Verify supplied argument looks like a stash entry
s=$(git rev-parse --verify "$@") &&
- git rev-parse --verify "$s:" > /dev/null 2>&1 &&
- git rev-parse --verify "$s^1:" > /dev/null 2>&1 &&
- git rev-parse --verify "$s^2:" > /dev/null 2>&1 ||
+ git rev-parse -q --verify "$s:" > /dev/null &&
+ git rev-parse -q --verify "$s^1:" > /dev/null &&
+ git rev-parse -q --verify "$s^2:" > /dev/null ||
die "$*: not a valid stashed state"
git reflog delete --updateref --rewrite "$@" &&
echo "Dropped $* ($s)" || die "$*: Could not drop stash entry"
# clear_stash if we just dropped the last stash entry
- git rev-parse --verify "$ref_stash@{0}" > /dev/null 2>&1 || clear_stash
+ git rev-parse -q --verify "$ref_stash@{0}" > /dev/null || clear_stash
}
apply_to_branch () {