Fixed reverting of files which filenames only changed in case
[TortoiseGit.git] / ext / libgit2.patch
blobd4e4bc98ef01b2f98520323a8f249cbb7dbbb1f7
1 Fix for https://github.com/libgit2/libgit2/issues/824
3 include/git2/attr.h | 63 -----------------------------------------------------
4 src/attr_file.h | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++
5 2 files changed, 63 insertions(+), 63 deletions(-)
7 diff --git a/include/git2/attr.h b/include/git2/attr.h
8 index fad7183..9b567b6 100644
9 --- a/include/git2/attr.h
10 +++ b/include/git2/attr.h
11 @@ -20,69 +20,6 @@
12 GIT_BEGIN_DECL
14 /**
15 - * GIT_ATTR_TRUE checks if an attribute is set on. In core git
16 - * parlance, this the value for "Set" attributes.
17 - *
18 - * For example, if the attribute file contains:
19 - *
20 - * *.c foo
21 - *
22 - * Then for file `xyz.c` looking up attribute "foo" gives a value for
23 - * which `GIT_ATTR_TRUE(value)` is true.
24 - */
25 -#define GIT_ATTR_TRUE(attr) ((attr) == git_l_attr__true)
27 -/**
28 - * GIT_ATTR_FALSE checks if an attribute is set off. In core git
29 - * parlance, this is the value for attributes that are "Unset" (not to
30 - * be confused with values that a "Unspecified").
31 - *
32 - * For example, if the attribute file contains:
33 - *
34 - * *.h -foo
35 - *
36 - * Then for file `zyx.h` looking up attribute "foo" gives a value for
37 - * which `GIT_ATTR_FALSE(value)` is true.
38 - */
39 -#define GIT_ATTR_FALSE(attr) ((attr) == git_l_attr__false)
41 -/**
42 - * GIT_ATTR_UNSPECIFIED checks if an attribute is unspecified. This
43 - * may be due to the attribute not being mentioned at all or because
44 - * the attribute was explicitly set unspecified via the `!` operator.
45 - *
46 - * For example, if the attribute file contains:
47 - *
48 - * *.c foo
49 - * *.h -foo
50 - * onefile.c !foo
51 - *
52 - * Then for `onefile.c` looking up attribute "foo" yields a value with
53 - * `GIT_ATTR_UNSPECIFIED(value)` of true. Also, looking up "foo" on
54 - * file `onefile.rb` or looking up "bar" on any file will all give
55 - * `GIT_ATTR_UNSPECIFIED(value)` of true.
56 - */
57 -#define GIT_ATTR_UNSPECIFIED(attr) (!(attr) || (attr) == git_l_attr__unset)
59 -/**
60 - * GIT_ATTR_HAS_VALUE checks if an attribute is set to a value (as
61 - * opposed to TRUE, FALSE or UNSPECIFIED). This would be the case if
62 - * for a file with something like:
63 - *
64 - * *.txt eol=lf
65 - *
66 - * Given this, looking up "eol" for `onefile.txt` will give back the
67 - * string "lf" and `GIT_ATTR_SET_TO_VALUE(attr)` will return true.
68 - */
69 -#define GIT_ATTR_HAS_VALUE(attr) \
70 - ((attr) && (attr) != git_l_attr__unset && \
71 - (attr) != git_l_attr__true && (attr) != git_attr__false)
73 -GIT_EXTERN(const char *) git_l_attr__true;
74 -GIT_EXTERN(const char *) git_l_attr__false;
75 -GIT_EXTERN(const char *) git_l_attr__unset;
77 -/**
78 * Check attribute flags: Reading values from index and working directory.
80 * When checking attributes, it is possible to check attribute files
81 diff --git a/src/attr_file.h b/src/attr_file.h
82 index 7939f83..fb93e65 100644
83 --- a/src/attr_file.h
84 +++ b/src/attr_file.h
85 @@ -142,4 +142,67 @@ extern int git_attr_assignment__parse(
86 git_vector *assigns,
87 const char **scan);
89 +/**
90 + * GIT_ATTR_TRUE checks if an attribute is set on. In core git
91 + * parlance, this the value for "Set" attributes.
92 + *
93 + * For example, if the attribute file contains:
94 + *
95 + * *.c foo
96 + *
97 + * Then for file `xyz.c` looking up attribute "foo" gives a value for
98 + * which `GIT_ATTR_TRUE(value)` is true.
99 + */
100 +#define GIT_ATTR_TRUE(attr) ((attr) == git_l_attr__true)
102 +/**
103 + * GIT_ATTR_FALSE checks if an attribute is set off. In core git
104 + * parlance, this is the value for attributes that are "Unset" (not to
105 + * be confused with values that a "Unspecified").
107 + * For example, if the attribute file contains:
109 + * *.h -foo
111 + * Then for file `zyx.h` looking up attribute "foo" gives a value for
112 + * which `GIT_ATTR_FALSE(value)` is true.
113 + */
114 +#define GIT_ATTR_FALSE(attr) ((attr) == git_l_attr__false)
116 +/**
117 + * GIT_ATTR_UNSPECIFIED checks if an attribute is unspecified. This
118 + * may be due to the attribute not being mentioned at all or because
119 + * the attribute was explicitly set unspecified via the `!` operator.
121 + * For example, if the attribute file contains:
123 + * *.c foo
124 + * *.h -foo
125 + * onefile.c !foo
127 + * Then for `onefile.c` looking up attribute "foo" yields a value with
128 + * `GIT_ATTR_UNSPECIFIED(value)` of true. Also, looking up "foo" on
129 + * file `onefile.rb` or looking up "bar" on any file will all give
130 + * `GIT_ATTR_UNSPECIFIED(value)` of true.
131 + */
132 +#define GIT_ATTR_UNSPECIFIED(attr) (!(attr) || (attr) == git_l_attr__unset)
134 +/**
135 + * GIT_ATTR_HAS_VALUE checks if an attribute is set to a value (as
136 + * opposed to TRUE, FALSE or UNSPECIFIED). This would be the case if
137 + * for a file with something like:
139 + * *.txt eol=lf
141 + * Given this, looking up "eol" for `onefile.txt` will give back the
142 + * string "lf" and `GIT_ATTR_SET_TO_VALUE(attr)` will return true.
143 + */
144 +#define GIT_ATTR_HAS_VALUE(attr) \
145 + ((attr) && (attr) != git_l_attr__unset && \
146 + (attr) != git_l_attr__true && (attr) != git_attr__false)
148 +GIT_EXTERN(const char *) git_l_attr__true;
149 +GIT_EXTERN(const char *) git_l_attr__false;
150 +GIT_EXTERN(const char *) git_l_attr__unset;
152 #endif