From: Eric Sunshine Date: Thu, 03 Jan 2019 09:31:29 GMT Subject: Re: [PATCH v4 1/3] ref-filter: add worktreepath atom Message-ID: In-Reply-To: <20190103054043.GG20047@sigill.intra.peff.net> On Thu, Jan 3, 2019 at 12:40 AM Jeff King wrote: > On Mon, Dec 24, 2018 at 12:47:54AM -0800, nbelakovski@gmail.com 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.