Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Eliminate redirection to stdout and stderr when quiet option is available

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:46

Dan Loewenherz [off-list ref] writes:
quoted hunk
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index f6e536e..e1106c9 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -158,7 +158,7 @@ my $status_head = sprintf($status_fmt, 'staged',
'unstaged', 'path');
 {
 	my $initial;
 	sub is_initial_commit {
-		$initial = system('git rev-parse HEAD -- >/dev/null 2>&1') != 0
+		$initial = system('git rev-parse -q HEAD -- ') != 0
Isn't this conversion wrong?

	$ git rev-parse -q HEAD --
        95405ba6cf7adeaa4a066e8a3a1b76b73f7b9341
quoted hunk
diff --git a/git-am.sh b/git-am.sh
index 6d1848b..8a86d05 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -36,7 +36,7 @@ cd_to_toplevel
 git var GIT_COMMITTER_IDENT >/dev/null ||
 	die "You need to set your committer info first"

-if git rev-parse --verify -q HEAD >/dev/null
+if git rev-parse --verify -q HEAD
Likewise.

Should I spend more time myself, or will you double check the patch and
resubmit?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help