Re: [PATCH] worktree: add per-worktree config files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 24, 2018 at 4:21 PM Taylor Blau <me@xxxxxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux