Convert to use quiet option when available
A minor fix that eliminates usage of "2>/dev/null" when --quiet or -q has already been implemented. Signed-off-by: Dan Loewenherz <daniel.loewenherz@yale.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Dan Loewenherz committed
Apr 22, 2009 at 21:46 UTC
7bd93c1c625ce5fa03f0d13d728f34f8ab868991
4 files changed
+5
-5
git-filter-branch.sh
+1
-1
@@ -430,7 +430,7 @@ if [ "$filter_tag_name" ]; then
430
if [ "$type" = "tag" ]; then
431
# Dereference to a commit
432
sha1t="$sha1"
433
- sha1="$(git rev-parse "$sha1"^{commit} 2>/dev/null)" || continue
433
+ sha1="$(git rev-parse -q "$sha1"^{commit})" || continue
434
fi
435
436
[ -f "../map/$sha1" ] || continue
git-merge-resolve.sh
+2
-2
@@ -37,10 +37,10 @@ then
37
exit 2
38
fi
39
40
-git update-index --refresh 2>/dev/null
40
+git update-index -q --refresh
41
git read-tree -u -m --aggressive $bases $head $remotes || exit 2
42
echo "Trying simple merge."
43
-if result_tree=$(git write-tree 2>/dev/null)
43
+if result_tree=$(git write-tree 2>/dev/null)
44
then
45
exit 0
46
else
git-parse-remote.sh
+1
-1
@@ -2,7 +2,7 @@
2
3
# git-ls-remote could be called from outside a git managed repository;
4
# this would fail in that case and would issue an error message.
5
-GIT_DIR=$(git rev-parse --git-dir 2>/dev/null) || :;
5
+GIT_DIR=$(git rev-parse -q --git-dir) || :;
6
7
get_data_source () {
8
case "$1" in
git-pull.sh
+1
-1
@@ -147,7 +147,7 @@ then
147
echo >&2 "Warning: fetch updated the current branch head."
148
echo >&2 "Warning: fast forwarding your working tree from"
149
echo >&2 "Warning: commit $orig_head."
150
- git update-index --refresh 2>/dev/null
150
+ git update-index -q --refresh
151
git read-tree -u -m "$orig_head" "$curr_head" ||
152
die 'Cannot fast-forward your working tree.
153
After making sure that you saved anything precious from