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
@@ -2,31 +2,26 @@
2
2
  * Perl-Compatible Regular Expressions *
3
3
  *************************************************/
4
4
 
5
- /* This file contains character tables that are used when no external tables
6
- are passed to PCRE by the application that calls it. The tables are used only
7
- for characters whose code values are less than 256.
5
+ /* This file was automatically written by the pcre2_dftables auxiliary
6
+ program. It contains character tables that are used when no external
7
+ tables are passed to PCRE2 by the application that calls it. The tables
8
+ are used only for characters whose code values are less than 256, and
9
+ only relevant if not in UCP mode. */
8
10
 
9
- This is a default version of the tables that assumes ASCII encoding. A program
10
- called dftables (which is distributed with PCRE) can be used to build
11
- alternative versions of this file. This is necessary if you are running in an
12
- EBCDIC environment, or if you want to default to a different encoding, for
13
- example ISO-8859-1. When dftables is run, it creates these tables in the
14
- current locale. If PCRE is configured with --enable-rebuild-chartables, this
15
- happens automatically.
11
+ /* This set of tables was written in the C locale. */
16
12
 
17
- The following #includes are present because without them gcc 4.x may remove the
18
- array definition from the final binary if PCRE is built into a static library
19
- and dead code stripping is activated. This leads to link errors. Pulling in the
20
- header ensures that the array gets flagged as "someone outside this compilation
21
- unit might reference this" and so it will always be supplied to the linker. */
13
+ /* The pcre2_ftables program (which is distributed with PCRE2) can be used
14
+ to build alternative versions of this file. This is necessary if you are
15
+ running in an EBCDIC environment, or if you want to default to a different
16
+ encoding, for example ISO-8859-1. When pcre2_dftables is run, it creates
17
+ these tables in the "C" locale by default. This happens automatically if
18
+ PCRE2 is configured with --enable-rebuild-chartables. However, you can run
19
+ pcre2_dftables manually with the -L option to build tables using the LC_ALL
20
+ locale. */
22
21
 
23
- #ifdef HAVE_CONFIG_H
24
- #include "config.h"
25
- #endif
22
+ #include "pcre2_internal.h"
26
23
 
