git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/5] More "use rev-parse -q" patches
@ 2008-12-03 13:26 Miklos Vajna
  2008-12-03 13:26 ` [PATCH 1/5] filter-branch: use git rev-parse -q Miklos Vajna
  0 siblings, 1 reply; 6+ messages in thread
From: Miklos Vajna @ 2008-12-03 13:26 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git

Hi,

I'm sending these as separate patches as they touch completely unrelated
parts of Git, but feel free to squash them together you think that's
better.

All of them is about using rev-parse -q instead of rev-parse 2>/dev/null.

Miklos Vajna (5):
  filter-branch: use git rev-parse -q
  lost-found: use git rev-parse -q
  pull: use git rev-parse -q
  rebase: use git rev-parse -q
  submodule: use git rev-parse -q

 git-filter-branch.sh |    2 +-
 git-lost-found.sh    |    2 +-
 git-pull.sh          |    8 ++++----
 git-rebase.sh        |    4 ++--
 git-submodule.sh     |    6 +++---
 5 files changed, 11 insertions(+), 11 deletions(-)

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

* [PATCH 1/5] filter-branch: use git rev-parse -q
  2008-12-03 13:26 [PATCH 0/5] More "use rev-parse -q" patches Miklos Vajna
@ 2008-12-03 13:26 ` Miklos Vajna
  2008-12-03 13:26   ` [PATCH 2/5] lost-found: " Miklos Vajna
  0 siblings, 1 reply; 6+ messages in thread
From: Miklos Vajna @ 2008-12-03 13:26 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 git-filter-branch.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 81392ad..c106f45 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -256,7 +256,7 @@ while read commit parents; do
 	*)
 		# The commit may not have the subdirectory at all
 		err=$(git read-tree -i -m $commit:"$filter_subdir" 2>&1) || {
-			if ! git rev-parse --verify $commit:"$filter_subdir" 2>/dev/null
+			if ! git rev-parse -q --verify $commit:"$filter_subdir"
 			then
 				rm -f "$GIT_INDEX_FILE"
 			else
-- 
1.6.0.4

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

* [PATCH 2/5] lost-found: use git rev-parse -q
  2008-12-03 13:26 ` [PATCH 1/5] filter-branch: use git rev-parse -q Miklos Vajna
@ 2008-12-03 13:26   ` Miklos Vajna
  2008-12-03 13:26     ` [PATCH 3/5] pull: " Miklos Vajna
  0 siblings, 1 reply; 6+ messages in thread
From: Miklos Vajna @ 2008-12-03 13:26 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 git-lost-found.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-lost-found.sh b/git-lost-found.sh
index 9cedaf8..0b3e8c7 100755
--- a/git-lost-found.sh
+++ b/git-lost-found.sh
@@ -20,7 +20,7 @@ while read dangling type sha1
 do
 	case "$dangling" in
 	dangling)
-		if git rev-parse --verify "$sha1^0" >/dev/null 2>/dev/null
+		if git rev-parse -q --verify "$sha1^0" >/dev/null
 		then
 			dir="$laf/commit"
 			git show-branch "$sha1"
-- 
1.6.0.4

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

