On Mon, Sep 24, 2018 at 4:21 PM Taylor Blau <[email protected]> wrote:
> > +cmp_config() {
> > + if [ "$1" = "-C" ]; then
> > + shift &&
> > + GD="-C $1" &&
> > + shift
> > + else
> > + GD=
> > + fi &&
> > + echo "$1" >expected &&
> > + shift &&
> > + git $GD config "$@" >actual &&
> > + test_cmp expected actual
> > +}
>
> This cmp_config seems generally useful, perhaps beyond t2029. What do
> you think about putting it in t/test-lib-functions.sh instead?
Good point. t1300 (and I think some t13xx) does the same. Other tests also do
test "$(git config...)" = blah
which can also use this function to have better error reporting when
things go wrong.
--
Duy