1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
/**
* @file git2/sys/path.h
* @brief Custom path handling
* @defgroup git_path Custom path handling
* @ingroup Git
*
* Merge will take two commits and attempt to produce a commit that
* includes the changes that were made in both branches.
* @{
*/
/**
* The kinds of git-specific files we know about.
*
* The order needs to stay the same to not break the `gitfiles`
* array in path.c
*/
typedef enum git_path_gitfile;
/**
* The kinds of checks to perform according to which filesystem we are trying to
* protect.
*/
typedef enum git_path_fs;
/**
* Check whether a path component corresponds to a .git$SUFFIX
* file.
*
* As some filesystems do special things to filenames when
* writing files to disk, you cannot always do a plain string
* comparison to verify whether a file name matches an expected
* path or not. This function can do the comparison for you,
* depending on the filesystem you're on.
*
* @param path the path component to check
* @param pathlen the length of `path` that is to be checked
* @param gitfile which file to check against
* @param fs which filesystem-specific checks to use
* @return 0 in case the file does not match, a positive value if
* it does; -1 in case of an error
*/
;
/** @} */