rugged 1.9.0 → 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 (188) hide show
  1. checksums.yaml +4 -4
  2. data/ext/rugged/extconf.rb +4 -4
  3. data/ext/rugged/rugged.c +12 -1
  4. data/ext/rugged/rugged_blame.c +22 -6
  5. data/ext/rugged/rugged_blob.c +24 -9
  6. data/ext/rugged/rugged_branch.c +10 -7
  7. data/ext/rugged/rugged_branch_collection.c +8 -6
  8. data/ext/rugged/rugged_commit.c +7 -6
  9. data/ext/rugged/rugged_config.c +20 -11
  10. data/ext/rugged/rugged_diff.c +26 -12
  11. data/ext/rugged/rugged_diff_hunk.c +2 -1
  12. data/ext/rugged/rugged_index.c +39 -29
  13. data/ext/rugged/rugged_note.c +7 -6
  14. data/ext/rugged/rugged_object.c +3 -2
  15. data/ext/rugged/rugged_patch.c +23 -9
  16. data/ext/rugged/rugged_rebase.c +22 -10
  17. data/ext/rugged/rugged_reference.c +22 -13
  18. data/ext/rugged/rugged_reference_collection.c +9 -7
  19. data/ext/rugged/rugged_remote.c +23 -12
  20. data/ext/rugged/rugged_remote_collection.c +11 -9
  21. data/ext/rugged/rugged_repo.c +60 -45
  22. data/ext/rugged/rugged_revwalk.c +22 -12
  23. data/ext/rugged/rugged_submodule.c +23 -20
  24. data/ext/rugged/rugged_submodule_collection.c +20 -9
  25. data/ext/rugged/rugged_tag.c +6 -4
  26. data/ext/rugged/rugged_tag_collection.c +7 -5
  27. data/ext/rugged/rugged_tree.c +27 -15
  28. data/lib/rugged/version.rb +1 -1
  29. data/vendor/libgit2/AUTHORS +2 -0
  30. data/vendor/libgit2/CMakeLists.txt +1 -1
  31. data/vendor/libgit2/COPYING +83 -11
  32. data/vendor/libgit2/cmake/DefaultCFlags.cmake +4 -1
  33. data/vendor/libgit2/cmake/SelectRegex.cmake +8 -3
  34. data/vendor/libgit2/cmake/SelectSSH.cmake +9 -3
  35. data/vendor/libgit2/deps/pcre2/CMakeLists.txt +110 -0
  36. data/vendor/libgit2/deps/pcre2/LICENCE.md +104 -0
  37. data/vendor/libgit2/deps/pcre2/config.h.in +54 -0
  38. data/vendor/libgit2/deps/pcre2/pcre2.h +1079 -0
  39. data/vendor/libgit2/deps/pcre2/pcre2_auto_possess.c +1416 -0
  40. data/vendor/libgit2/deps/{pcre/pcre_chartables.c → pcre2/pcre2_chartables.c} +41 -47
  41. data/vendor/libgit2/deps/{pcre/pcre_ord2utf8.c → pcre2/pcre2_chkdint.c} +36 -36
  42. data/vendor/libgit2/deps/pcre2/pcre2_compile.c +11345 -0
  43. data/vendor/libgit2/deps/pcre2/pcre2_compile.h +356 -0
  44. data/vendor/libgit2/deps/pcre2/pcre2_compile_cgroup.c +632 -0
  45. data/vendor/libgit2/deps/pcre2/pcre2_compile_class.c +2777 -0
  46. data/vendor/libgit2/deps/pcre2/pcre2_config.c +250 -0
  47. data/vendor/libgit2/deps/pcre2/pcre2_context.c +557 -0
  48. data/vendor/libgit2/deps/pcre2/pcre2_convert.c +1263 -0
  49. data/vendor/libgit2/deps/{pcre/pcre_dfa_exec.c → pcre2/pcre2_dfa_match.c} +1402 -943
  50. data/vendor/libgit2/deps/pcre2/pcre2_error.c +384 -0
  51. data/vendor/libgit2/deps/pcre2/pcre2_extuni.c +159 -0
  52. data/vendor/libgit2/deps/pcre2/pcre2_find_bracket.c +217 -0
  53. data/vendor/libgit2/deps/pcre2/pcre2_fuzzsupport.c +844 -0
  54. data/vendor/libgit2/deps/pcre2/pcre2_internal.h +2353 -0
  55. data/vendor/libgit2/deps/pcre2/pcre2_intmodedep.h +1044 -0
  56. data/vendor/libgit2/deps/pcre2/pcre2_maketables.c +177 -0
  57. data/vendor/libgit2/deps/pcre2/pcre2_match.c +8244 -0
  58. data/vendor/libgit2/deps/pcre2/pcre2_match_data.c +184 -0
  59. data/vendor/libgit2/deps/pcre2/pcre2_match_next.c +171 -0
  60. data/vendor/libgit2/deps/{pcre/pcre_newline.c → pcre2/pcre2_newline.c} +92 -63
  61. data/vendor/libgit2/deps/{pcre/pcre_refcount.c → pcre2/pcre2_ord2utf.c} +64 -38
  62. data/vendor/libgit2/deps/pcre2/pcre2_pattern_info.c +430 -0
  63. data/vendor/libgit2/deps/pcre2/pcre2_printint_inc.h +1098 -0
  64. data/vendor/libgit2/deps/pcre2/pcre2_script_run.c +344 -0
  65. data/vendor/libgit2/deps/pcre2/pcre2_serialize.c +284 -0
  66. data/vendor/libgit2/deps/pcre2/pcre2_string_utils.c +199 -0
  67. data/vendor/libgit2/deps/pcre2/pcre2_study.c +2087 -0
  68. data/vendor/libgit2/deps/pcre2/pcre2_substitute.c +1761 -0
  69. data/vendor/libgit2/deps/pcre2/pcre2_substring.c +553 -0
  70. data/vendor/libgit2/deps/pcre2/pcre2_tables.c +310 -0
  71. data/vendor/libgit2/deps/pcre2/pcre2_ucd.c +5805 -0
  72. data/vendor/libgit2/deps/pcre2/pcre2_ucp.h +408 -0
  73. data/vendor/libgit2/deps/pcre2/pcre2_ucptables_inc.h +1596 -0
  74. data/vendor/libgit2/deps/pcre2/pcre2_util.h +179 -0
  75. data/vendor/libgit2/deps/pcre2/pcre2_valid_utf.c +397 -0
  76. data/vendor/libgit2/deps/pcre2/pcre2_xclass.c +547 -0
  77. data/vendor/libgit2/deps/xdiff/CMakeLists.txt +1 -1
  78. data/vendor/libgit2/deps/xdiff/xmerge.c +14 -10
  79. data/vendor/libgit2/include/git2/common.h +13 -1
  80. data/vendor/libgit2/include/git2/deprecated.h +1 -1
  81. data/vendor/libgit2/include/git2/index.h +1 -1
  82. data/vendor/libgit2/include/git2/merge.h +4 -2
  83. data/vendor/libgit2/include/git2/oid.h +0 -1
  84. data/vendor/libgit2/include/git2/proxy.h +2 -3
  85. data/vendor/libgit2/include/git2/remote.h +19 -7
  86. data/vendor/libgit2/include/git2/stdint.h +1 -1
  87. data/vendor/libgit2/include/git2/sys/transport.h +1 -1
  88. data/vendor/libgit2/include/git2/version.h +4 -2
  89. data/vendor/libgit2/src/cli/CMakeLists.txt +1 -2
  90. data/vendor/libgit2/src/cli/opt.c +3 -3
  91. data/vendor/libgit2/src/cli/opt_usage.c +1 -1
  92. data/vendor/libgit2/src/libgit2/CMakeLists.txt +32 -16
  93. data/vendor/libgit2/src/libgit2/attr_file.c +10 -3
  94. data/vendor/libgit2/src/libgit2/blame.c +6 -0
  95. data/vendor/libgit2/src/libgit2/clone.c +6 -0
  96. data/vendor/libgit2/src/libgit2/commit.c +1 -1
  97. data/vendor/libgit2/src/libgit2/commit_graph.c +1 -2
  98. data/vendor/libgit2/src/libgit2/config.c +1 -1
  99. data/vendor/libgit2/src/libgit2/config_file.c +2 -1
  100. data/vendor/libgit2/src/libgit2/config_mem.c +1 -0
  101. data/vendor/libgit2/src/libgit2/config_parse.c +2 -1
  102. data/vendor/libgit2/src/libgit2/delta.c +13 -1
  103. data/vendor/libgit2/src/libgit2/diff_driver.c +1 -1
  104. data/vendor/libgit2/src/libgit2/diff_stats.c +19 -12
  105. data/vendor/libgit2/src/libgit2/fetchhead.c +1 -1
  106. data/vendor/libgit2/src/libgit2/index.c +8 -8
  107. data/vendor/libgit2/src/libgit2/index.h +3 -0
  108. data/vendor/libgit2/src/libgit2/indexer.c +5 -4
  109. data/vendor/libgit2/src/libgit2/merge.c +1 -1
  110. data/vendor/libgit2/src/libgit2/merge.h +4 -0
  111. data/vendor/libgit2/src/libgit2/merge_file.c +43 -30
  112. data/vendor/libgit2/src/libgit2/message.c +1 -1
  113. data/vendor/libgit2/src/libgit2/midx.c +2 -3
  114. data/vendor/libgit2/src/libgit2/odb.c +2 -6
  115. data/vendor/libgit2/src/libgit2/odb_loose.c +24 -14
  116. data/vendor/libgit2/src/libgit2/oid.c +4 -5
  117. data/vendor/libgit2/src/libgit2/pack-objects.c +2 -4
  118. data/vendor/libgit2/src/libgit2/pack.c +3 -0
  119. data/vendor/libgit2/src/libgit2/refs.c +15 -6
  120. data/vendor/libgit2/src/libgit2/remote.c +4 -1
  121. data/vendor/libgit2/src/libgit2/remote.h +0 -1
  122. data/vendor/libgit2/src/libgit2/repository.c +5 -4
  123. data/vendor/libgit2/src/libgit2/settings.c +9 -0
  124. data/vendor/libgit2/src/libgit2/streams/openssl.c +4 -1
  125. data/vendor/libgit2/src/libgit2/streams/socket.c +30 -0
  126. data/vendor/libgit2/src/libgit2/submodule.c +89 -17
  127. data/vendor/libgit2/src/libgit2/tag.c +3 -1
  128. data/vendor/libgit2/src/libgit2/transports/auth_sspi.c +2 -0
  129. data/vendor/libgit2/src/libgit2/transports/credential.c +1 -1
  130. data/vendor/libgit2/src/libgit2/transports/git.c +1 -1
  131. data/vendor/libgit2/src/libgit2/transports/http.c +4 -4
  132. data/vendor/libgit2/src/libgit2/transports/httpclient.c +12 -9
  133. data/vendor/libgit2/src/libgit2/transports/local.c +8 -1
  134. data/vendor/libgit2/src/libgit2/transports/smart.c +5 -5
  135. data/vendor/libgit2/src/libgit2/transports/smart_pkt.c +5 -4
  136. data/vendor/libgit2/src/libgit2/transports/ssh_exec.c +57 -18
  137. data/vendor/libgit2/src/libgit2/transports/ssh_libssh2.c +3 -3
  138. data/vendor/libgit2/src/util/CMakeLists.txt +3 -4
  139. data/vendor/libgit2/src/util/fs_path.c +66 -6
  140. data/vendor/libgit2/src/util/fs_path.h +16 -10
  141. data/vendor/libgit2/src/util/futils.h +11 -3
  142. data/vendor/libgit2/src/util/hash/builtin.c +14 -4
  143. data/vendor/libgit2/src/util/hash/openssl.c +0 -4
  144. data/vendor/libgit2/src/util/hash/rfc6234/sha224-256.c +8 -6
  145. data/vendor/libgit2/src/util/hashmap.h +1 -0
  146. data/vendor/libgit2/src/util/net.c +5 -5
  147. data/vendor/libgit2/src/util/process.h +2 -1
  148. data/vendor/libgit2/src/util/regexp.c +27 -12
  149. data/vendor/libgit2/src/util/regexp.h +7 -2
  150. data/vendor/libgit2/src/util/runtime.c +2 -2
  151. data/vendor/libgit2/src/util/str.c +18 -6
  152. data/vendor/libgit2/src/util/str.h +5 -3
  153. data/vendor/libgit2/src/util/unix/process.c +92 -15
  154. data/vendor/libgit2/src/util/util.c +16 -3
  155. data/vendor/libgit2/src/util/util.h +1 -0
  156. data/vendor/libgit2/src/util/win32/path_w32.c +81 -5
  157. data/vendor/libgit2/src/util/win32/process.c +22 -6
  158. metadata +59 -41
  159. data/vendor/libgit2/deps/pcre/CMakeLists.txt +0 -141
  160. data/vendor/libgit2/deps/pcre/COPYING +0 -5
  161. data/vendor/libgit2/deps/pcre/LICENCE +0 -93
  162. data/vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS +0 -22
  163. data/vendor/libgit2/deps/pcre/cmake/FindEditline.cmake +0 -17
  164. data/vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake +0 -58
  165. data/vendor/libgit2/deps/pcre/cmake/FindReadline.cmake +0 -29
  166. data/vendor/libgit2/deps/pcre/config.h.in +0 -57
  167. data/vendor/libgit2/deps/pcre/pcre.h +0 -641
  168. data/vendor/libgit2/deps/pcre/pcre_byte_order.c +0 -319
  169. data/vendor/libgit2/deps/pcre/pcre_compile.c +0 -9815
  170. data/vendor/libgit2/deps/pcre/pcre_config.c +0 -190
  171. data/vendor/libgit2/deps/pcre/pcre_exec.c +0 -7173
  172. data/vendor/libgit2/deps/pcre/pcre_fullinfo.c +0 -245
  173. data/vendor/libgit2/deps/pcre/pcre_get.c +0 -669
  174. data/vendor/libgit2/deps/pcre/pcre_globals.c +0 -86
  175. data/vendor/libgit2/deps/pcre/pcre_internal.h +0 -2787
  176. data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +0 -11913
  177. data/vendor/libgit2/deps/pcre/pcre_maketables.c +0 -156
  178. data/vendor/libgit2/deps/pcre/pcre_printint.c +0 -834
  179. data/vendor/libgit2/deps/pcre/pcre_string_utils.c +0 -211
  180. data/vendor/libgit2/deps/pcre/pcre_study.c +0 -1686
  181. data/vendor/libgit2/deps/pcre/pcre_tables.c +0 -727
  182. data/vendor/libgit2/deps/pcre/pcre_ucd.c +0 -3644
  183. data/vendor/libgit2/deps/pcre/pcre_valid_utf8.c +0 -301
  184. data/vendor/libgit2/deps/pcre/pcre_version.c +0 -98
  185. data/vendor/libgit2/deps/pcre/pcre_xclass.c +0 -268
  186. data/vendor/libgit2/deps/pcre/pcreposix.c +0 -420
  187. data/vendor/libgit2/deps/pcre/pcreposix.h +0 -117
  188. data/vendor/libgit2/deps/pcre/ucp.h +0 -224
