All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Convert to use quiet option when available
@ 2009-04-23  1:46 Dan Loewenherz
  2009-04-23  4:21 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Loewenherz @ 2009-04-23  1:46 UTC (permalink / raw)
  To: git, gitster

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>
---
 git-filter-branch.sh |    2 +-
 git-merge-resolve.sh |    4 ++--
 git-parse-remote.sh  |    2 +-
 git-pull.sh          |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index b90d3df..37e044d 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 93bcfc2..c9da747 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 695a409..a296719 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 8c75027..3526153 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
-- 
1.6.3.rc1.34.g0be9b.dirty

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Convert to use quiet option when available
  2009-04-23  1:46 [PATCH] Convert to use quiet option when available Dan Loewenherz
@ 2009-04-23  4:21 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2009-04-23  4:21 UTC (permalink / raw)
  To: Dan Loewenherz; +Cc: git

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-23  4:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-23  1:46 [PATCH] Convert to use quiet option when available Dan Loewenherz
2009-04-23  4:21 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.