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