27
- #include "pcre_internal.h"
28
-
29
- const pcre_uint8 PRIV(default_tables)[] = {
24
+ const uint8_t PRIV(default_tables)[] = {
30
25
 
31
26
  /* This table is a lower casing table. */
32
27
 
@@ -103,52 +98,52 @@ bytes long and the bits run from the least significant end of each byte. The
103
98
  classes that have their own maps are: space, xdigit, digit, upper, lower, word,
104
99
  graph, print, punct, and cntrl. Other classes are built from combinations. */
105
100
 
106
- 0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00,
101
+ 0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00, /* space */
107
102
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
108
103
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
109
104
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
110
105
 
111
- 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
106
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, /* xdigit */
112
107
  0x7e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,
113
108
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
114
109
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
115
110
 
116
- 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
111
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, /* digit */
117
112
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
118
113
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
119
114
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
120
115
 
121
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
116
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* upper */
122
117
  0xfe,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
123
118
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
124
119
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
125
120
 
126
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
121
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* lower */
127
122
  0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,
128
123
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
129
124
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
130
125
 
131
- 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
126
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, /* word */
132
127
  0xfe,0xff,0xff,0x87,0xfe,0xff,0xff,0x07,
133
128
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
134
129
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
135
130
 
136
- 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
131
+ 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, /* graph */
137
132
  0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
138
133
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
139
134
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
140
135
 
141
- 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
136
+ 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff, /* print */
142
137
  0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
143
138
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
144
139
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
145
140
 
146
- 0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc,
141
+ 0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc, /* punct */
147
142
  0x01,0x00,0x00,0xf8,0x01,0x00,0x00,0x78,
148
143
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
149
144
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
150
145
 
151
- 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,
146
+ 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, /* cntrl */
152
147
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
153
148
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
154
149
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -156,28 +151,27 @@ graph, print, punct, and cntrl. Other classes are built from combinations. */
156
151
  /* This table identifies various classes of character by individual bits:
157
152
  0x01 white space character
158
153
  0x02 letter
159
- 0x04 decimal digit
160
- 0x08 hexadecimal digit
161
- 0x10 alphanumeric or '_'
162
- 0x80 regular expression metacharacter or binary zero
154
+ 0x04 lower case letter
155
+ 0x08 decimal digit
156
+ 0x10 word (alphanumeric or '_')
163
157
  */
164
158
 
165
- 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */
159
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */
166
160
  0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00, /* 8- 15 */
167
161
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */
168
162
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */
169
- 0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /* - ' */
170
- 0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x00, /* ( - / */
171
- 0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /* 0 - 7 */
172
- 0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x80, /* 8 - ? */
173
- 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* @ - G */
163
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - ' */
164
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* ( - / */
165
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, /* 0 - 7 */
166
+ 0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00, /* 8 - ? */
167
+ 0x00,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* @ - G */
174
168
  0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* H - O */
175
169
  0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* P - W */
176
- 0x12,0x12,0x12,0x80,0x80,0x00,0x80,0x10, /* X - _ */
177
- 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* ` - g */
178
- 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* h - o */
179
- 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* p - w */
180
- 0x12,0x12,0x12,0x80,0x80,0x00,0x00,0x00, /* x -127 */
170
+ 0x12,0x12,0x12,0x00,0x00,0x00,0x00,0x10, /* X - _ */
171
+ 0x00,0x16,0x16,0x16,0x16,0x16,0x16,0x16, /* ` - g */
172
+ 0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16, /* h - o */
173
+ 0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16, /* p - w */
174
+ 0x16,0x16,0x16,0x00,0x00,0x00,0x00,0x00, /* x -127 */
181
175
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */
182
176
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */
183
177
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */
@@ -195,4 +189,4 @@ graph, print, punct, and cntrl. Other classes are built from combinations. */
195
189
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */
196
190
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */
197
191
 
198
- /* End of pcre_chartables.c */
192
+ /* End of pcre2_chartables.c */
@@ -5,8 +5,8 @@
5
5
  /* PCRE is a library of functions to support regular expressions whose syntax
6
6
  and semantics are as close as possible to those of the Perl 5 language.
7
7
 
8
- Written by Philip Hazel
9
- Copyright (c) 1997-2012 University of Cambridge
8
+ Written by Philip Hazel
9
+ Copyright (c) 2023 University of Cambridge
10
10
 
11
11
  -----------------------------------------------------------------------------
12
12
  Redistribution and use in source and binary forms, with or without
@@ -38,57 +38,57 @@ POSSIBILITY OF SUCH DAMAGE.
38
38
  */
39
39
 
40
40
 
41
- /* This file contains a private PCRE function that converts an ordinal
42
- character value into a UTF8 string. */
41
+ /* This file contains functions to implement checked integer operation */
43
42
 
44
- #ifdef HAVE_CONFIG_H
45
- #include "config.h"
43
+
44
+ #ifndef PCRE2_PCRE2TEST
45
+ #include "pcre2_internal.h"
46
46
  #endif
47
47
 
48
- #define COMPILE_PCRE8
49
48
 
50
- #include "pcre_internal.h"
51
49
 
52
50
  /*************************************************
53
- * Convert character value to UTF-8 *
51
+ * Checked Integer Multiplication *
54
52
  *************************************************/
55
53
 
56
- /* This function takes an integer value in the range 0 - 0x10ffff
57
- and encodes it as a UTF-8 character in 1 to 4 pcre_uchars.
58
-
54
+ /*
59
55
  Arguments:
60
- cvalue the character value
61
- buffer pointer to buffer for result - at least 6 pcre_uchars long
56
+ r A pointer to PCRE2_SIZE to store the answer
57
+ a, b Two integers
62
58
 
63
- Returns: number of characters placed in the buffer
64
- */
59
+ Returns: Bool indicating if the operation overflows
65
60
 
66
- unsigned
67
- int
68
- PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer)
69
- {
70
- #ifdef SUPPORT_UTF
61
+ It is modeled after C23's <stdckdint.h> interface
62
+ The INT64_OR_DOUBLE type is a 64-bit integer type when available,
63
+ otherwise double. */
71
64
 
72
- register int i, j;
65
+ BOOL
66
+ PRIV(ckd_smul)(PCRE2_SIZE *r, int a, int b)
67
+ {
68
+ #ifdef HAVE_BUILTIN_MUL_OVERFLOW
69
+ PCRE2_SIZE m;
73
70
 
74
- for (i = 0; i < PRIV(utf8_table1_size); i++)
75
- if ((int)cvalue <= PRIV(utf8_table1)[i]) break;
76
- buffer += i;
77
- for (j = i; j > 0; j--)
78
- {
79
- *buffer-- = 0x80 | (cvalue & 0x3f);
80
- cvalue >>= 6;
81
- }
82
- *buffer = PRIV(utf8_table2)[i] | cvalue;
83
- return i + 1;
71
+ if (__builtin_mul_overflow(a, b, &m)) return TRUE;
84
72
 
73
+ *r = m;
85
74
  #else
75
+ INT64_OR_DOUBLE m;
86
76
 
87
- (void)(cvalue); /* Keep compiler happy; this function won't ever be */
88
- (void)(buffer); /* called when SUPPORT_UTF is not defined. */
89
- return 0;
77
+ PCRE2_ASSERT(a >= 0 && b >= 0);
90
78
 
79
+ m = (INT64_OR_DOUBLE)a * (INT64_OR_DOUBLE)b;
80
+
81
+ #if defined INT64_MAX || defined int64_t
82
+ if (sizeof(m) > sizeof(*r) && m > (INT64_OR_DOUBLE)PCRE2_SIZE_MAX) return TRUE;
83
+ *r = (PCRE2_SIZE)m;
84
+ #else
85
+ if (m > PCRE2_SIZE_MAX) return TRUE;
86
+ *r = m;
91
87
  #endif
88
+
89
+ #endif
90
+
91
+ return FALSE;
92
92
  }
93
93
 
94
- /* End of pcre_ord2utf8.c */
94
+ /* End of pcre2_chkdint.c */