From: Dan Loewenherz Date: Thu, 23 Apr 2009 01:46:02 +0000 (-0400) Subject: Convert to use quiet option when available X-Git-Tag: v1.6.3-rc2~16 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7bd93c1c625ce5fa03f0d13d728f34f8ab868991;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-filter-branch.sh b/git-filter-branch.sh index b90d3df3a..37e044db4 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -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 diff --git a/git-merge-resolve.sh b/git-merge-resolve.sh index 93bcfc2f5..c9da747fc 100755 --- a/git-merge-resolve.sh +++ b/git-merge-resolve.sh @@ -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 diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 695a4094b..a29671986 100755 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -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 diff --git a/git-pull.sh b/git-pull.sh index 8c750270e..35261539a 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -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