Re: [PATCH] remote: handle negative refspecs in git remote show
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jun 14, 2022, 02:26 UTC
- Message-ID
- <Yqfx3P8qUpQ7Y0ux@nand.local>
- In-Reply-To
- <CA+P7+xrgWVh_GPMiziiMnsrESH_Z+HzB+D2un8FWSs0dpcDFdA@mail.gmail.com>
On Mon, Jun 13, 2022 at 06:56:55PM -0700, Jacob Keller wrote:
Show 13 quoted lines
> > > +test_expect_success 'show with negative refspecs' ' > > > + test_when_finished "git -C test config --fixed-value --unset remote.origin.fetch ^refs/heads/main" && > > > + ( > > > + cd test && > > > + git config --add remote.origin.fetch ^refs/heads/main && > > > > Doing "git config --unset" outside of the subshell could be avoided by > > ditching the subshell altogether, perhaps with something like: > > > > test_config -C test remote.origin.fetch ^refs/heads/main && > > We need "--add" semantics here which test_config doesn't seem to > support at the moment.
Makes sense, thanks for explaining. This patch looks good to me.
Thanks, Taylor