git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] stash: prefer --quiet over shell redirection

From
David Aguilar <davvid@gmail.com>
Date
Aug 31, 2014, 07:35 UTC
Message-ID
<20140831073550.GA66236@gmail.com>
In-Reply-To
<54023D01.6090504@kdbg.org>
On Sat, Aug 30, 2014 at 11:07:13PM +0200, Johannes Sixt wrote:
Show 16 quoted lines
> Am 30.08.2014 21:30, schrieb David Aguilar:
> > @@ -392,12 +392,12 @@ parse_flags_and_rev()
> >  		;;
> >  	esac
> >  
> > -	REV=$(git rev-parse --quiet --symbolic --verify "$1" 2>/dev/null) || {
> > +	REV=$(git rev-parse --quiet --symbolic --verify "$1") || {
> >  		reference="$1"
> >  		die "$(eval_gettext "\$reference is not valid reference")"
> >  	}
> >  
> > -	i_commit=$(git rev-parse --quiet --verify "$REV^2" 2>/dev/null) &&
> > +	i_commit=$(git rev-parse --quiet --verify "$REV^2") &&
> >  	set -- $(git rev-parse "$REV" "$REV^1" "$REV:" "$REV^1:" "$REV^2:" 2>/dev/null) &&
> 
> I see another rev-parse that you did not modify. An omission?

The docs for --quiet say, "Only meaningful in --verify mode", so I didn't touch the non-verify call-sites.

Thanks for the review. I'll address your notes and send a v2 shortly.
-- 
David
Previous: Johannes SixtNext: Johannes Sixt
Message 4 of 5 in “bisect: remove unnecessary redirection”
  1. 1/2 bisect: remove unnecessary redirectionDavid Aguilar, Aug 30, 2014
  2. 2/2 stash: prefer --quiet over shell redirectionDavid Aguilar, Aug 30, 2014
  3. Johannes SixtAug 30, 2014
  4. David AguilarAug 31, 2014
  5. Johannes SixtAug 30, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.