From: Benjamin C Meyer <bmeyer@rim.com>
To: git@vger.kernel.org
Cc: Benjamin C Meyer <bmeyer@rim.com>
Subject: [PATCH 1/4] stash: use --quiet rather than using 2>/dev/null
Date: Fri, 19 Mar 2010 22:18:35 -0400 [thread overview]
Message-ID: <1269051518-25099-1-git-send-email-bmeyer@rim.com> (raw)
Signed-off-by: Benjamin C Meyer <bmeyer@rim.com>
---
git-stash.sh | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/git-stash.sh b/git-stash.sh
index aa47e54..2533185 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -39,7 +39,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 --quiet --verify $ref_stash)
then
git update-ref -d $ref_stash $current
fi
@@ -201,7 +201,7 @@ save_stash () {
}
have_stash () {
- git rev-parse --verify $ref_stash >/dev/null 2>&1
+ git rev-parse --quiet --verify $ref_stash >/dev/null
}
list_stash () {
@@ -342,16 +342,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 --quiet --verify "$s:" > /dev/null &&
+ git rev-parse --quiet --verify "$s^1:" > /dev/null &&
+ git rev-parse --quiet --verify "$s^2:" > /dev/null ||
die "$*: not a valid stashed state"
git reflog delete --updateref --rewrite "$@" &&
say "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 --quiet --verify "$ref_stash@{0}" > /dev/null || clear_stash
}
apply_to_branch () {
--
1.7.0.2
next reply other threads:[~2010-03-20 2:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-20 2:18 Benjamin C Meyer [this message]
2010-03-20 2:18 ` [PATCH 2/4] pull: use --quiet rather than 2>/dev/null Benjamin C Meyer
2010-03-20 12:35 ` Jonathan Nieder
2010-03-20 18:59 ` Benjamin Meyer
2010-03-21 4:33 ` Jonathan Nieder
2010-03-21 17:34 ` Benjamin Meyer
2010-03-23 3:23 ` Jonathan Nieder
2010-03-20 2:18 ` [PATCH 3/4] rebase: " Benjamin C Meyer
2010-03-20 2:18 ` [PATCH 4/4] rebase-interactive: " Benjamin C Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1269051518-25099-1-git-send-email-bmeyer@rim.com \
--to=bmeyer@rim.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).