rugged 1.9.4 → 1.9.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rugged/version.rb +1 -1
  3. data/vendor/libgit2/CMakeLists.txt +1 -1
  4. data/vendor/libgit2/COPYING +83 -11
  5. data/vendor/libgit2/cmake/SelectRegex.cmake +8 -3
  6. data/vendor/libgit2/deps/pcre2/CMakeLists.txt +110 -0
  7. data/vendor/libgit2/deps/pcre2/LICENCE.md +104 -0
  8. data/vendor/libgit2/deps/pcre2/config.h.in +54 -0
  9. data/vendor/libgit2/deps/pcre2/pcre2.h +1079 -0
  10. data/vendor/libgit2/deps/pcre2/pcre2_auto_possess.c +1416 -0
  11. data/vendor/libgit2/deps/{pcre/pcre_chartables.c → pcre2/pcre2_chartables.c} +41 -47
  12. data/vendor/libgit2/deps/{pcre/pcre_ord2utf8.c → pcre2/pcre2_chkdint.c} +36 -36
  13. data/vendor/libgit2/deps/pcre2/pcre2_compile.c +11345 -0
  14. data/vendor/libgit2/deps/pcre2/pcre2_compile.h +356 -0
  15. data/vendor/libgit2/deps/pcre2/pcre2_compile_cgroup.c +632 -0
  16. data/vendor/libgit2/deps/pcre2/pcre2_compile_class.c +2777 -0
  17. data/vendor/libgit2/deps/pcre2/pcre2_config.c +250 -0
  18. data/vendor/libgit2/deps/pcre2/pcre2_context.c +557 -0
  19. data/vendor/libgit2/deps/pcre2/pcre2_convert.c +1263 -0
  20. data/vendor/libgit2/deps/{pcre/pcre_dfa_exec.c → pcre2/pcre2_dfa_match.c} +1402 -943
  21. data/vendor/libgit2/deps/pcre2/pcre2_error.c +384 -0
  22. data/vendor/libgit2/deps/pcre2/pcre2_extuni.c +159 -0
  23. data/vendor/libgit2/deps/pcre2/pcre2_find_bracket.c +217 -0
  24. data/vendor/libgit2/deps/pcre2/pcre2_fuzzsupport.c +844 -0
  25. data/vendor/libgit2/deps/pcre2/pcre2_internal.h +2353 -0
  26. data/vendor/libgit2/deps/pcre2/pcre2_intmodedep.h +1044 -0
  27. data/vendor/libgit2/deps/pcre2/pcre2_maketables.c +177 -0
  28. data/vendor/libgit2/deps/pcre2/pcre2_match.c +8244 -0
  29. data/vendor/libgit2/deps/pcre2/pcre2_match_data.c +184 -0
  30. data/vendor/libgit2/deps/pcre2/pcre2_match_next.c +171 -0
  31. data/vendor/libgit2/deps/{pcre/pcre_newline.c → pcre2/pcre2_newline.c} +92 -63
  32. data/vendor/libgit2/deps/{pcre/pcre_refcount.c → pcre2/pcre2_ord2utf.c} +64 -38
  33. data/vendor/libgit2/deps/pcre2/pcre2_pattern_info.c +430 -0
  34. data/vendor/libgit2/deps/pcre2/pcre2_printint_inc.h +1098 -0
  35. data/vendor/libgit2/deps/pcre2/pcre2_script_run.c +344 -0
  36. data/vendor/libgit2/deps/pcre2/pcre2_serialize.c +284 -0
  37. data/vendor/libgit2/deps/pcre2/pcre2_string_utils.c +199 -0
  38. data/vendor/libgit2/deps/pcre2/pcre2_study.c +2087 -0
  39. data/vendor/libgit2/deps/pcre2/pcre2_substitute.c +1761 -0
  40. data/vendor/libgit2/deps/pcre2/pcre2_substring.c +553 -0
  41. data/vendor/libgit2/deps/pcre2/pcre2_tables.c +310 -0
  42. data/vendor/libgit2/deps/pcre2/pcre2_ucd.c +5805 -0
  43. data/vendor/libgit2/deps/pcre2/pcre2_ucp.h +408 -0
  44. data/vendor/libgit2/deps/pcre2/pcre2_ucptables_inc.h +1596 -0
  45. data/vendor/libgit2/deps/pcre2/pcre2_util.h +179 -0
  46. data/vendor/libgit2/deps/pcre2/pcre2_valid_utf.c +397 -0
  47. data/vendor/libgit2/deps/pcre2/pcre2_xclass.c +547 -0
  48. data/vendor/libgit2/include/git2/common.h +13 -1
  49. data/vendor/libgit2/include/git2/version.h +2 -2
  50. data/vendor/libgit2/src/libgit2/blame.c +6 -0
  51. data/vendor/libgit2/src/libgit2/delta.c +8 -0
  52. data/vendor/libgit2/src/libgit2/indexer.c +3 -2
  53. data/vendor/libgit2/src/libgit2/settings.c +9 -0
  54. data/vendor/libgit2/src/libgit2/streams/openssl.c +4 -1
  55. data/vendor/libgit2/src/libgit2/submodule.c +77 -12
  56. data/vendor/libgit2/src/libgit2/transports/http.c +4 -4
  57. data/vendor/libgit2/src/libgit2/transports/smart_pkt.c +2 -1
  58. data/vendor/libgit2/src/util/fs_path.h +10 -10
  59. data/vendor/libgit2/src/util/regexp.c +27 -12
  60. data/vendor/libgit2/src/util/regexp.h +7 -2
  61. metadata +44 -37
  62. data/vendor/libgit2/deps/pcre/CMakeLists.txt +0 -140
  63. data/vendor/libgit2/deps/pcre/COPYING +0 -5
  64. data/vendor/libgit2/deps/pcre/LICENCE +0 -93
  65. data/vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS +0 -22
  66. data/vendor/libgit2/deps/pcre/cmake/FindEditline.cmake +0 -17
  67. data/vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake +0 -58
  68. data/vendor/libgit2/deps/pcre/cmake/FindReadline.cmake +0 -29
  69. data/vendor/libgit2/deps/pcre/config.h.in +0 -57
  70. data/vendor/libgit2/deps/pcre/pcre.h +0 -641
  71. data/vendor/libgit2/deps/pcre/pcre_byte_order.c +0 -319
  72. data/vendor/libgit2/deps/pcre/pcre_compile.c +0 -9815
  73. data/vendor/libgit2/deps/pcre/pcre_config.c +0 -190
  74. data/vendor/libgit2/deps/pcre/pcre_exec.c +0 -7173
  75. data/vendor/libgit2/deps/pcre/pcre_fullinfo.c +0 -245
  76. data/vendor/libgit2/deps/pcre/pcre_get.c +0 -669
  77. data/vendor/libgit2/deps/pcre/pcre_globals.c +0 -86
  78. data/vendor/libgit2/deps/pcre/pcre_internal.h +0 -2787
  79. data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +0 -11913
  80. data/vendor/libgit2/deps/pcre/pcre_maketables.c +0 -156
  81. data/vendor/libgit2/deps/pcre/pcre_printint.c +0 -834
  82. data/vendor/libgit2/deps/pcre/pcre_string_utils.c +0 -211
  83. data/vendor/libgit2/deps/pcre/pcre_study.c +0 -1686
  84. data/vendor/libgit2/deps/pcre/pcre_tables.c +0 -727
  85. data/vendor/libgit2/deps/pcre/pcre_ucd.c +0 -3644
  86. data/vendor/libgit2/deps/pcre/pcre_valid_utf8.c +0 -301
  87. data/vendor/libgit2/deps/pcre/pcre_version.c +0 -98
  88. data/vendor/libgit2/deps/pcre/pcre_xclass.c +0 -268
  89. data/vendor/libgit2/deps/pcre/pcreposix.c +0 -420
  90. data/vendor/libgit2/deps/pcre/pcreposix.h +0 -117
  91. data/vendor/libgit2/deps/pcre/ucp.h +0 -224
