Re: [PATCH] Add quiet option to git-ls-files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The code doesn't seem to match the claim.

I'm sorry- That was horribly sloppy of me. I figured that passing
`quiet' to report_path_error would break too many things, so I've
dropped that patch altogether. I've removed the reference to ls-files
--quiet in my second patch ( viz.
0002-Replace-redirect-to-dev-null-in-favor-of-quiet-optio.patch) and
attached version 2.

Thanks and regards,
Ramkumar
From c34c72801804da61169ab6866d6ce262ea6cf5c1 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <artagnon@xxxxxxxxx>
Date: Fri, 8 Jan 2010 07:32:29 +0530
Subject: [PATCH v2] Replace redirect to /dev/null in favor of quiet option

Signed-off-by: Ramkumar Ramachandra <artagnon@xxxxxxxxx>
---
 git-mergetool.sh |    2 +-
 git-pull.sh      |    2 +-
 git-rebase.sh    |    2 +-
 git-stash.sh     |   12 ++++++------
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/git-mergetool.sh b/git-mergetool.sh
index b52a741..1c902aa 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -101,7 +101,7 @@ resolve_deleted_merge () {
 		return 0
 		;;
 	    [dD]*)
-		git rm -- "$MERGED" > /dev/null
+		git rm --quiet -- "$MERGED"
 		cleanup_temp_files
 		return 0
 		;;
diff --git a/git-pull.sh b/git-pull.sh
index 9e69ada..336e91a 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -170,7 +170,7 @@ test true = "$rebase" && {
 	. git-parse-remote &&
 	remoteref="$(get_remote_merge_branch "$@" 2>/dev/null)" &&
 	oldremoteref="$(git rev-parse -q --verify "$remoteref")" &&
-	for reflog in $(git rev-list -g $remoteref 2>/dev/null)
+	for reflog in $(git rev-list --quiet --walk-reflogs $remoteref)
 	do
 		if test "$reflog" = "$(git merge-base $reflog $curr_branch)"
 		then
diff --git a/git-rebase.sh b/git-rebase.sh
index b121f45..bfe0475 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -100,7 +100,7 @@ call_merge () {
 	cmt="$(cat "$dotest/cmt.$1")"
 	echo "$cmt" > "$dotest/current"
 	hd=$(git rev-parse --verify HEAD)
-	cmt_name=$(git symbolic-ref HEAD 2> /dev/null || echo HEAD)
+	cmt_name=$(git symbolic-ref --quiet HEAD || echo HEAD)
 	msgnum=$(cat "$dotest/msgnum")
 	end=$(cat "$dotest/end")
 	eval GITHEAD_$cmt='"${cmt_name##refs/heads/}~$(($end - $msgnum))"'
diff --git a/git-stash.sh b/git-stash.sh
index 3a0685f..5605d19 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -39,7 +39,7 @@ clear_stash () {
 	then
 		die "git stash clear with parameters is unimplemented"
 	fi
-	if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
+	if current=$(git rev-parse --quiet --verify $ref_stash)
 	then
 		git update-ref -d $ref_stash $current
 	fi
@@ -200,7 +200,7 @@ save_stash () {
 }
 
 have_stash () {
-	git rev-parse --verify $ref_stash >/dev/null 2>&1
+	git rev-parse --quiet --verify $ref_stash >/dev/null
 }
 
 list_stash () {
@@ -337,16 +337,16 @@ drop_stash () {
 	fi
 	# Verify supplied argument looks like a stash entry
 	s=$(git rev-parse --verify "$@") &&
-	git rev-parse --verify "$s:"   > /dev/null 2>&1 &&
-	git rev-parse --verify "$s^1:" > /dev/null 2>&1 &&
-	git rev-parse --verify "$s^2:" > /dev/null 2>&1 ||
+	git rev-parse --quiet --verify "$s:"   > /dev/null &&
+	git rev-parse --quiet --verify "$s^1:" > /dev/null &&
+	git rev-parse --quiet --verify "$s^2:" > /dev/null ||
 		die "$*: not a valid stashed state"
 
 	git reflog delete --updateref --rewrite "$@" &&
 		say "Dropped $* ($s)" || die "$*: Could not drop stash entry"
 
 	# clear_stash if we just dropped the last stash entry
-	git rev-parse --verify "$ref_stash@{0}" > /dev/null 2>&1 || clear_stash
+	git rev-parse --quiet --verify "$ref_stash@{0}" > /dev/null || clear_stash
 }
 
 apply_to_branch () {
-- 
1.6.5


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]