Re: [PATCH v4 1/3] ref-filter: add worktreepath atom

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

 



On Thu, Jan 3, 2019 at 12:40 AM Jeff King <peff@xxxxxxxx> wrote:
> On Mon, Dec 24, 2018 at 12:47:54AM -0800, nbelakovski@xxxxxxxxx wrote:
> > +test_expect_success 'validate worktree atom' '
> > +     {
> > +     echo master: $PWD &&
> > +     echo master_worktree: $PWD/worktree_dir &&
> > +     echo side: not checked out
> > +     } > expect &&
>
> Minor style nit: use "} >expect" without the extra space.

An interpolating here-doc would be even more natural:

    cat >expect <-EOF &&
    master: $(pwd)
    master_worktree: $(pwd)/worktree_dir
    side: not checked out
    EOF

> This checks the actual directories. Good. I can never remember the rules
> for when to use $PWD versus $(pwd) on Windows. We may run afoul of the
> distinction here.

As I understand it, this is exactly a case in which you would need to
use $(pwd); namely, when coming up with an "expect" value. t/README
talks about it.



[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