Re: [PATCH 3/3] credential-cache--daemon: change to the socket dir on startup

2016-02-23 Thread Jeff King
On Tue, Feb 23, 2016 at 01:09:44PM -0800, Junio C Hamano wrote: > I tentatively squashed this, which I think reads better. > > diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c > index 9a3a7a3..6b00ee0 100644 > --- a/credential-cache--daemon.c > +++

Re: [PATCH 3/3] credential-cache--daemon: change to the socket dir on startup

2016-02-23 Thread Junio C Hamano
Jeff King writes: > On Tue, Feb 23, 2016 at 01:06:10PM -0800, Junio C Hamano wrote: > >> Jeff King writes: >> >> > + /* >> > + * We don't actually care what our cwd is; we chdir here just to >> > + * be a friendly daemon and avoid tying up our original cwd.

Re: [PATCH 3/3] credential-cache--daemon: change to the socket dir on startup

2016-02-23 Thread Jeff King
On Tue, Feb 23, 2016 at 01:06:10PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > + /* > > +* We don't actually care what our cwd is; we chdir here just to > > +* be a friendly daemon and avoid tying up our original cwd. > > +* If this fails, it's OK to just

Re: [PATCH 3/3] credential-cache--daemon: change to the socket dir on startup

2016-02-23 Thread Junio C Hamano
Jeff King writes: > + /* > + * We don't actually care what our cwd is; we chdir here just to > + * be a friendly daemon and avoid tying up our original cwd. > + * If this fails, it's OK to just continue without that benefit. > + */ > + chdir(dir); I

[PATCH 3/3] credential-cache--daemon: change to the socket dir on startup

2016-02-22 Thread Jeff King
From: Jon Griffiths Changing to the socket path stops the daemon holding open the directory the user was in when it was started, preventing umount from working. We're already holding open a socket in that directory, so there's no downside. Thanks-to: Jeff King