File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed
Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) the libgit2 contributors. All rights reserved.
3+ *
4+ * This file is part of libgit2, distributed under the GNU GPL v2 with
5+ * a Linking Exception. For full terms see the included COPYING file.
6+ */
7+ #ifndef INCLUDE_sys_git_path_h__
8+ #define INCLUDE_sys_git_path_h__
9+
10+ #include "git2/common.h"
11+ #include "git2/types.h"
12+
13+ GIT_BEGIN_DECL
14+
15+ /**
16+ * Check whether a path component corresponds to a .gitmodules file
17+ *
18+ * @param name the path component to check
19+ */
20+ GIT_EXTERN (int ) git_path_is_dotgit_modules (const char * name );
21+
22+ /**
23+ * Check whether a path component corresponds to a .gitignore file
24+ *
25+ * @param name the path component to check
26+ */
27+ GIT_EXTERN (int ) git_path_is_dotgit_ignore (const char * name );
28+
29+ /**
30+ * Check whether a path component corresponds to a .gitignore file
31+ *
32+ * @param name the path component to check
33+ */
34+ GIT_EXTERN (int ) git_path_is_dotgit_attributes (const char * name );
35+
36+ GIT_END_DECL
37+ #endif
Original file line number Diff line number Diff line change @@ -1854,3 +1854,13 @@ int git_path_is_dotgit_modules(const char *name)
18541854{
18551855 return !verify_dotgit_generic (name , "gitmodules" , "gi7eba" );
18561856}
1857+
1858+ int git_path_is_dotgit_ignore (const char * name )
1859+ {
1860+ return !verify_dotgit_generic (name , "gitignore" , "gi250a" );
1861+ }
1862+
1863+ int git_path_is_dotgit_attributes (const char * name )
1864+ {
1865+ return !verify_dotgit_generic (name , "gitattributes" , "gi7d29" );
1866+ }
You can’t perform that action at this time.
0 commit comments