fsmonitor: prefer repo_git_path() to git_pathdup()

The fsmonitor_ipc__get_path() function ignores its repository argument. It should use it when constructing repo paths (though in practice, it is unlikely anything but the_repository is ever passed, so this is cleanup and future proofing, not a bug fix). Note that despite the lack of "dup" in the name, repo_git_path() behaves like git_pathdup() and returns an allocated string. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Sep 18, 2023 at 18:29 UTC 00df20a7ab4a4de355f69157acfd2502ab58a3aa
1 file changed +1 -1
compat/fsmonitor/fsm-ipc-win32.c
+1 -1
@@ -6,6 +6,6 @@
6 const char *fsmonitor_ipc__get_path(struct repository *r) {
7 static char *ret;
8 if (!ret)
9 - ret = git_pathdup("fsmonitor--daemon.ipc");
9 + ret = repo_git_path(r, "fsmonitor--daemon.ipc");
10 return ret;
11 }