Re: [PATCH 1/6] t2500: add various tests for nuking untracked files

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

 



On Sun, Sep 19, 2021 at 6:47 AM Ævar Arnfjörð Bjarmason
<avarab@xxxxxxxxx> wrote:
>
> On Sat, Sep 18 2021, Elijah Newren via GitGitGadget wrote:
>
> > +     test_create_repo reset_$1 &&
>
> s/test_create_repo/git init/ these days (also for the rest).

Ah, from your f0d4d398e2 ("test-lib: split up and deprecate
test_create_repo()", 2021-05-10).  Interesting history; I'll
switchover to git init.

> > +             mkdir foo.t &&
> > +             echo precious >foo.t/file &&
> > +             cp foo.t/file expect &&
> > +
> > +             test_must_fail git reset --merge work 2>error &&
> > +             test_cmp expect foo.t/file &&
> > +             grep "Updating.*foo.t.*would lose untracked files" error
>
> The test is ambiguous about whether we complain about foo.t/file, or
> foo.t, if there was foo.t{file,file-two} would we complain just once or
> twice?
>
> I think it's just the directory, but probably worthwhile for the test to
> make the distinction. If it's a "a/sub/dir/file" do we complain about
> "a/" or "a/sub/dir/" ?

Yeah, I'll switch it to grep "Updating .foo.t. would lose untracked files" error

to make it clearer (where I'm using '.' instead of attempting to
escape single quote characters appropriately).




[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