On Thu, Apr 14, 2016 at 1:47 AM, David Turner <dturner@xxxxxxxxxxxxxxxx> wrote: > On Wed, 2016-04-13 at 20:43 +0700, Duy Nguyen wrote: >> On Wed, Apr 13, 2016 at 7:32 AM, David Turner < >> dturner@xxxxxxxxxxxxxxxx> wrote: >> > +NOTES >> > +----- >> > + >> > +$GIT_DIR/index-helper.path is a symlink >> >> In multiple worktree context, this file will be per-worktree. So we >> have one daemon per worktree. I think that's fine. >> >> > to a directory in $TMPDIR >> > +containing a Unix domain socket called 's' that the daemon reads >> > +commands from. >> >> Oops. I stand corrected, now it's one daemon per repository... >> Probably good to hide the socket path in $GIT_DIR though, people may >> protect it with dir permission of one of ancestor directories. > > I'm not sure I understand what you're saying here. It should be one > daemon per worktree, I think. And as far as I know, it is. No you're right, it's still per worktree. I assumed $GIT_DIR/index-helper.path points to the same $TMPDIR, but it's not. > Socket paths must be short (less than 104 chars on Mac). That's why I > do the weird symlink-to-tmpdir thing. Is relative path in sun_path portable? We could just chdir() there, open the socket and chdir() back. Though if the current solution's already good enough, I don't think we need to change this again. Hmm.. googling a bit pointed me back to Jeff's patch that does exactly that. The commit is 1eb10f4 (unix-socket: handle long socket pathnames - 2012-01-09). It does not mention Mac though, neither does the related discussion on mailing list.. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html