Re: [PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR
- From
- 谭俊浩 <pickfire@riseup.net>
- Date
- Mar 17, 2016, 03:59 UTC
- Message-ID
- <729c6af810e3000e789f4afd537b77a8@riseup.net>
- In-Reply-To
- <xmqqbn6e5o9v.fsf@gitster.mtv.corp.google.com>
On 17/03/2016 01:24, Junio C Hamano wrote:
Show 26 quoted lines
> 惠轶群 <huiyiqun@gmail.com> 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 mean to use it as a general fallback for git. > > If that is the case the code probably needs to be a bit more careful > before deciding to use /tmp/git-$uid/ directory (is it really $uid's? > can anybody else write to it to race with the real user? etc.) > >> On the other hand, I think, falling back to >> $HOME/.git-credential-cache/socket >> doesn't make any sense for back-compability cannot be ensured. > > What do you mean by that? > > 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? > >>> Just being curious, and wanting to see the reasoning behind the >>> design decision the patch series makes in the log message of one of >>> these patches.
I guess it is better to use /tmp or such instead of $HOME/.* so that the users home directory won't be flooded by sockets.