* [PATCH 3/5] pull: use git rev-parse -q
  2008-12-03 13:26   ` [PATCH 2/5] lost-found: " Miklos Vajna
@ 2008-12-03 13:26     ` Miklos Vajna
  2008-12-03 13:26       ` [PATCH 4/5] rebase: " Miklos Vajna
  0 siblings, 1 reply; 6+ messages in thread
From: Miklos Vajna @ 2008-12-03 13:26 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 git-pull.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/git-pull.sh b/git-pull.sh
index 1cac898..2c7f432 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -121,13 +121,13 @@ test true = "$rebase" && {
 	test -z "$origin" && origin=$(get_default_remote)
 	reflist="$(get_remote_refs_for_fetch "$@" 2>/dev/null |
 		sed "s|refs/heads/\(.*\):|\1|")" &&
-	oldremoteref="$(git rev-parse --verify \
-		"refs/remotes/$origin/$reflist" 2>/dev/null)"
+	oldremoteref="$(git rev-parse -q --verify \
+		"refs/remotes/$origin/$reflist")"
 }
-orig_head=$(git rev-parse --verify HEAD 2>/dev/null)
+orig_head=$(git rev-parse -q --verify HEAD)
 git fetch $verbosity --update-head-ok "$@" || exit 1
 
-curr_head=$(git rev-parse --verify HEAD 2>/dev/null)
+curr_head=$(git rev-parse -q --verify HEAD)
 if test -n "$orig_head" && test "$curr_head" != "$orig_head"
 then
 	# The fetch involved updating the current branch.
-- 
1.6.0.4

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

* [PATCH 4/5] rebase: use git rev-parse -q
  2008-12-03 13:26     ` [PATCH 3/5] pull: " Miklos Vajna
@ 2008-12-03 13:26       ` Miklos Vajna
  2008-12-03 13:26         ` [PATCH 5/5] submodule: " Miklos Vajna
  0 siblings, 1 reply; 6+ messages in thread
From: Miklos Vajna @ 2008-12-03 13:26 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 git-rebase.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index 023a6dc..ea7720d 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -365,10 +365,10 @@ case "$#" in
 	switch_to="$2"
 
 	if git show-ref --verify --quiet -- "refs/heads/$2" &&
-	   branch=$(git rev-parse --verify "refs/heads/$2" 2>/dev/null)
+	   branch=$(git rev-parse -q --verify "refs/heads/$2")
 	then
 		head_name="refs/heads/$2"
-	elif branch=$(git rev-parse --verify "$2" 2>/dev/null)
+	elif branch=$(git rev-parse -q --verify "$2")
 	then
 		head_name="detached HEAD"
 	else
-- 
1.6.0.4

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

* [PATCH 5/5] submodule: use git rev-parse -q
  2008-12-03 13:26       ` [PATCH 4/5] rebase: " Miklos Vajna
@ 2008-12-03 13:26         ` Miklos Vajna
  0 siblings, 0 replies; 6+ messages in thread
From: Miklos Vajna @ 2008-12-03 13:26 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 git-submodule.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index 220d94e..2f47e06 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -413,7 +413,7 @@ cmd_summary() {
 
 	test $summary_limit = 0 && return
 
-	if rev=$(git rev-parse --verify "$1^0" 2>/dev/null)
+	if rev=$(git rev-parse -q --verify "$1^0")
 	then
 		head=$rev
 		shift
@@ -464,11 +464,11 @@ cmd_summary() {
 		missing_dst=
 
 		test $mod_src = 160000 &&
-		! GIT_DIR="$name/.git" git-rev-parse --verify $sha1_src^0 >/dev/null 2>&1 &&
+		! GIT_DIR="$name/.git" git-rev-parse -q --verify $sha1_src^0 >/dev/null &&
 		missing_src=t
 
 		test $mod_dst = 160000 &&
-		! GIT_DIR="$name/.git" git-rev-parse --verify $sha1_dst^0 >/dev/null 2>&1 &&
+		! GIT_DIR="$name/.git" git-rev-parse -q --verify $sha1_dst^0 >/dev/null &&
 		missing_dst=t
 
 		total_commits=
-- 
1.6.0.4

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

end of thread, other threads:[~2008-12-03 13:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03 13:26 [PATCH 0/5] More "use rev-parse -q" patches Miklos Vajna
2008-12-03 13:26 ` [PATCH 1/5] filter-branch: use git rev-parse -q Miklos Vajna
2008-12-03 13:26   ` [PATCH 2/5] lost-found: " Miklos Vajna
2008-12-03 13:26     ` [PATCH 3/5] pull: " Miklos Vajna
2008-12-03 13:26       ` [PATCH 4/5] rebase: " Miklos Vajna
2008-12-03 13:26         ` [PATCH 5/5] submodule: " Miklos Vajna

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).