@@ -0,0 +1,250 @@
1
+ /*************************************************
2
+ * Perl-Compatible Regular Expressions *
3
+ *************************************************/
4
+
5
+ /* PCRE is a library of functions to support regular expressions whose syntax
6
+ and semantics are as close as possible to those of the Perl 5 language.
7
+
8
+ Written by Philip Hazel
9
+ Original API code Copyright (c) 1997-2012 University of Cambridge
10
+ New API code Copyright (c) 2016-2020 University of Cambridge
11
+
12
+ -----------------------------------------------------------------------------
13
+ Redistribution and use in source and binary forms, with or without
14
+ modification, are permitted provided that the following conditions are met:
15
+
16
+ * Redistributions of source code must retain the above copyright notice,
17
+ this list of conditions and the following disclaimer.
18
+
19
+ * Redistributions in binary form must reproduce the above copyright
20
+ notice, this list of conditions and the following disclaimer in the
21
+ documentation and/or other materials provided with the distribution.
22
+
23
+ * Neither the name of the University of Cambridge nor the names of its
24
+ contributors may be used to endorse or promote products derived from
25
+ this software without specific prior written permission.
26
+
27
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37
+ POSSIBILITY OF SUCH DAMAGE.
38
+ -----------------------------------------------------------------------------
39
+ */
40
+
41
+
42
+ #include "pcre2_internal.h"
43
+
44
+
45
+
46
+ /* These macros are the standard way of turning unquoted text into C strings.
47
+ They allow macros like PCRE2_MAJOR to be defined without quotes, which is
48
+ convenient for user programs that want to test their values. */
49
+
50
+ #define STRING(a) # a
51
+ #define XSTRING(s) STRING(s)
52
+
53
+
54
+ /*************************************************
55
+ * Return info about what features are configured *
56
+ *************************************************/
57
+
58
+ /* If where is NULL, the length of memory required is returned.
59
+
60
+ Arguments:
61
+ what what information is required
62
+ where where to put the information
63
+
64
+ Returns: 0 if a numerical value is returned
65
+ >= 0 if a string value
66
+ PCRE2_ERROR_BADOPTION if "where" not recognized
67
+ or JIT target requested when JIT not enabled
68
+ */
69
+
70
+ PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
71
+ pcre2_config(uint32_t what, void *where)
72
+ {
73
+ if (where == NULL) /* Requests a length */
74
+ {
75
+ switch (what)
76
+ {
77
+ default:
78
+ return PCRE2_ERROR_BADOPTION;
79
+
80
+ case PCRE2_CONFIG_BSR:
81
+ case PCRE2_CONFIG_COMPILED_WIDTHS:
82
+ case PCRE2_CONFIG_DEPTHLIMIT:
83
+ case PCRE2_CONFIG_EFFECTIVE_LINKSIZE:
84
+ case PCRE2_CONFIG_HEAPLIMIT:
85
+ case PCRE2_CONFIG_JIT:
86
+ case PCRE2_CONFIG_LINKSIZE:
87
+ case PCRE2_CONFIG_MATCHLIMIT:
88
+ case PCRE2_CONFIG_NEVER_BACKSLASH_C:
89
+ case PCRE2_CONFIG_NEWLINE:
90
+ case PCRE2_CONFIG_PARENSLIMIT:
91
+ case PCRE2_CONFIG_STACKRECURSE: /* Obsolete */
92
+ case PCRE2_CONFIG_TABLES_LENGTH:
93
+ case PCRE2_CONFIG_UNICODE:
94
+ return sizeof(uint32_t);
95
+
96
+ /* These are handled below */
97
+
98
+ case PCRE2_CONFIG_JITTARGET:
99
+ case PCRE2_CONFIG_UNICODE_VERSION:
100
+ case PCRE2_CONFIG_VERSION:
101
+ break;
102
+ }
103
+ }
104
+
105
+ switch (what)
106
+ {
107
+ default:
108
+ return PCRE2_ERROR_BADOPTION;
109
+
110
+ case PCRE2_CONFIG_BSR:
111
+ #ifdef BSR_ANYCRLF
112
+ *((uint32_t *)where) = PCRE2_BSR_ANYCRLF;
113
+ #else
114
+ *((uint32_t *)where) = PCRE2_BSR_UNICODE;
115
+ #endif
116
+ break;
117
+
118
+ case PCRE2_CONFIG_COMPILED_WIDTHS:
119
+ *((uint32_t *)where) = 0
120
+ #ifdef SUPPORT_PCRE2_8
121
+ + (1 << 0)
122
+ #endif
123
+ #ifdef SUPPORT_PCRE2_16
124
+ + (1 << 1)
125
+ #endif
126
+ #ifdef SUPPORT_PCRE2_32
127
+ + (1 << 2)
128
+ #endif
129
+ ;
130
+ break;
131
+
132
+ case PCRE2_CONFIG_DEPTHLIMIT:
133
+ *((uint32_t *)where) = MATCH_LIMIT_DEPTH;
134
+ break;
135
+
136
+ case PCRE2_CONFIG_EFFECTIVE_LINKSIZE:
137
+ *((uint32_t *)where) = LINK_SIZE * sizeof(PCRE2_UCHAR);
138
+ break;
139
+
140
+ case PCRE2_CONFIG_HEAPLIMIT:
141
+ *((uint32_t *)where) = HEAP_LIMIT;
142
+ break;
143
+
144
+ case PCRE2_CONFIG_JIT:
145
+ #ifdef SUPPORT_JIT
146
+ *((uint32_t *)where) = 1;
147
+ #else
148
+ *((uint32_t *)where) = 0;
149
+ #endif
150
+ break;
151
+
152
+ case PCRE2_CONFIG_JITTARGET:
153
+ #ifdef SUPPORT_JIT
154
+ {
155
+ const char *v = PRIV(jit_get_target)();
156
+ return (int)(1 + ((where == NULL)?
157
+ strlen(v) : PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v)));
158
+ }
159
+ #else
160
+ return PCRE2_ERROR_BADOPTION;
161
+ #endif
162
+
163
+ case PCRE2_CONFIG_LINKSIZE:
164
+ *((uint32_t *)where) = (uint32_t)CONFIGURED_LINK_SIZE;
165
+ break;
166
+
167
+ case PCRE2_CONFIG_MATCHLIMIT:
168
+ *((uint32_t *)where) = MATCH_LIMIT;
169
+ break;
170
+
171
+ case PCRE2_CONFIG_NEWLINE:
172
+ *((uint32_t *)where) = NEWLINE_DEFAULT;
173
+ break;
174
+
175
+ case PCRE2_CONFIG_NEVER_BACKSLASH_C:
176
+ #ifdef NEVER_BACKSLASH_C
177
+ *((uint32_t *)where) = 1;
178
+ #else
179
+ *((uint32_t *)where) = 0;
180
+ #endif
181
+ break;
182
+
183
+ case PCRE2_CONFIG_PARENSLIMIT:
184
+ *((uint32_t *)where) = PARENS_NEST_LIMIT;
185
+ break;
186
+
187
+ /* This is now obsolete. The stack is no longer used via recursion for
188
+ handling backtracking in pcre2_match(). */
189
+
190
+ case PCRE2_CONFIG_STACKRECURSE:
191
+ *((uint32_t *)where) = 0;
192
+ break;
193
+
194
+ case PCRE2_CONFIG_TABLES_LENGTH:
195
+ *((uint32_t *)where) = TABLES_LENGTH;
196
+ break;
197
+
198
+ case PCRE2_CONFIG_UNICODE_VERSION:
199
+ {
200
+ #if defined SUPPORT_UNICODE
201
+ const char *v = PRIV(unicode_version);
202
+ #else
203
+ const char *v = "Unicode not supported";
204
+ #endif
205
+ return (int)(1 + ((where == NULL)?
206
+ strlen(v) : PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v)));
207
+ }
208
+
209
+ case PCRE2_CONFIG_UNICODE:
210
+ #if defined SUPPORT_UNICODE
211
+ *((uint32_t *)where) = 1;
212
+ #else
213
+ *((uint32_t *)where) = 0;
214
+ #endif
215
+ break;
216
+
217
+ /* The hackery in setting "v" below is to cope with the case when
218
+ PCRE2_PRERELEASE is set to an empty string (which it is for real releases).
219
+ If the second alternative is used in this case, it does not leave a space
220
+ before the date. On the other hand, if all four macros are put into a single
221
+ XSTRING when PCRE2_PRERELEASE is not empty, an unwanted space is inserted.
222
+ There are problems using an "obvious" approach like this:
223
+
224
+ XSTRING(PCRE2_MAJOR) "." XSTRING(PCRE2_MINOR)
225
+ XSTRING(PCRE2_PRERELEASE) " " XSTRING(PCRE2_DATE)
226
+
227
+ because, when PCRE2_PRERELEASE is empty, this leads to an attempted expansion
228
+ of STRING(). The C standard states: "If (before argument substitution) any
229
+ argument consists of no preprocessing tokens, the behavior is undefined." It
230
+ turns out the gcc treats this case as a single empty string - which is what
231
+ we really want - but Visual C grumbles about the lack of an argument for the
232
+ macro. Unfortunately, both are within their rights. As there seems to be no
233
+ way to test for a macro's value being empty at compile time, we have to
234
+ resort to a runtime test. */
235
+
236
+ case PCRE2_CONFIG_VERSION:
237
+ {
238
+ const char *v = (XSTRING(Z PCRE2_PRERELEASE)[1] == 0)?
239
+ XSTRING(PCRE2_MAJOR.PCRE2_MINOR PCRE2_DATE) :
240
+ XSTRING(PCRE2_MAJOR.PCRE2_MINOR) XSTRING(PCRE2_PRERELEASE PCRE2_DATE);
241
+ return (int)(1 + ((where == NULL)?
242
+ strlen(v) : PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v)));
243
+ }
244
+
245
+ }
246
+
247
+ return 0;
248
+ }
249
+
250
+ /* End of pcre2_config.c */