summaryrefslogtreecommitdiffstats
path: root/path.h
Commit message (Collapse)AuthorAgeFilesLines
* Add missing includes and forward declarationsElijah Newren2018-08-151-0/+1
| | | | | | | | | | | | I looped over the toplevel header files, creating a temporary two-line C program for each consisting of #include "git-compat-util.h" #include $HEADER This patch is the result of manually fixing errors in compiling those tiny programs. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'bb/pedantic'Junio C Hamano2018-07-241-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The codebase has been updated to compile cleanly with -pedantic option. * bb/pedantic: utf8.c: avoid char overflow string-list.c: avoid conversion from void * to function pointer sequencer.c: avoid empty statements at top level convert.c: replace "\e" escapes with "\033". fixup! refs/refs-internal.h: avoid forward declaration of an enum refs/refs-internal.h: avoid forward declaration of an enum fixup! connect.h: avoid forward declaration of an enum connect.h: avoid forward declaration of an enum
| * sequencer.c: avoid empty statements at top levelBeat Bolli2018-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | The macro GIT_PATH_FUNC expands to a function definition that ends with a closing brace. Remove two extra semicolons. While at it, fix the example in path.h. Signed-off-by: Beat Bolli <dev+git@drbeat.li> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | path.c: migrate global git_path_* to take a repository argumentStefan Beller2018-05-181-9/+31
|/ | | | | | | | | | | | | Migrate all git_path_* functions that are defined in path.c to take a repository argument. Unlike other patches in this series, do not use the #define trick, as we rewrite the whole function, which is rather small. This doesn't migrate all the functions, as other builtins have their own local path functions defined using GIT_PATH_FUNC. So keep that macro around to serve the other locations. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* path: document path functionsBrandon Williams2017-12-131-21/+112
| | | | | Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* path: add repo_worktree_path and strbuf_repo_worktree_pathBrandon Williams2017-06-231-0/+8
| | | | | | | | | Introduce 'repo_worktree_path' and 'strbuf_repo_worktree_path' which take a repository struct and constructs a path relative to the repository's worktree. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* path: add repo_git_path and strbuf_repo_git_pathBrandon Williams2017-06-231-0/+8
| | | | | | | | | Introduce 'repo_git_path' and 'strbuf_repo_git_path' which take a repository struct and constructs a path into the repository's git directory. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* path: convert strbuf_git_common_path to take a 'struct repository'Brandon Williams2017-06-231-2/+6
| | | | | Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* path: create path.hBrandon Williams2017-06-231-0/+62
Move all path related declarations from cache.h to a new path.h header file. This makes cache.h smaller and makes it easier to add new path related functions. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>