From: Jeff King Date: Fri, 17 Mar 2017 13:38:17 GMT Subject: Re: [GSoC][PATCH v6 3/3] credential-cache: add tests for XDG functionality Message-ID: <20170317133817.nt6s7viputaeh2cy@sigill.intra.peff.net> In-Reply-To: <20170317123634.10863-3-lehmacdj@gmail.com> On Fri, Mar 17, 2017 at 08:36:34AM -0400, Devin Lehmacher wrote: > +test_expect_success 'credential-cache --socket option overrides default location' ' > + test_when_finished " > + git credential-cache exit --socket \"\$HOME/dir/socket\" && > + rmdir \"\$HOME/dir\" > + " && > + check approve "cache --socket \"\$HOME/dir/socket\"" <<-\EOF && I wondered how this one got through the quoting/eval mess of the "check()" function. But it works because we pass a raw unexpanded $HOME into the config variable, and the credential subsystem then runs "cache --socket ..." using a shell, which is where it gets expanded. > + mkdir -p -m 700 "$HOME/.git-credential-cache/" && This is our first use of "mkdir -m". It's in POSIX, so it should probably be fine. I'm not sure if platforms without POSIXPERM would complain, but I think in practice anything with unix sockets will handle it just fine. The rest of the tests look OK to me. -Peff