git/compat/fsmonitor/fsm-ipc-win32.c
Jeff King 00df20a7ab 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>
2023-09-18 15:56:14 -07:00

12 lines
251 B
C

#include "git-compat-util.h"
#include "config.h"
#include "fsmonitor-ipc.h"
#include "path.h"
const char *fsmonitor_ipc__get_path(struct repository *r) {
static char *ret;
if (!ret)
ret = repo_git_path(r, "fsmonitor--daemon.ipc");
return ret;
}