Re: [PATCH-w 101/105] t6300 (for-each-ref): modernize style

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH-w 101/105] t6300 (for-each-ref): modernize style

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

Tom Grennan [off-list ref] writes:
It's trivial to remove these "quiet" and "silent", but to me that's the
only value added by these patches.  More seriously, the remaining
modernization still seems much larger than its value.
Don't do that, then ;-).

Some older scripts do redirect the output from the commands to /dev/null
but that dates back before we made the default reasonably silent, and in
"modern" style we tend to keep them sent to their standard output to help
debuggability. These quiet/silent takes us to the prehistoric times.

Re: [PATCH-w 101/105] t6300 (for-each-ref): modernize style

From: Tom Grennan <hidden>
Date: 2016-06-15 22:53:11

On Wed, Feb 29, 2012 at 07:26:10PM -0800, Junio C Hamano wrote:
Tom Grennan [off-list ref] writes:
quoted
It's trivial to remove these "quiet" and "silent", but to me that's the
only value added by these patches.  More seriously, the remaining
modernization still seems much larger than its value.
Don't do that, then ;-).

Some older scripts do redirect the output from the commands to /dev/null
but that dates back before we made the default reasonably silent, and in
"modern" style we tend to keep them sent to their standard output to help
debuggability. These quiet/silent takes us to the prehistoric times.
Hey! I am prehistoric:-)

Like I said, I think there is currently a debug distraction with verbose
mode.  However, rather than hiding expected failures and diverting other
output as I had, perhaps we should dup stderr to stdout in verbose mode
so error messages show up near the logged invocation when piped through
a pager (i.e. mimic "|&").  With this, one can quickly scan past the
noise to focus on the broken cases.

  exec 5>&1
  exec 6<&0
  if test "$verbose" = "t"
  then
- 	exec 4>&2 3>&1
+ 	exec 4>&1 3>&1
  else
  	exec 4>/dev/null 3>/dev/null
  fi

For example, try this w/ and w/o the above change.
	(cd t && ./t5512-ls-remote.sh) | less

I still think git-branch and git-tag should have a -q option; better
yet, the wrapper itself (i.e. git --quiet/--silent XXX).

-- 
TomG

Re: [PATCH-w 101/105] t6300 (for-each-ref): modernize style

From: Tom Grennan <hidden>
Date: 2016-06-15 22:53:11

On Wed, Feb 29, 2012 at 09:10:10PM -0800, Tom Grennan wrote:
On Wed, Feb 29, 2012 at 07:26:10PM -0800, Junio C Hamano wrote:
quoted
Tom Grennan [off-list ref] writes:
For example, try this w/ and w/o the above change.
(cd t && ./t5512-ls-remote.sh) | less
	(cd t && ./t5512-ls-remote.sh -v) | less

-- 
TomG
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help