Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Loewenherz authored and Junio C Hamano committed Apr 23, 2009
1 parent b18cc5a commit 7bd93c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion git-filter-branch.sh
Expand Up @@ -430,7 +430,7 @@ if [ "$filter_tag_name" ]; then
if [ "$type" = "tag" ]; then
# Dereference to a commit
sha1t="$sha1"
sha1="$(git rev-parse "$sha1"^{commit} 2>/dev/null)" || continue
sha1="$(git rev-parse -q "$sha1"^{commit})" || continue
fi

[ -f "../map/$sha1" ] || continue
Expand Down
4 changes: 2 additions & 2 deletions git-merge-resolve.sh
Expand Up @@ -37,10 +37,10 @@ then
exit 2
fi

git update-index --refresh 2>/dev/null
git update-index -q --refresh
git read-tree -u -m --aggressive $bases $head $remotes || exit 2
echo "Trying simple merge."
if result_tree=$(git write-tree 2>/dev/null)
if result_tree=$(git write-tree 2>/dev/null)
then
exit 0
else
Expand Down
2 changes: 1 addition & 1 deletion git-parse-remote.sh
Expand Up @@ -2,7 +2,7 @@

# git-ls-remote could be called from outside a git managed repository;
# this would fail in that case and would issue an error message.
GIT_DIR=$(git rev-parse --git-dir 2>/dev/null) || :;
GIT_DIR=$(git rev-parse -q --git-dir) || :;

get_data_source () {
case "$1" in
Expand Down
2 changes: 1 addition & 1 deletion git-pull.sh
Expand Up @@ -147,7 +147,7 @@ then
echo >&2 "Warning: fetch updated the current branch head."
echo >&2 "Warning: fast forwarding your working tree from"
echo >&2 "Warning: commit $orig_head."
git update-index --refresh 2>/dev/null
git update-index -q --refresh
git read-tree -u -m "$orig_head" "$curr_head" ||
die 'Cannot fast-forward your working tree.
After making sure that you saved anything precious from
Expand Down

0 comments on commit 7bd93c1

Please sign in to comment.