@@ -0,0 +1,199 @@
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) 2018-2021 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
+ /* This module contains internal functions for comparing and finding the length
43
+ of strings. These are used instead of strcmp() etc because the standard
44
+ functions work only on 8-bit data. */
45
+
46
+
47
+ #include "pcre2_internal.h"
48
+
49
+
50
+
51
+ /*************************************************
52
+ * Compare two zero-terminated PCRE2 strings *
53
+ *************************************************/
54
+
55
+ /*
56
+ Arguments:
57
+ str1 first string
58
+ str2 second string
59
+
60
+ Returns: 0, 1, or -1
61
+ */
62
+
63
+ int
64
+ PRIV(strcmp)(PCRE2_SPTR str1, PCRE2_SPTR str2)
65
+ {
66
+ PCRE2_UCHAR c1, c2;
67
+ while (*str1 != '\0' || *str2 != '\0')
68
+ {
69
+ c1 = *str1++;
70
+ c2 = *str2++;
71
+ if (c1 != c2) return ((c1 > c2) << 1) - 1;
72
+ }
73
+ return 0;
74
+ }
75
+
76
+
77
+ /*************************************************
78
+ * Compare zero-terminated PCRE2 & 8-bit strings *
79
+ *************************************************/
80
+
81
+ /* As the 8-bit string is almost always a literal, its type is specified as
82
+ const char *.
83
+
84
+ Arguments:
85
+ str1 first string
86
+ str2 second string
87
+
88
+ Returns: 0, 1, or -1
89
+ */
90
+
91
+ int
92
+ PRIV(strcmp_c8)(PCRE2_SPTR str1, const char *str2)
93
+ {
94
+ PCRE2_UCHAR c1, c2;
95
+ while (*str1 != '\0' || *str2 != '\0')
96
+ {
97
+ c1 = *str1++;
98
+ c2 = *str2++;
99
+ if (c1 != c2) return ((c1 > c2) << 1) - 1;
100
+ }
101
+ return 0;
102
+ }
103
+
104
+
105
+ /*************************************************
106
+ * Compare two PCRE2 strings, given a length *
107
+ *************************************************/
108
+
109
+ /*
110
+ Arguments:
111
+ str1 first string
112
+ str2 second string
113
+ len the length
114
+
115
+ Returns: 0, 1, or -1
116
+ */
117
+
118
+ int
119
+ PRIV(strncmp)(PCRE2_SPTR str1, PCRE2_SPTR str2, size_t len)
120
+ {
121
+ PCRE2_UCHAR c1, c2;
122
+ for (; len > 0; len--)
123
+ {
124
+ c1 = *str1++;
125
+ c2 = *str2++;
126
+ if (c1 != c2) return ((c1 > c2) << 1) - 1;
127
+ }
128
+ return 0;
129
+ }
130
+
131
+
132
+ /*************************************************
133
+ * Compare PCRE2 string to 8-bit string by length *
134
+ *************************************************/
135
+
136
+ /* As the 8-bit string is almost always a literal, its type is specified as
137
+ const char *.
138
+
139
+ Arguments:
140
+ str1 first string
141
+ str2 second string
142
+ len the length
143
+
144
+ Returns: 0, 1, or -1
145
+ */
146
+
147
+ int
148
+ PRIV(strncmp_c8)(PCRE2_SPTR str1, const char *str2, size_t len)
149
+ {
150
+ PCRE2_UCHAR c1, c2;
151
+ for (; len > 0; len--)
152
+ {
153
+ c1 = *str1++;
154
+ c2 = *str2++;
155
+ if (c1 != c2) return ((c1 > c2) << 1) - 1;
156
+ }
157
+ return 0;
158
+ }
159
+
160
+
161
+ /*************************************************
162
+ * Find the length of a PCRE2 string *
163
+ *************************************************/
164
+
165
+ /*
166
+ Argument: the string
167
+ Returns: the length
168
+ */
169
+
170
+ PCRE2_SIZE
171
+ PRIV(strlen)(PCRE2_SPTR str)
172
+ {
173
+ PCRE2_SIZE c = 0;
174
+ while (*str++ != 0) c++;
175
+ return c;
176
+ }
177
+
178
+
179
+ /*************************************************
180
+ * Copy 8-bit 0-terminated string to PCRE2 string *
181
+ *************************************************/
182
+
183
+ /* Arguments:
184
+ str1 buffer to receive the string
185
+ str2 8-bit string to be copied
186
+
187
+ Returns: the number of code units used (excluding trailing zero)
188
+ */
189
+
190
+ PCRE2_SIZE
191
+ PRIV(strcpy_c8)(PCRE2_UCHAR *str1, const char *str2)
192
+ {
193
+ PCRE2_UCHAR *t = str1;
194
+ while (*str2 != 0) *t++ = *str2++;
195
+ *t = 0;
196
+ return t - str1;
197
+ }
198
+
199
+ /* End of pcre2_string_utils.c */