rugged 1.0.1 → 1.1.0
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.
- checksums.yaml +4 -4
- data/ext/rugged/rugged_commit.c +1 -1
- data/lib/rugged/commit.rb +16 -2
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +31 -69
- data/vendor/libgit2/cmake/{Modules/AddCFlagIfSupported.cmake → AddCFlagIfSupported.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/EnableWarnings.cmake → EnableWarnings.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindCoreFoundation.cmake → FindCoreFoundation.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindGSSAPI.cmake → FindGSSAPI.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindGSSFramework.cmake → FindGSSFramework.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindHTTP_Parser.cmake → FindHTTP_Parser.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindIconv.cmake → FindIconv.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindPCRE.cmake → FindPCRE.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindPCRE2.cmake → FindPCRE2.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindPkgLibraries.cmake → FindPkgLibraries.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindSecurity.cmake → FindSecurity.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindStatNsec.cmake → FindStatNsec.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/FindmbedTLS.cmake → FindmbedTLS.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/IdeSplitSources.cmake → IdeSplitSources.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/PkgBuildConfig.cmake → PkgBuildConfig.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/SanitizeBool.cmake → SanitizeBool.cmake} +0 -0
- data/vendor/libgit2/cmake/{Modules/SelectGSSAPI.cmake → SelectGSSAPI.cmake} +18 -26
- data/vendor/libgit2/cmake/{Modules/SelectHTTPSBackend.cmake → SelectHTTPSBackend.cmake} +25 -32
- data/vendor/libgit2/cmake/{Modules/SelectHashes.cmake → SelectHashes.cmake} +20 -28
- data/vendor/libgit2/deps/http-parser/CMakeLists.txt +4 -3
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +6 -5
- data/vendor/libgit2/deps/ntlmclient/compat.h +8 -1
- data/vendor/libgit2/deps/ntlmclient/ntlm.c +8 -11
- data/vendor/libgit2/deps/pcre/LICENCE +93 -0
- data/vendor/libgit2/deps/pcre/pcre.h +2 -2
- data/vendor/libgit2/deps/pcre/pcre_compile.c +29 -17
- data/vendor/libgit2/deps/pcre/pcre_jit_compile.c +4 -4
- data/vendor/libgit2/deps/pcre/pcreposix.c +2 -3
- data/vendor/libgit2/deps/zlib/CMakeLists.txt +6 -5
- data/vendor/libgit2/deps/zlib/deflate.c +1 -0
- data/vendor/libgit2/include/git2/annotated_commit.h +1 -1
- data/vendor/libgit2/include/git2/blame.h +2 -0
- data/vendor/libgit2/include/git2/common.h +15 -3
- data/vendor/libgit2/include/git2/deprecated.h +42 -2
- data/vendor/libgit2/include/git2/errors.h +2 -1
- data/vendor/libgit2/include/git2/index.h +1 -2
- data/vendor/libgit2/include/git2/pack.h +1 -1
- data/vendor/libgit2/include/git2/strarray.h +6 -10
- data/vendor/libgit2/include/git2/version.h +4 -4
- data/vendor/libgit2/src/CMakeLists.txt +53 -41
- data/vendor/libgit2/src/apply.c +5 -1
- data/vendor/libgit2/src/assert_safe.h +58 -0
- data/vendor/libgit2/src/attr_file.c +8 -3
- data/vendor/libgit2/src/attrcache.c +2 -3
- data/vendor/libgit2/src/blame.c +2 -0
- data/vendor/libgit2/src/blame_git.c +6 -3
- data/vendor/libgit2/src/blob.c +2 -0
- data/vendor/libgit2/src/branch.c +19 -21
- data/vendor/libgit2/src/buffer.c +6 -3
- data/vendor/libgit2/src/cache.c +1 -22
- data/vendor/libgit2/src/checkout.c +49 -72
- data/vendor/libgit2/src/cherrypick.c +2 -0
- data/vendor/libgit2/src/clone.c +78 -18
- data/vendor/libgit2/src/common.h +1 -0
- data/vendor/libgit2/src/config.c +3 -7
- data/vendor/libgit2/src/config_entries.c +35 -27
- data/vendor/libgit2/src/config_parse.c +1 -1
- data/vendor/libgit2/src/config_snapshot.c +2 -1
- data/vendor/libgit2/src/describe.c +5 -1
- data/vendor/libgit2/src/diff.c +12 -11
- data/vendor/libgit2/src/diff_file.c +3 -1
- data/vendor/libgit2/src/diff_generate.c +10 -11
- data/vendor/libgit2/src/diff_parse.c +2 -3
- data/vendor/libgit2/src/diff_print.c +63 -60
- data/vendor/libgit2/src/diff_stats.c +12 -11
- data/vendor/libgit2/src/diff_tform.c +2 -3
- data/vendor/libgit2/src/errors.c +2 -0
- data/vendor/libgit2/src/fetch.c +2 -0
- data/vendor/libgit2/src/filter.c +3 -3
- data/vendor/libgit2/src/futils.c +3 -3
- data/vendor/libgit2/src/futils.h +3 -3
- data/vendor/libgit2/src/global.c +3 -1
- data/vendor/libgit2/src/idxmap.c +0 -22
- data/vendor/libgit2/src/index.c +12 -7
- data/vendor/libgit2/src/indexer.c +10 -4
- data/vendor/libgit2/src/iterator.c +4 -4
- data/vendor/libgit2/src/merge.c +13 -7
- data/vendor/libgit2/src/merge_file.c +4 -6
- data/vendor/libgit2/src/midx.c +418 -0
- data/vendor/libgit2/src/midx.h +83 -0
- data/vendor/libgit2/src/mwindow.c +124 -51
- data/vendor/libgit2/src/net.c +6 -1
- data/vendor/libgit2/src/object.c +2 -1
- data/vendor/libgit2/src/odb.c +9 -6
- data/vendor/libgit2/src/odb_loose.c +3 -3
- data/vendor/libgit2/src/odb_mempack.c +2 -0
- data/vendor/libgit2/src/oid.c +2 -0
- data/vendor/libgit2/src/pack-objects.c +29 -21
- data/vendor/libgit2/src/pack.c +47 -28
- data/vendor/libgit2/src/pack.h +19 -2
- data/vendor/libgit2/src/patch_generate.c +1 -3
- data/vendor/libgit2/src/patch_parse.c +4 -2
- data/vendor/libgit2/src/path.c +4 -4
- data/vendor/libgit2/src/pathspec.c +4 -3
- data/vendor/libgit2/src/pool.c +21 -15
- data/vendor/libgit2/src/pool.h +9 -1
- data/vendor/libgit2/src/proxy.c +2 -0
- data/vendor/libgit2/src/push.c +2 -0
- data/vendor/libgit2/src/rebase.c +2 -0
- data/vendor/libgit2/src/refdb.c +135 -0
- data/vendor/libgit2/src/refdb.h +69 -0
- data/vendor/libgit2/src/refdb_fs.c +19 -81
- data/vendor/libgit2/src/reflog.c +2 -6
- data/vendor/libgit2/src/refs.c +60 -188
- data/vendor/libgit2/src/refs.h +1 -19
- data/vendor/libgit2/src/regexp.c +2 -2
- data/vendor/libgit2/src/remote.c +32 -17
- data/vendor/libgit2/src/repository.c +168 -79
- data/vendor/libgit2/src/repository.h +10 -27
- data/vendor/libgit2/src/revert.c +2 -0
- data/vendor/libgit2/src/revparse.c +5 -4
- data/vendor/libgit2/src/revwalk.c +3 -5
- data/vendor/libgit2/src/settings.c +9 -0
- data/vendor/libgit2/src/sortedcache.c +2 -3
- data/vendor/libgit2/src/stash.c +2 -0
- data/vendor/libgit2/src/status.c +2 -0
- data/vendor/libgit2/src/strarray.c +63 -0
- data/vendor/libgit2/src/streams/openssl.c +12 -6
- data/vendor/libgit2/src/streams/registry.c +5 -3
- data/vendor/libgit2/src/submodule.c +6 -4
- data/vendor/libgit2/src/sysdir.c +4 -20
- data/vendor/libgit2/src/sysdir.h +0 -11
- data/vendor/libgit2/src/tag.c +2 -0
- data/vendor/libgit2/src/thread-utils.h +139 -21
- data/vendor/libgit2/src/transaction.c +2 -1
- data/vendor/libgit2/src/transports/credential.c +2 -0
- data/vendor/libgit2/src/transports/credential_helpers.c +2 -0
- data/vendor/libgit2/src/transports/httpclient.c +6 -8
- data/vendor/libgit2/src/transports/local.c +2 -2
- data/vendor/libgit2/src/transports/smart.c +2 -2
- data/vendor/libgit2/src/transports/winhttp.c +18 -7
- data/vendor/libgit2/src/unix/posix.h +13 -1
- data/vendor/libgit2/src/util.c +25 -58
- data/vendor/libgit2/src/util.h +2 -2
- data/vendor/libgit2/src/win32/git2.rc +18 -3
- data/vendor/libgit2/src/win32/path_w32.c +2 -2
- data/vendor/libgit2/src/worktree.c +4 -0
- metadata +27 -25
- data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.c.in +0 -29
- data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.cmake +0 -96
- data/vendor/libgit2/src/refdb_fs.h +0 -19
@@ -76,7 +76,8 @@ int git_transaction_new(git_transaction **out, git_repository *repo)
|
|
76
76
|
|
77
77
|
assert(out && repo);
|
78
78
|
|
79
|
-
git_pool_init(&pool, 1)
|
79
|
+
if ((error = git_pool_init(&pool, 1)) < 0)
|
80
|
+
goto on_error;
|
80
81
|
|
81
82
|
tx = git_pool_mallocz(&pool, sizeof(git_transaction));
|
82
83
|
if (!tx) {
|
@@ -391,6 +391,7 @@ void git_credential_free(git_credential *cred)
|
|
391
391
|
|
392
392
|
/* Deprecated credential functions */
|
393
393
|
|
394
|
+
#ifndef GIT_DEPRECATE_HARD
|
394
395
|
int git_cred_has_username(git_credential *cred)
|
395
396
|
{
|
396
397
|
return git_credential_has_username(cred);
|
@@ -474,3 +475,4 @@ void git_cred_free(git_credential *cred)
|
|
474
475
|
{
|
475
476
|
git_credential_free(cred);
|
476
477
|
}
|
478
|
+
#endif
|
@@ -54,6 +54,7 @@ int git_credential_userpass(
|
|
54
54
|
|
55
55
|
/* Deprecated credential functions */
|
56
56
|
|
57
|
+
#ifndef GIT_DEPRECATE_HARD
|
57
58
|
int git_cred_userpass(
|
58
59
|
git_credential **out,
|
59
60
|
const char *url,
|
@@ -64,3 +65,4 @@ int git_cred_userpass(
|
|
64
65
|
return git_credential_userpass(out, url, user_from_url,
|
65
66
|
allowed_types, payload);
|
66
67
|
}
|
68
|
+
#endif
|
@@ -445,7 +445,7 @@ GIT_INLINE(int) client_write_request(git_http_client *client)
|
|
445
445
|
0);
|
446
446
|
}
|
447
447
|
|
448
|
-
const char *name_for_method(git_http_method method)
|
448
|
+
static const char *name_for_method(git_http_method method)
|
449
449
|
{
|
450
450
|
switch (method) {
|
451
451
|
case GIT_HTTP_METHOD_GET:
|
@@ -1120,11 +1120,6 @@ GIT_INLINE(int) client_read_and_parse(git_http_client *client)
|
|
1120
1120
|
return -1;
|
1121
1121
|
}
|
1122
1122
|
|
1123
|
-
if (parser->upgrade) {
|
1124
|
-
git_error_set(GIT_ERROR_HTTP, "server requested upgrade");
|
1125
|
-
return -1;
|
1126
|
-
}
|
1127
|
-
|
1128
1123
|
if (ctx->parse_status == PARSE_STATUS_ERROR) {
|
1129
1124
|
client->connected = 0;
|
1130
1125
|
return ctx->error ? ctx->error : -1;
|
@@ -1374,8 +1369,11 @@ int git_http_client_read_response(
|
|
1374
1369
|
|
1375
1370
|
git_http_response_dispose(response);
|
1376
1371
|
|
1377
|
-
|
1378
|
-
|
1372
|
+
if (client->current_server == PROXY) {
|
1373
|
+
git_vector_free_deep(&client->proxy.auth_challenges);
|
1374
|
+
} else if(client->current_server == SERVER) {
|
1375
|
+
git_vector_free_deep(&client->server.auth_challenges);
|
1376
|
+
}
|
1379
1377
|
|
1380
1378
|
client->state = READING_RESPONSE;
|
1381
1379
|
client->keepalive = 0;
|
@@ -185,12 +185,12 @@ static int store_refs(transport_local *t)
|
|
185
185
|
}
|
186
186
|
|
187
187
|
t->have_refs = 1;
|
188
|
-
|
188
|
+
git_strarray_dispose(&ref_names);
|
189
189
|
return 0;
|
190
190
|
|
191
191
|
on_error:
|
192
192
|
git_vector_free(&t->refs);
|
193
|
-
|
193
|
+
git_strarray_dispose(&ref_names);
|
194
194
|
return -1;
|
195
195
|
}
|
196
196
|
|
@@ -132,7 +132,7 @@ static int git_smart__set_custom_headers(
|
|
132
132
|
size_t i;
|
133
133
|
|
134
134
|
if (t->custom_headers.count)
|
135
|
-
|
135
|
+
git_strarray_dispose(&t->custom_headers);
|
136
136
|
|
137
137
|
if (!custom_headers)
|
138
138
|
return 0;
|
@@ -465,7 +465,7 @@ static void git_smart__free(git_transport *transport)
|
|
465
465
|
git_vector_free(refs);
|
466
466
|
git__free((char *)t->proxy.url);
|
467
467
|
|
468
|
-
|
468
|
+
git_strarray_dispose(&t->custom_headers);
|
469
469
|
|
470
470
|
git__free(t);
|
471
471
|
}
|
@@ -41,14 +41,18 @@
|
|
41
41
|
#define WINHTTP_IGNORE_REQUEST_TOTAL_LENGTH 0
|
42
42
|
#endif
|
43
43
|
|
44
|
-
#ifndef
|
44
|
+
#ifndef WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1
|
45
45
|
# define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 0x00000200
|
46
46
|
#endif
|
47
47
|
|
48
|
-
#ifndef
|
48
|
+
#ifndef WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2
|
49
49
|
# define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2 0x00000800
|
50
50
|
#endif
|
51
51
|
|
52
|
+
#ifndef WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3
|
53
|
+
# define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3 0x00002000
|
54
|
+
#endif
|
55
|
+
|
52
56
|
#ifndef HTTP_STATUS_PERMANENT_REDIRECT
|
53
57
|
# define HTTP_STATUS_PERMANENT_REDIRECT 308
|
54
58
|
#endif
|
@@ -743,7 +747,8 @@ static int winhttp_connect(
|
|
743
747
|
DWORD protocols =
|
744
748
|
WINHTTP_FLAG_SECURE_PROTOCOL_TLS1 |
|
745
749
|
WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 |
|
746
|
-
WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2
|
750
|
+
WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2 |
|
751
|
+
WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3;
|
747
752
|
|
748
753
|
t->session = NULL;
|
749
754
|
t->connection = NULL;
|
@@ -788,14 +793,20 @@ static int winhttp_connect(
|
|
788
793
|
}
|
789
794
|
|
790
795
|
/*
|
791
|
-
* Do a best-effort attempt to enable TLS 1.2 but allow this to
|
792
|
-
* fail; if TLS 1.2 support is not available for some reason,
|
796
|
+
* Do a best-effort attempt to enable TLS 1.3 and 1.2 but allow this to
|
797
|
+
* fail; if TLS 1.2 or 1.3 support is not available for some reason,
|
793
798
|
* ignore the failure (it will keep the default protocols).
|
794
799
|
*/
|
795
|
-
WinHttpSetOption(t->session,
|
800
|
+
if (WinHttpSetOption(t->session,
|
796
801
|
WINHTTP_OPTION_SECURE_PROTOCOLS,
|
797
802
|
&protocols,
|
798
|
-
sizeof(protocols))
|
803
|
+
sizeof(protocols)) == FALSE) {
|
804
|
+
protocols &= ~WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3;
|
805
|
+
WinHttpSetOption(t->session,
|
806
|
+
WINHTTP_OPTION_SECURE_PROTOCOLS,
|
807
|
+
&protocols,
|
808
|
+
sizeof(protocols));
|
809
|
+
}
|
799
810
|
|
800
811
|
if (!WinHttpSetTimeouts(t->session, default_timeout, default_connect_timeout, default_timeout, default_timeout)) {
|
801
812
|
git_error_set(GIT_ERROR_OS, "failed to set timeouts for WinHTTP");
|
@@ -62,11 +62,23 @@ GIT_INLINE(int) p_fsync(int fd)
|
|
62
62
|
#define p_snprintf snprintf
|
63
63
|
#define p_mkstemp(p) mkstemp(p)
|
64
64
|
#define p_chdir(p) chdir(p)
|
65
|
-
#define p_chmod(p,m) chmod(p, m)
|
66
65
|
#define p_rmdir(p) rmdir(p)
|
67
66
|
#define p_access(p,m) access(p,m)
|
68
67
|
#define p_ftruncate(fd, sz) ftruncate(fd, sz)
|
69
68
|
|
69
|
+
/*
|
70
|
+
* Pre-Android 5 did not implement a virtual filesystem atop FAT
|
71
|
+
* partitions for Unix permissions, which causes chmod to fail. However,
|
72
|
+
* Unix permissions have no effect on Android anyway as file permissions
|
73
|
+
* are not actually managed this way, so treating it as a no-op across
|
74
|
+
* all Android is safe.
|
75
|
+
*/
|
76
|
+
#ifdef __ANDROID__
|
77
|
+
# define p_chmod(p,m) 0
|
78
|
+
#else
|
79
|
+
# define p_chmod(p,m) chmod(p, m)
|
80
|
+
#endif
|
81
|
+
|
70
82
|
/* see win32/posix.h for explanation about why this exists */
|
71
83
|
#define p_lstat_posixly(p,b) lstat(p,b)
|
72
84
|
|
data/vendor/libgit2/src/util.c
CHANGED
@@ -22,52 +22,6 @@
|
|
22
22
|
# include <Shlwapi.h>
|
23
23
|
#endif
|
24
24
|
|
25
|
-
void git_strarray_free(git_strarray *array)
|
26
|
-
{
|
27
|
-
size_t i;
|
28
|
-
|
29
|
-
if (array == NULL)
|
30
|
-
return;
|
31
|
-
|
32
|
-
for (i = 0; i < array->count; ++i)
|
33
|
-
git__free(array->strings[i]);
|
34
|
-
|
35
|
-
git__free(array->strings);
|
36
|
-
|
37
|
-
memset(array, 0, sizeof(*array));
|
38
|
-
}
|
39
|
-
|
40
|
-
int git_strarray_copy(git_strarray *tgt, const git_strarray *src)
|
41
|
-
{
|
42
|
-
size_t i;
|
43
|
-
|
44
|
-
assert(tgt && src);
|
45
|
-
|
46
|
-
memset(tgt, 0, sizeof(*tgt));
|
47
|
-
|
48
|
-
if (!src->count)
|
49
|
-
return 0;
|
50
|
-
|
51
|
-
tgt->strings = git__calloc(src->count, sizeof(char *));
|
52
|
-
GIT_ERROR_CHECK_ALLOC(tgt->strings);
|
53
|
-
|
54
|
-
for (i = 0; i < src->count; ++i) {
|
55
|
-
if (!src->strings[i])
|
56
|
-
continue;
|
57
|
-
|
58
|
-
tgt->strings[tgt->count] = git__strdup(src->strings[i]);
|
59
|
-
if (!tgt->strings[tgt->count]) {
|
60
|
-
git_strarray_free(tgt);
|
61
|
-
memset(tgt, 0, sizeof(*tgt));
|
62
|
-
return -1;
|
63
|
-
}
|
64
|
-
|
65
|
-
tgt->count++;
|
66
|
-
}
|
67
|
-
|
68
|
-
return 0;
|
69
|
-
}
|
70
|
-
|
71
25
|
int git__strntol64(int64_t *result, const char *nptr, size_t nptr_len, const char **endptr, int base)
|
72
26
|
{
|
73
27
|
const char *p;
|
@@ -424,35 +378,48 @@ void git__hexdump(const char *buffer, size_t len)
|
|
424
378
|
last_line = (len % LINE_WIDTH);
|
425
379
|
|
426
380
|
for (i = 0; i < line_count; ++i) {
|
381
|
+
printf("%08" PRIxZ " ", (i * LINE_WIDTH));
|
382
|
+
|
427
383
|
line = buffer + (i * LINE_WIDTH);
|
428
|
-
for (j = 0; j < LINE_WIDTH; ++j, ++line)
|
429
|
-
printf("%
|
384
|
+
for (j = 0; j < LINE_WIDTH; ++j, ++line) {
|
385
|
+
printf("%02x ", (unsigned char)*line & 0xFF);
|
386
|
+
|
387
|
+
if (j == (LINE_WIDTH / 2))
|
388
|
+
printf(" ");
|
389
|
+
}
|
430
390
|
|
431
|
-
printf("|
|
391
|
+
printf(" |");
|
432
392
|
|
433
393
|
line = buffer + (i * LINE_WIDTH);
|
434
394
|
for (j = 0; j < LINE_WIDTH; ++j, ++line)
|
435
395
|
printf("%c", (*line >= 32 && *line <= 126) ? *line : '.');
|
436
396
|
|
437
|
-
printf("
|
397
|
+
printf("|\n");
|
438
398
|
}
|
439
399
|
|
440
400
|
if (last_line > 0) {
|
401
|
+
printf("%08" PRIxZ " ", (line_count * LINE_WIDTH));
|
441
402
|
|
442
403
|
line = buffer + (line_count * LINE_WIDTH);
|
443
|
-
for (j = 0; j < last_line; ++j, ++line)
|
444
|
-
printf("%
|
404
|
+
for (j = 0; j < last_line; ++j, ++line) {
|
405
|
+
printf("%02x ", (unsigned char)*line & 0xFF);
|
406
|
+
|
407
|
+
if (j == (LINE_WIDTH / 2))
|
408
|
+
printf(" ");
|
409
|
+
}
|
445
410
|
|
411
|
+
if (j < (LINE_WIDTH / 2))
|
412
|
+
printf(" ");
|
446
413
|
for (j = 0; j < (LINE_WIDTH - last_line); ++j)
|
447
|
-
printf("
|
414
|
+
printf(" ");
|
448
415
|
|
449
|
-
printf("|
|
416
|
+
printf(" |");
|
450
417
|
|
451
418
|
line = buffer + (line_count * LINE_WIDTH);
|
452
419
|
for (j = 0; j < last_line; ++j, ++line)
|
453
420
|
printf("%c", (*line >= 32 && *line <= 126) ? *line : '.');
|
454
421
|
|
455
|
-
printf("
|
422
|
+
printf("|\n");
|
456
423
|
}
|
457
424
|
|
458
425
|
printf("\n");
|
@@ -810,7 +777,7 @@ static const int8_t utf8proc_utf8class[256] = {
|
|
810
777
|
4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0
|
811
778
|
};
|
812
779
|
|
813
|
-
int
|
780
|
+
static int util_utf8_charlen(const uint8_t *str, size_t str_len)
|
814
781
|
{
|
815
782
|
size_t length, i;
|
816
783
|
|
@@ -835,7 +802,7 @@ int git__utf8_iterate(const uint8_t *str, int str_len, int32_t *dst)
|
|
835
802
|
int32_t uc = -1;
|
836
803
|
|
837
804
|
*dst = -1;
|
838
|
-
length =
|
805
|
+
length = util_utf8_charlen(str, str_len);
|
839
806
|
if (length < 0)
|
840
807
|
return -1;
|
841
808
|
|
@@ -872,7 +839,7 @@ size_t git__utf8_valid_buf_length(const uint8_t *str, size_t str_len)
|
|
872
839
|
size_t offset = 0;
|
873
840
|
|
874
841
|
while (offset < str_len) {
|
875
|
-
int length =
|
842
|
+
int length = util_utf8_charlen(str + offset, str_len - offset);
|
876
843
|
|
877
844
|
if (length < 0)
|
878
845
|
break;
|
data/vendor/libgit2/src/util.h
CHANGED
@@ -186,10 +186,10 @@ typedef void (*git_refcount_freeptr)(void *r);
|
|
186
186
|
}
|
187
187
|
|
188
188
|
#define GIT_REFCOUNT_OWN(r, o) { \
|
189
|
-
(r)->rc.owner
|
189
|
+
(void)git__swap((r)->rc.owner, o); \
|
190
190
|
}
|
191
191
|
|
192
|
-
#define GIT_REFCOUNT_OWNER(r) ((r)->rc.owner)
|
192
|
+
#define GIT_REFCOUNT_OWNER(r) git__load((r)->rc.owner)
|
193
193
|
|
194
194
|
#define GIT_REFCOUNT_VAL(r) git_atomic_get((r)->rc.refcount)
|
195
195
|
|
@@ -2,14 +2,29 @@
|
|
2
2
|
#include "../../include/git2/version.h"
|
3
3
|
|
4
4
|
#ifndef LIBGIT2_FILENAME
|
5
|
-
#
|
5
|
+
# ifdef __GNUC__
|
6
|
+
# define LIBGIT2_FILENAME git2
|
7
|
+
# else
|
8
|
+
# define LIBGIT2_FILENAME "git2"
|
9
|
+
# endif
|
6
10
|
#endif
|
7
11
|
|
8
12
|
#ifndef LIBGIT2_COMMENTS
|
9
13
|
# define LIBGIT2_COMMENTS "For more information visit http://libgit2.github.com/"
|
10
14
|
#endif
|
11
15
|
|
16
|
+
#ifdef __GNUC__
|
17
|
+
# define _STR(x) #x
|
18
|
+
# define STR(x) _STR(x)
|
19
|
+
#else
|
20
|
+
# define STR(x) x
|
21
|
+
#endif
|
22
|
+
|
23
|
+
#ifdef __GNUC__
|
24
|
+
VS_VERSION_INFO VERSIONINFO
|
25
|
+
#else
|
12
26
|
VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
27
|
+
#endif
|
13
28
|
FILEVERSION LIBGIT2_VER_MAJOR,LIBGIT2_VER_MINOR,LIBGIT2_VER_REVISION,LIBGIT2_VER_PATCH
|
14
29
|
PRODUCTVERSION LIBGIT2_VER_MAJOR,LIBGIT2_VER_MINOR,LIBGIT2_VER_REVISION,LIBGIT2_VER_PATCH
|
15
30
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
@@ -29,9 +44,9 @@ BEGIN
|
|
29
44
|
BEGIN
|
30
45
|
VALUE "FileDescription", "libgit2 - the Git linkable library\0"
|
31
46
|
VALUE "FileVersion", LIBGIT2_VERSION "\0"
|
32
|
-
VALUE "InternalName", LIBGIT2_FILENAME ".dll\0"
|
47
|
+
VALUE "InternalName", STR(LIBGIT2_FILENAME) ".dll\0"
|
33
48
|
VALUE "LegalCopyright", "Copyright (C) the libgit2 contributors. All rights reserved.\0"
|
34
|
-
VALUE "OriginalFilename", LIBGIT2_FILENAME ".dll\0"
|
49
|
+
VALUE "OriginalFilename", STR(LIBGIT2_FILENAME) ".dll\0"
|
35
50
|
VALUE "ProductName", "libgit2\0"
|
36
51
|
VALUE "ProductVersion", LIBGIT2_VERSION "\0"
|
37
52
|
VALUE "Comments", LIBGIT2_COMMENTS "\0"
|
@@ -151,7 +151,7 @@ int git_win32_path_canonicalize(git_win32_path path)
|
|
151
151
|
return (int)(to - path);
|
152
152
|
}
|
153
153
|
|
154
|
-
int
|
154
|
+
static int win32_path_cwd(wchar_t *out, size_t len)
|
155
155
|
{
|
156
156
|
int cwd_len;
|
157
157
|
|
@@ -241,7 +241,7 @@ int git_win32_path_from_utf8(git_win32_path out, const char *src)
|
|
241
241
|
else {
|
242
242
|
int cwd_len;
|
243
243
|
|
244
|
-
if ((cwd_len =
|
244
|
+
if ((cwd_len = win32_path_cwd(dest, MAX_PATH)) < 0)
|
245
245
|
goto on_error;
|
246
246
|
|
247
247
|
dest[cwd_len++] = L'\\';
|
@@ -271,11 +271,13 @@ int git_worktree_add_options_init(git_worktree_add_options *opts,
|
|
271
271
|
return 0;
|
272
272
|
}
|
273
273
|
|
274
|
+
#ifndef GIT_DEPRECATE_HARD
|
274
275
|
int git_worktree_add_init_options(git_worktree_add_options *opts,
|
275
276
|
unsigned int version)
|
276
277
|
{
|
277
278
|
return git_worktree_add_options_init(opts, version);
|
278
279
|
}
|
280
|
+
#endif
|
279
281
|
|
280
282
|
int git_worktree_add(git_worktree **out, git_repository *repo,
|
281
283
|
const char *name, const char *worktree,
|
@@ -506,11 +508,13 @@ int git_worktree_prune_options_init(
|
|
506
508
|
return 0;
|
507
509
|
}
|
508
510
|
|
511
|
+
#ifndef GIT_DEPRECATE_HARD
|
509
512
|
int git_worktree_prune_init_options(git_worktree_prune_options *opts,
|
510
513
|
unsigned int version)
|
511
514
|
{
|
512
515
|
return git_worktree_prune_options_init(opts, version);
|
513
516
|
}
|
517
|
+
#endif
|
514
518
|
|
515
519
|
int git_worktree_is_prunable(git_worktree *wt,
|
516
520
|
git_worktree_prune_options *opts)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rugged
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Chacon
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-10-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|
@@ -123,27 +123,25 @@ files:
|
|
123
123
|
- vendor/libgit2/AUTHORS
|
124
124
|
- vendor/libgit2/CMakeLists.txt
|
125
125
|
- vendor/libgit2/COPYING
|
126
|
-
- vendor/libgit2/cmake/
|
127
|
-
- vendor/libgit2/cmake/
|
128
|
-
- vendor/libgit2/cmake/
|
129
|
-
- vendor/libgit2/cmake/
|
130
|
-
- vendor/libgit2/cmake/
|
131
|
-
- vendor/libgit2/cmake/
|
132
|
-
- vendor/libgit2/cmake/
|
133
|
-
- vendor/libgit2/cmake/
|
134
|
-
- vendor/libgit2/cmake/
|
135
|
-
- vendor/libgit2/cmake/
|
136
|
-
- vendor/libgit2/cmake/
|
137
|
-
- vendor/libgit2/cmake/
|
138
|
-
- vendor/libgit2/cmake/
|
139
|
-
- vendor/libgit2/cmake/
|
140
|
-
- vendor/libgit2/cmake/
|
141
|
-
- vendor/libgit2/cmake/
|
142
|
-
- vendor/libgit2/cmake/
|
143
|
-
- vendor/libgit2/cmake/
|
144
|
-
- vendor/libgit2/cmake/
|
145
|
-
- vendor/libgit2/cmake/Modules/SelectHTTPSBackend.cmake
|
146
|
-
- vendor/libgit2/cmake/Modules/SelectHashes.cmake
|
126
|
+
- vendor/libgit2/cmake/AddCFlagIfSupported.cmake
|
127
|
+
- vendor/libgit2/cmake/EnableWarnings.cmake
|
128
|
+
- vendor/libgit2/cmake/FindCoreFoundation.cmake
|
129
|
+
- vendor/libgit2/cmake/FindGSSAPI.cmake
|
130
|
+
- vendor/libgit2/cmake/FindGSSFramework.cmake
|
131
|
+
- vendor/libgit2/cmake/FindHTTP_Parser.cmake
|
132
|
+
- vendor/libgit2/cmake/FindIconv.cmake
|
133
|
+
- vendor/libgit2/cmake/FindPCRE.cmake
|
134
|
+
- vendor/libgit2/cmake/FindPCRE2.cmake
|
135
|
+
- vendor/libgit2/cmake/FindPkgLibraries.cmake
|
136
|
+
- vendor/libgit2/cmake/FindSecurity.cmake
|
137
|
+
- vendor/libgit2/cmake/FindStatNsec.cmake
|
138
|
+
- vendor/libgit2/cmake/FindmbedTLS.cmake
|
139
|
+
- vendor/libgit2/cmake/IdeSplitSources.cmake
|
140
|
+
- vendor/libgit2/cmake/PkgBuildConfig.cmake
|
141
|
+
- vendor/libgit2/cmake/SanitizeBool.cmake
|
142
|
+
- vendor/libgit2/cmake/SelectGSSAPI.cmake
|
143
|
+
- vendor/libgit2/cmake/SelectHTTPSBackend.cmake
|
144
|
+
- vendor/libgit2/cmake/SelectHashes.cmake
|
147
145
|
- vendor/libgit2/deps/http-parser/CMakeLists.txt
|
148
146
|
- vendor/libgit2/deps/http-parser/COPYING
|
149
147
|
- vendor/libgit2/deps/http-parser/http_parser.c
|
@@ -168,6 +166,7 @@ files:
|
|
168
166
|
- vendor/libgit2/deps/ntlmclient/util.h
|
169
167
|
- vendor/libgit2/deps/pcre/CMakeLists.txt
|
170
168
|
- vendor/libgit2/deps/pcre/COPYING
|
169
|
+
- vendor/libgit2/deps/pcre/LICENCE
|
171
170
|
- vendor/libgit2/deps/pcre/cmake/COPYING-CMAKE-SCRIPTS
|
172
171
|
- vendor/libgit2/deps/pcre/cmake/FindEditline.cmake
|
173
172
|
- vendor/libgit2/deps/pcre/cmake/FindPackageHandleStandardArgs.cmake
|
@@ -328,6 +327,7 @@ files:
|
|
328
327
|
- vendor/libgit2/src/apply.c
|
329
328
|
- vendor/libgit2/src/apply.h
|
330
329
|
- vendor/libgit2/src/array.h
|
330
|
+
- vendor/libgit2/src/assert_safe.h
|
331
331
|
- vendor/libgit2/src/attr.c
|
332
332
|
- vendor/libgit2/src/attr.h
|
333
333
|
- vendor/libgit2/src/attr_file.c
|
@@ -451,6 +451,8 @@ files:
|
|
451
451
|
- vendor/libgit2/src/merge_file.c
|
452
452
|
- vendor/libgit2/src/message.c
|
453
453
|
- vendor/libgit2/src/message.h
|
454
|
+
- vendor/libgit2/src/midx.c
|
455
|
+
- vendor/libgit2/src/midx.h
|
454
456
|
- vendor/libgit2/src/mwindow.c
|
455
457
|
- vendor/libgit2/src/mwindow.h
|
456
458
|
- vendor/libgit2/src/net.c
|
@@ -507,7 +509,6 @@ files:
|
|
507
509
|
- vendor/libgit2/src/refdb.c
|
508
510
|
- vendor/libgit2/src/refdb.h
|
509
511
|
- vendor/libgit2/src/refdb_fs.c
|
510
|
-
- vendor/libgit2/src/refdb_fs.h
|
511
512
|
- vendor/libgit2/src/reflog.c
|
512
513
|
- vendor/libgit2/src/reflog.h
|
513
514
|
- vendor/libgit2/src/refs.c
|
@@ -534,6 +535,7 @@ files:
|
|
534
535
|
- vendor/libgit2/src/stash.c
|
535
536
|
- vendor/libgit2/src/status.c
|
536
537
|
- vendor/libgit2/src/status.h
|
538
|
+
- vendor/libgit2/src/strarray.c
|
537
539
|
- vendor/libgit2/src/stream.h
|
538
540
|
- vendor/libgit2/src/streams/mbedtls.c
|
539
541
|
- vendor/libgit2/src/streams/mbedtls.h
|
@@ -674,7 +676,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
674
676
|
- !ruby/object:Gem::Version
|
675
677
|
version: '0'
|
676
678
|
requirements: []
|
677
|
-
rubygems_version: 3.
|
679
|
+
rubygems_version: 3.1.2
|
678
680
|
signing_key:
|
679
681
|
specification_version: 4
|
680
682
|
summary: Rugged is a Ruby binding to the libgit2 linkable library
|