]> git.ipfire.org Git - thirdparty/git.git/commit - fsmonitor.c
fsmonitor: set the PWD to the top of the working tree
authorAlex Vandiver <alexmv@dropbox.com>
Fri, 27 Oct 2017 23:26:34 +0000 (16:26 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Oct 2017 02:45:51 +0000 (11:45 +0900)
commit11cf33bec62512f2c3f0bdcfdaa41e31e9b0c3e8
treecdac40433e00089d77b763dec26033b82348d0cb
parent614a718a797e04fb037b25371896f910e464b671
fsmonitor: set the PWD to the top of the working tree

The fsmonitor command inherits the PWD of its caller, which may be
anywhere in the working copy.  This makes is difficult for the
fsmonitor command to operate on the whole repository.  Specifically,
for the watchman integration, this causes each subdirectory to get its
own watch entry.

Set the CWD to the top of the working directory, for consistency.

Signed-off-by: Alex Vandiver <alexmv@dropbox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fsmonitor.c