]> git.ipfire.org Git - thirdparty/git.git/commit - path.c
path.c: add git_common_path() and strbuf_git_common_path()
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 22 Apr 2016 13:01:25 +0000 (20:01 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Apr 2016 21:09:37 +0000 (14:09 -0700)
commit15cdfea734ffce99d930e8e8016787b57ac47386
tree0a13e0dab1ded2082126a48d874b0db95dd6fe41
parentba0897e6ae6b0b3f259efb31be0f1ab3d820aacf
path.c: add git_common_path() and strbuf_git_common_path()

These are mostly convenient functions to reduce code duplication. Most
of the time, we should be able to get by with git_path() which handles
$GIT_COMMON_DIR internally. However there are a few cases where we need
to construct paths manually, for example some paths from a specific
worktree. These functions will enable that.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
path.c