Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-20 Thread 谭俊浩
On 17/03/2016 01:24, Junio C Hamano wrote: 惠轶群 writes: Is it because the wish is to always use /tmp/git-$uid/ as a fallback for $XDG_RUNTIME_DIR (as opposed to ~/.git-credential-cache/, which is specific to the credential-cache and would look strange if we used it for

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-20 Thread 惠轶群
2016-03-17 1:24 GMT+08:00 Junio C Hamano : > 惠轶群 writes: > >>> Is it because the wish is to always use /tmp/git-$uid/ as a fallback >>> for $XDG_RUNTIME_DIR (as opposed to ~/.git-credential-cache/, which >>> is specific to the credential-cache and would look

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-19 Thread 惠轶群
2016-03-17 1:15 GMT+08:00 Jeff King : > On Wed, Mar 16, 2016 at 06:07:45PM +0800, Hui Yiqun wrote: > >> diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh >> index 82c8411..0718bb0 100755 >> --- a/t/t0301-credential-cache.sh >> +++ b/t/t0301-credential-cache.sh

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-19 Thread Jeff King
On Thu, Mar 17, 2016 at 12:40:59AM +0800, 惠轶群 wrote: > > Is it better to have the fallback in /tmp, and not in > > ~/.git-credential-cache/, and why? > > > > Is it because the wish is to always use /tmp/git-$uid/ as a fallback > > for $XDG_RUNTIME_DIR (as opposed to ~/.git-credential-cache/,

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-19 Thread 惠轶群
2016-03-17 0:17 GMT+08:00 Junio C Hamano : > Hui Yiqun writes: > >> t0301 now tests git-credential-cache support for XDG user-specific >> runtime file $XDG_RUNTIME_DIR/git/credential.sock. Specifically: >> >> * if $XDG_RUNTIME_DIR exists, use socket at >>

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-19 Thread 惠轶群
2016-03-18 13:00 GMT+08:00 Jeff King : > On Fri, Mar 18, 2016 at 12:34:04PM +0800, 惠轶群 wrote: > >> >> +test_expect_success 'set $XDG_RUNTIME_DIR' ' >> >> + XDG_RUNTIME_DIR=$HOME/xdg_runtime/ >> >> +' >> > >> > Doesn't this need to export the variable so that credential-cache can

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-19 Thread Junio C Hamano
惠轶群 writes: >> Is it because the wish is to always use /tmp/git-$uid/ as a fallback >> for $XDG_RUNTIME_DIR (as opposed to ~/.git-credential-cache/, which >> is specific to the credential-cache and would look strange if we >> used it for other "runtime" things)? > > Yes, I

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-19 Thread Junio C Hamano
Hui Yiqun writes: > t0301 now tests git-credential-cache support for XDG user-specific > runtime file $XDG_RUNTIME_DIR/git/credential.sock. Specifically: > > * if $XDG_RUNTIME_DIR exists, use socket at > `$XDG_RUNTIME_DIR/git/credential-cache.sock`. > > * otherwise,

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-19 Thread 惠轶群
2016-03-17 16:12 GMT+08:00 Junio C Hamano : > 谭俊浩 writes: > >> On 17/03/2016 01:24, Junio C Hamano wrote: >> >>> Using ~/.git-credential-cache/credential-cache.sock would not help >>> at all for existing users, but ~/.git-credential-cache/socket would >>>

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-19 Thread 惠轶群
2016-03-18 13:11 GMT+08:00 惠轶群 : > 2016-03-18 13:00 GMT+08:00 Jeff King : >> On Fri, Mar 18, 2016 at 12:34:04PM +0800, 惠轶群 wrote: >> >>> >> +test_expect_success 'set $XDG_RUNTIME_DIR' ' >>> >> + XDG_RUNTIME_DIR=$HOME/xdg_runtime/ >>> >> +' >>> > >>> > Doesn't

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-19 Thread Jeff King
On Wed, Mar 16, 2016 at 06:07:45PM +0800, Hui Yiqun wrote: > diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh > index 82c8411..0718bb0 100755 > --- a/t/t0301-credential-cache.sh > +++ b/t/t0301-credential-cache.sh > @@ -12,7 +12,32 @@ test -z "$NO_UNIX_SOCKETS" || { > #

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-19 Thread Jeff King
On Fri, Mar 18, 2016 at 12:34:04PM +0800, 惠轶群 wrote: > >> +test_expect_success 'set $XDG_RUNTIME_DIR' ' > >> + XDG_RUNTIME_DIR=$HOME/xdg_runtime/ > >> +' > > > > Doesn't this need to export the variable so that credential-cache can > > see it? > > I'm not sure, but it seems that a little

Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-18 Thread Junio C Hamano
谭俊浩 writes: > On 17/03/2016 01:24, Junio C Hamano wrote: > >> Using ~/.git-credential-cache/credential-cache.sock would not help >> at all for existing users, but ~/.git-credential-cache/socket would >> interoperate well with users with existing versions of Git, no? >>

[PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-16 Thread Hui Yiqun
t0301 now tests git-credential-cache support for XDG user-specific runtime file $XDG_RUNTIME_DIR/git/credential.sock. Specifically: * if $XDG_RUNTIME_DIR exists, use socket at `$XDG_RUNTIME_DIR/git/credential-cache.sock`. * otherwise, `/tmp/git-$uid/credential-cache.sock` is taken.