From: Duy Nguyen Date: Mon, 10 Feb 2014 23:34:52 GMT Subject: Re: [PATCH v3 00/26] inotify support Message-ID: In-Reply-To: <52F90483.7050206@web.de> On Mon, Feb 10, 2014 at 11:55 PM, Torsten Bögershausen wrote: > On 2014-02-10 11.37, Duy Nguyen wrote: >>> >>> Could we use relative path names internally, relative to $GIT_DIR ? >> >> No because this is when the client tell the server about $GIT_DIR. I >> guess we can use realpath(1) here. > Good. > > I realized that the watcher can watch several repos at the same time. > > However, we could allow relative path names, which will be relative to $SOCKET_DIR, > and loosen the demand for an absolut path name a little bit. > And $SOCKET_DIR can be the same as $GIT_DIR, when we are watching only one repo. It does not help much anyway because file-watcher-lib.c sends get_git_work_tree(), which is absolute/normalized path, to file-watcher. There's no sources of sending $GIT_DIR relative to $SOCKET_DIR (and I don't think we want to make get_git_work_tree() relative before sending, it's more work on both sides we no benefits, except for tracing). -- Duy