Skip to content

Commit 177dcfc

Browse files
committed
path: hide the dotgit file functions
These can't go into the public API yet as we don't want to introduce API or ABI changes in a security release.
1 parent 0aa65f8 commit 177dcfc

File tree

3 files changed

+21
-39
lines changed

3 files changed

+21
-39
lines changed

include/git2/sys/path.h

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/path.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,4 +644,25 @@ extern bool git_path_isvalid(
644644
*/
645645
int git_path_normalize_slashes(git_buf *out, const char *path);
646646

647+
/**
648+
* Check whether a path component corresponds to a .gitmodules file
649+
*
650+
* @param name the path component to check
651+
*/
652+
extern int git_path_is_dotgit_modules(const char *name);
653+
654+
/**
655+
* Check whether a path component corresponds to a .gitignore file
656+
*
657+
* @param name the path component to check
658+
*/
659+
extern int git_path_is_dotgit_ignore(const char *name);
660+
661+
/**
662+
* Check whether a path component corresponds to a .gitignore file
663+
*
664+
* @param name the path component to check
665+
*/
666+
extern int git_path_is_dotgit_attributes(const char *name);
667+
647668
#endif

tests/path/dotgit.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include "clar_libgit2.h"
22
#include "path.h"
33

4-
#include "git2/sys/path.h"
5-
64
static char *gitmodules_altnames[] = {
75
".gitmodules",
86

0 commit comments

Comments
 (0)