rugged 0.21.1b2 → 0.21.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -12
- data/ext/rugged/extconf.rb +8 -8
- data/ext/rugged/rugged.h +1 -1
- data/ext/rugged/rugged_blob.c +0 -57
- data/ext/rugged/rugged_cred.c +0 -23
- data/ext/rugged/rugged_index.c +2 -6
- data/ext/rugged/rugged_remote.c +1 -69
- data/ext/rugged/rugged_repo.c +5 -287
- data/ext/rugged/rugged_tag_collection.c +2 -70
- data/ext/rugged/rugged_tree.c +10 -29
- data/lib/rugged.rb +0 -2
- data/lib/rugged/diff.rb +1 -0
- data/lib/rugged/diff/line.rb +3 -1
- data/lib/rugged/patch.rb +2 -12
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +0 -11
- data/vendor/libgit2/deps/http-parser/http_parser.h +0 -2
- data/vendor/libgit2/deps/zlib/adler32.c +29 -39
- data/vendor/libgit2/deps/zlib/crc32.c +50 -33
- data/vendor/libgit2/deps/zlib/crc32.h +1 -1
- data/vendor/libgit2/deps/zlib/deflate.c +65 -198
- data/vendor/libgit2/deps/zlib/deflate.h +4 -8
- data/vendor/libgit2/deps/zlib/inffast.c +3 -3
- data/vendor/libgit2/deps/zlib/inffixed.h +3 -3
- data/vendor/libgit2/deps/zlib/inflate.c +52 -84
- data/vendor/libgit2/deps/zlib/inftrees.c +39 -15
- data/vendor/libgit2/deps/zlib/trees.c +36 -18
- data/vendor/libgit2/deps/zlib/zconf.h +0 -4
- data/vendor/libgit2/deps/zlib/zlib.h +95 -250
- data/vendor/libgit2/deps/zlib/zutil.c +10 -13
- data/vendor/libgit2/deps/zlib/zutil.h +62 -41
- data/vendor/libgit2/include/git2/attr.h +13 -16
- data/vendor/libgit2/include/git2/buffer.h +0 -16
- data/vendor/libgit2/include/git2/checkout.h +12 -12
- data/vendor/libgit2/include/git2/cherrypick.h +15 -15
- data/vendor/libgit2/include/git2/clone.h +69 -77
- data/vendor/libgit2/include/git2/diff.h +0 -7
- data/vendor/libgit2/include/git2/errors.h +0 -2
- data/vendor/libgit2/include/git2/merge.h +0 -16
- data/vendor/libgit2/include/git2/oid.h +4 -8
- data/vendor/libgit2/include/git2/remote.h +32 -13
- data/vendor/libgit2/include/git2/repository.h +1 -4
- data/vendor/libgit2/include/git2/reset.h +0 -4
- data/vendor/libgit2/include/git2/revert.h +1 -1
- data/vendor/libgit2/include/git2/status.h +14 -17
- data/vendor/libgit2/include/git2/submodule.h +0 -18
- data/vendor/libgit2/include/git2/sys/repository.h +0 -13
- data/vendor/libgit2/include/git2/transport.h +313 -79
- data/vendor/libgit2/include/git2/tree.h +2 -4
- data/vendor/libgit2/include/git2/types.h +6 -54
- data/vendor/libgit2/include/git2/version.h +2 -2
- data/vendor/libgit2/src/attr.c +4 -8
- data/vendor/libgit2/src/attr_file.c +1 -14
- data/vendor/libgit2/src/blame.c +1 -0
- data/vendor/libgit2/src/buf_text.c +5 -9
- data/vendor/libgit2/src/buf_text.h +2 -3
- data/vendor/libgit2/src/buffer.c +10 -67
- data/vendor/libgit2/src/buffer.h +2 -4
- data/vendor/libgit2/src/cache.c +9 -9
- data/vendor/libgit2/src/cache.h +1 -1
- data/vendor/libgit2/src/checkout.c +44 -121
- data/vendor/libgit2/src/cherrypick.c +44 -41
- data/vendor/libgit2/src/clone.c +56 -94
- data/vendor/libgit2/src/config_file.c +7 -2
- data/vendor/libgit2/src/crlf.c +1 -2
- data/vendor/libgit2/src/diff.c +0 -21
- data/vendor/libgit2/src/diff_file.c +0 -1
- data/vendor/libgit2/src/diff_print.c +9 -11
- data/vendor/libgit2/src/diff_tform.c +2 -4
- data/vendor/libgit2/src/errors.c +7 -9
- data/vendor/libgit2/src/filebuf.c +2 -0
- data/vendor/libgit2/src/fileops.c +7 -9
- data/vendor/libgit2/src/filter.c +11 -2
- data/vendor/libgit2/src/global.c +20 -3
- data/vendor/libgit2/src/global.h +0 -2
- data/vendor/libgit2/src/graph.c +2 -2
- data/vendor/libgit2/src/hashsig.c +1 -1
- data/vendor/libgit2/{include/git2/sys → src}/hashsig.h +7 -11
- data/vendor/libgit2/src/ignore.c +2 -2
- data/vendor/libgit2/src/indexer.c +1 -13
- data/vendor/libgit2/src/merge.c +145 -99
- data/vendor/libgit2/src/merge.h +1 -1
- data/vendor/libgit2/src/mwindow.c +8 -117
- data/vendor/libgit2/src/mwindow.h +1 -9
- data/vendor/libgit2/src/netops.c +7 -6
- data/vendor/libgit2/src/netops.h +4 -0
- data/vendor/libgit2/src/odb_loose.c +1 -1
- data/vendor/libgit2/src/odb_pack.c +3 -6
- data/vendor/libgit2/src/oid.c +0 -8
- data/vendor/libgit2/src/oid.h +0 -11
- data/vendor/libgit2/src/pack.c +6 -20
- data/vendor/libgit2/src/pack.h +0 -3
- data/vendor/libgit2/src/path.c +64 -134
- data/vendor/libgit2/src/path.h +1 -22
- data/vendor/libgit2/src/posix.h +28 -46
- data/vendor/libgit2/src/refs.h +2 -2
- data/vendor/libgit2/src/refspec.c +2 -14
- data/vendor/libgit2/src/remote.c +26 -29
- data/vendor/libgit2/src/remote.h +1 -3
- data/vendor/libgit2/src/repository.c +14 -54
- data/vendor/libgit2/src/revert.c +6 -4
- data/vendor/libgit2/src/revparse.c +18 -15
- data/vendor/libgit2/src/signature.c +2 -2
- data/vendor/libgit2/src/stash.c +1 -2
- data/vendor/libgit2/src/status.c +2 -11
- data/vendor/libgit2/src/strnlen.h +1 -2
- data/vendor/libgit2/src/submodule.c +33 -73
- data/vendor/libgit2/src/tag.c +3 -2
- data/vendor/libgit2/src/thread-utils.h +7 -0
- data/vendor/libgit2/src/trace.h +1 -9
- data/vendor/libgit2/src/transport.c +90 -93
- data/vendor/libgit2/src/transports/cred.c +0 -58
- data/vendor/libgit2/src/transports/cred_helpers.c +0 -3
- data/vendor/libgit2/src/transports/git.c +0 -1
- data/vendor/libgit2/src/transports/http.c +82 -205
- data/vendor/libgit2/src/transports/smart.c +0 -2
- data/vendor/libgit2/src/transports/smart.h +0 -2
- data/vendor/libgit2/src/transports/smart_protocol.c +5 -7
- data/vendor/libgit2/src/transports/ssh.c +35 -224
- data/vendor/libgit2/src/transports/winhttp.c +34 -140
- data/vendor/libgit2/src/tree.c +60 -64
- data/vendor/libgit2/src/tree.h +3 -2
- data/vendor/libgit2/src/unix/posix.h +9 -23
- data/vendor/libgit2/src/unix/realpath.c +7 -8
- data/vendor/libgit2/src/util.c +1 -2
- data/vendor/libgit2/src/util.h +3 -3
- data/vendor/libgit2/src/win32/mingw-compat.h +12 -5
- data/vendor/libgit2/src/win32/msvc-compat.h +32 -3
- data/vendor/libgit2/src/win32/posix.h +31 -20
- data/vendor/libgit2/src/win32/posix_w32.c +18 -62
- metadata +5 -18
- data/lib/rugged/attributes.rb +0 -41
- data/lib/rugged/blob.rb +0 -28
- data/vendor/libgit2/cmake/Modules/FindGSSAPI.cmake +0 -324
- data/vendor/libgit2/deps/zlib/infback.c +0 -640
- data/vendor/libgit2/include/git2/oidarray.h +0 -40
- data/vendor/libgit2/include/git2/sys/transport.h +0 -352
- data/vendor/libgit2/src/oidarray.c +0 -21
- data/vendor/libgit2/src/oidarray.h +0 -18
- data/vendor/libgit2/src/transports/auth.c +0 -71
- data/vendor/libgit2/src/transports/auth.h +0 -63
- data/vendor/libgit2/src/transports/auth_negotiate.c +0 -275
- data/vendor/libgit2/src/transports/auth_negotiate.h +0 -27
- data/vendor/libgit2/src/transports/cred.h +0 -14
@@ -12,35 +12,49 @@
|
|
12
12
|
#include "utf-conv.h"
|
13
13
|
#include "dir.h"
|
14
14
|
|
15
|
-
|
15
|
+
/* define some standard errnos that the runtime may be missing. for example,
|
16
|
+
* mingw lacks EAFNOSUPPORT. */
|
16
17
|
|
17
|
-
#
|
18
|
-
#define
|
19
|
-
|
20
|
-
|
18
|
+
#ifndef EAFNOSUPPORT
|
19
|
+
# define EAFNOSUPPORT (INT_MAX-1)
|
20
|
+
#endif
|
21
|
+
|
22
|
+
#ifdef _MSC_VER
|
23
|
+
# define p_ftruncate(fd, sz) _chsize_s(fd, sz)
|
24
|
+
#else /* MinGW */
|
25
|
+
# define p_ftruncate(fd, sz) _chsize(fd, sz)
|
26
|
+
#endif
|
27
|
+
|
28
|
+
GIT_INLINE(int) p_link(const char *old, const char *new)
|
29
|
+
{
|
30
|
+
GIT_UNUSED(old);
|
31
|
+
GIT_UNUSED(new);
|
32
|
+
errno = ENOSYS;
|
33
|
+
return -1;
|
34
|
+
}
|
21
35
|
|
36
|
+
extern int p_mkdir(const char *path, mode_t mode);
|
37
|
+
extern int p_unlink(const char *path);
|
38
|
+
extern int p_lstat(const char *file_name, struct stat *buf);
|
22
39
|
extern int p_readlink(const char *path, char *buf, size_t bufsiz);
|
23
40
|
extern int p_symlink(const char *old, const char *new);
|
24
|
-
extern int p_link(const char *old, const char *new);
|
25
|
-
extern int p_unlink(const char *path);
|
26
|
-
extern int p_mkdir(const char *path, mode_t mode);
|
27
|
-
extern int p_fsync(int fd);
|
28
41
|
extern char *p_realpath(const char *orig_path, char *buffer);
|
29
|
-
|
30
|
-
extern int p_recv(GIT_SOCKET socket, void *buffer, size_t length, int flags);
|
31
|
-
extern int p_send(GIT_SOCKET socket, const void *buffer, size_t length, int flags);
|
32
|
-
extern int p_inet_pton(int af, const char* src, void* dst);
|
33
|
-
|
34
|
-
#define strcasecmp(s1, s2) _stricmp(s1, s2)
|
35
|
-
#define strncasecmp(s1, s2, c) _strnicmp(s1, s2, c)
|
36
42
|
extern int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr);
|
37
43
|
extern int p_snprintf(char *buffer, size_t count, const char *format, ...) GIT_FORMAT_PRINTF(3, 4);
|
38
44
|
extern int p_mkstemp(char *tmp_path);
|
45
|
+
extern int p_stat(const char* path, struct stat* buf);
|
39
46
|
extern int p_chdir(const char* path);
|
40
47
|
extern int p_chmod(const char* path, mode_t mode);
|
41
48
|
extern int p_rmdir(const char* path);
|
42
49
|
extern int p_access(const char* path, mode_t mode);
|
43
|
-
extern int
|
50
|
+
extern int p_fsync(int fd);
|
51
|
+
extern int p_open(const char *path, int flags, ...);
|
52
|
+
extern int p_creat(const char *path, mode_t mode);
|
53
|
+
extern int p_getcwd(char *buffer_out, size_t size);
|
54
|
+
extern int p_rename(const char *from, const char *to);
|
55
|
+
extern int p_recv(GIT_SOCKET socket, void *buffer, size_t length, int flags);
|
56
|
+
extern int p_send(GIT_SOCKET socket, const void *buffer, size_t length, int flags);
|
57
|
+
extern int p_inet_pton(int af, const char* src, void* dst);
|
44
58
|
|
45
59
|
/* p_lstat is almost but not quite POSIX correct. Specifically, the use of
|
46
60
|
* ENOTDIR is wrong, in that it does not mean precisely that a non-directory
|
@@ -50,7 +64,4 @@ extern int p_ftruncate(int fd, long size);
|
|
50
64
|
*/
|
51
65
|
extern int p_lstat_posixly(const char *filename, struct stat *buf);
|
52
66
|
|
53
|
-
extern struct tm * p_localtime_r (const time_t *timer, struct tm *result);
|
54
|
-
extern struct tm * p_gmtime_r (const time_t *timer, struct tm *result);
|
55
|
-
|
56
67
|
#endif
|
@@ -19,10 +19,6 @@
|
|
19
19
|
# define FILE_NAME_NORMALIZED 0
|
20
20
|
#endif
|
21
21
|
|
22
|
-
#ifndef IO_REPARSE_TAG_SYMLINK
|
23
|
-
#define IO_REPARSE_TAG_SYMLINK (0xA000000CL)
|
24
|
-
#endif
|
25
|
-
|
26
22
|
/* Options which we always provide to _wopen.
|
27
23
|
*
|
28
24
|
* _O_BINARY - Raw access; no translation of CR or LF characters
|
@@ -51,15 +47,6 @@ static int utf8_to_16_with_errno(git_win32_path dest, const char *src)
|
|
51
47
|
return len;
|
52
48
|
}
|
53
49
|
|
54
|
-
int p_ftruncate(int fd, long size)
|
55
|
-
{
|
56
|
-
#if defined(_MSC_VER) && _MSC_VER >= 1500
|
57
|
-
return _chsize_s(fd, size);
|
58
|
-
#else
|
59
|
-
return _chsize(fd, size);
|
60
|
-
#endif
|
61
|
-
}
|
62
|
-
|
63
50
|
int p_mkdir(const char *path, mode_t mode)
|
64
51
|
{
|
65
52
|
git_win32_path buf;
|
@@ -72,14 +59,6 @@ int p_mkdir(const char *path, mode_t mode)
|
|
72
59
|
return _wmkdir(buf);
|
73
60
|
}
|
74
61
|
|
75
|
-
int p_link(const char *old, const char *new)
|
76
|
-
{
|
77
|
-
GIT_UNUSED(old);
|
78
|
-
GIT_UNUSED(new);
|
79
|
-
errno = ENOSYS;
|
80
|
-
return -1;
|
81
|
-
}
|
82
|
-
|
83
62
|
int p_unlink(const char *path)
|
84
63
|
{
|
85
64
|
git_win32_path buf;
|
@@ -131,6 +110,11 @@ GIT_INLINE(time_t) filetime_to_time_t(const FILETIME *ft)
|
|
131
110
|
return (time_t)winTime;
|
132
111
|
}
|
133
112
|
|
113
|
+
static bool path_is_volume(wchar_t *target, size_t target_len)
|
114
|
+
{
|
115
|
+
return (target_len && wcsncmp(target, L"\\??\\Volume{", 11) == 0);
|
116
|
+
}
|
117
|
+
|
134
118
|
/* On success, returns the length, in characters, of the path stored in dest.
|
135
119
|
* On failure, returns a negative value. */
|
136
120
|
static int readlink_w(
|
@@ -177,7 +161,13 @@ static int readlink_w(
|
|
177
161
|
goto on_error;
|
178
162
|
}
|
179
163
|
|
180
|
-
if (target_len) {
|
164
|
+
if (path_is_volume(target, target_len)) {
|
165
|
+
/* This path is a reparse point that represents another volume mounted
|
166
|
+
* at this location, it is not a symbolic link our input was canonical.
|
167
|
+
*/
|
168
|
+
errno = EINVAL;
|
169
|
+
error = -1;
|
170
|
+
} else if (target_len) {
|
181
171
|
/* The path may need to have a prefix removed. */
|
182
172
|
target_len = git_win32__canonicalize_path(target, target_len);
|
183
173
|
|
@@ -564,19 +554,11 @@ char *p_realpath(const char *orig_path, char *buffer)
|
|
564
554
|
|
565
555
|
int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr)
|
566
556
|
{
|
567
|
-
#
|
557
|
+
#ifdef _MSC_VER
|
568
558
|
int len;
|
569
559
|
|
570
|
-
if (count == 0
|
571
|
-
|
572
|
-
|
573
|
-
#if _MSC_VER >= 1500
|
574
|
-
len = _vsnprintf_s(buffer, count, _TRUNCATE, format, argptr);
|
575
|
-
#else
|
576
|
-
len = _vsnprintf(buffer, count, format, argptr);
|
577
|
-
#endif
|
578
|
-
|
579
|
-
if (len < 0)
|
560
|
+
if (count == 0 ||
|
561
|
+
(len = _vsnprintf_s(buffer, count, _TRUNCATE, format, argptr)) < 0)
|
580
562
|
return _vscprintf(format, argptr);
|
581
563
|
|
582
564
|
return len;
|
@@ -599,7 +581,7 @@ int p_snprintf(char *buffer, size_t count, const char *format, ...)
|
|
599
581
|
|
600
582
|
int p_mkstemp(char *tmp_path)
|
601
583
|
{
|
602
|
-
#if defined(_MSC_VER)
|
584
|
+
#if defined(_MSC_VER)
|
603
585
|
if (_mktemp_s(tmp_path, strlen(tmp_path) + 1) != 0)
|
604
586
|
return -1;
|
605
587
|
#else
|
@@ -620,31 +602,6 @@ int p_access(const char* path, mode_t mode)
|
|
620
602
|
return _waccess(buf, mode);
|
621
603
|
}
|
622
604
|
|
623
|
-
static int ensure_writable(wchar_t *fpath)
|
624
|
-
{
|
625
|
-
DWORD attrs;
|
626
|
-
|
627
|
-
attrs = GetFileAttributesW(fpath);
|
628
|
-
if (attrs == INVALID_FILE_ATTRIBUTES) {
|
629
|
-
if (GetLastError() == ERROR_FILE_NOT_FOUND)
|
630
|
-
return 0;
|
631
|
-
|
632
|
-
giterr_set(GITERR_OS, "failed to get attributes");
|
633
|
-
return -1;
|
634
|
-
}
|
635
|
-
|
636
|
-
if (!(attrs & FILE_ATTRIBUTE_READONLY))
|
637
|
-
return 0;
|
638
|
-
|
639
|
-
attrs &= ~FILE_ATTRIBUTE_READONLY;
|
640
|
-
if (!SetFileAttributesW(fpath, attrs)) {
|
641
|
-
giterr_set(GITERR_OS, "failed to set attributes");
|
642
|
-
return -1;
|
643
|
-
}
|
644
|
-
|
645
|
-
return 0;
|
646
|
-
}
|
647
|
-
|
648
605
|
int p_rename(const char *from, const char *to)
|
649
606
|
{
|
650
607
|
git_win32_path wfrom;
|
@@ -656,13 +613,12 @@ int p_rename(const char *from, const char *to)
|
|
656
613
|
if (utf8_to_16_with_errno(wfrom, from) < 0 ||
|
657
614
|
utf8_to_16_with_errno(wto, to) < 0)
|
658
615
|
return -1;
|
659
|
-
|
616
|
+
|
660
617
|
/* wait up to 50ms if file is locked by another thread or process */
|
661
618
|
rename_tries = 0;
|
662
619
|
rename_succeeded = 0;
|
663
620
|
while (rename_tries < 10) {
|
664
|
-
if (
|
665
|
-
MoveFileExW(wfrom, wto, MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED) != 0) {
|
621
|
+
if (MoveFileExW(wfrom, wto, MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED) != 0) {
|
666
622
|
rename_succeeded = 1;
|
667
623
|
break;
|
668
624
|
}
|
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: 0.21.
|
4
|
+
version: 0.21.2
|
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: 2014-
|
12
|
+
date: 2014-11-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|
@@ -94,8 +94,6 @@ files:
|
|
94
94
|
- ext/rugged/rugged_tag_collection.c
|
95
95
|
- ext/rugged/rugged_tree.c
|
96
96
|
- lib/rugged.rb
|
97
|
-
- lib/rugged/attributes.rb
|
98
|
-
- lib/rugged/blob.rb
|
99
97
|
- lib/rugged/branch.rb
|
100
98
|
- lib/rugged/commit.rb
|
101
99
|
- lib/rugged/console.rb
|
@@ -119,7 +117,6 @@ files:
|
|
119
117
|
- vendor/libgit2/COPYING
|
120
118
|
- vendor/libgit2/Makefile.embed
|
121
119
|
- vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
|
122
|
-
- vendor/libgit2/cmake/Modules/FindGSSAPI.cmake
|
123
120
|
- vendor/libgit2/cmake/Modules/FindHTTP_Parser.cmake
|
124
121
|
- vendor/libgit2/cmake/Modules/FindIconv.cmake
|
125
122
|
- vendor/libgit2/cmake/Modules/FindLIBSSH2.cmake
|
@@ -138,7 +135,6 @@ files:
|
|
138
135
|
- vendor/libgit2/deps/zlib/crc32.h
|
139
136
|
- vendor/libgit2/deps/zlib/deflate.c
|
140
137
|
- vendor/libgit2/deps/zlib/deflate.h
|
141
|
-
- vendor/libgit2/deps/zlib/infback.c
|
142
138
|
- vendor/libgit2/deps/zlib/inffast.c
|
143
139
|
- vendor/libgit2/deps/zlib/inffast.h
|
144
140
|
- vendor/libgit2/deps/zlib/inffixed.h
|
@@ -181,7 +177,6 @@ files:
|
|
181
177
|
- vendor/libgit2/include/git2/odb.h
|
182
178
|
- vendor/libgit2/include/git2/odb_backend.h
|
183
179
|
- vendor/libgit2/include/git2/oid.h
|
184
|
-
- vendor/libgit2/include/git2/oidarray.h
|
185
180
|
- vendor/libgit2/include/git2/pack.h
|
186
181
|
- vendor/libgit2/include/git2/patch.h
|
187
182
|
- vendor/libgit2/include/git2/pathspec.h
|
@@ -206,7 +201,6 @@ files:
|
|
206
201
|
- vendor/libgit2/include/git2/sys/config.h
|
207
202
|
- vendor/libgit2/include/git2/sys/diff.h
|
208
203
|
- vendor/libgit2/include/git2/sys/filter.h
|
209
|
-
- vendor/libgit2/include/git2/sys/hashsig.h
|
210
204
|
- vendor/libgit2/include/git2/sys/index.h
|
211
205
|
- vendor/libgit2/include/git2/sys/mempack.h
|
212
206
|
- vendor/libgit2/include/git2/sys/odb_backend.h
|
@@ -214,7 +208,6 @@ files:
|
|
214
208
|
- vendor/libgit2/include/git2/sys/reflog.h
|
215
209
|
- vendor/libgit2/include/git2/sys/refs.h
|
216
210
|
- vendor/libgit2/include/git2/sys/repository.h
|
217
|
-
- vendor/libgit2/include/git2/sys/transport.h
|
218
211
|
- vendor/libgit2/include/git2/tag.h
|
219
212
|
- vendor/libgit2/include/git2/threads.h
|
220
213
|
- vendor/libgit2/include/git2/trace.h
|
@@ -305,6 +298,7 @@ files:
|
|
305
298
|
- vendor/libgit2/src/hash/hash_win32.c
|
306
299
|
- vendor/libgit2/src/hash/hash_win32.h
|
307
300
|
- vendor/libgit2/src/hashsig.c
|
301
|
+
- vendor/libgit2/src/hashsig.h
|
308
302
|
- vendor/libgit2/src/ident.c
|
309
303
|
- vendor/libgit2/src/ignore.c
|
310
304
|
- vendor/libgit2/src/ignore.h
|
@@ -338,8 +332,6 @@ files:
|
|
338
332
|
- vendor/libgit2/src/offmap.h
|
339
333
|
- vendor/libgit2/src/oid.c
|
340
334
|
- vendor/libgit2/src/oid.h
|
341
|
-
- vendor/libgit2/src/oidarray.c
|
342
|
-
- vendor/libgit2/src/oidarray.h
|
343
335
|
- vendor/libgit2/src/oidmap.h
|
344
336
|
- vendor/libgit2/src/pack-objects.c
|
345
337
|
- vendor/libgit2/src/pack-objects.h
|
@@ -401,12 +393,7 @@ files:
|
|
401
393
|
- vendor/libgit2/src/trace.c
|
402
394
|
- vendor/libgit2/src/trace.h
|
403
395
|
- vendor/libgit2/src/transport.c
|
404
|
-
- vendor/libgit2/src/transports/auth.c
|
405
|
-
- vendor/libgit2/src/transports/auth.h
|
406
|
-
- vendor/libgit2/src/transports/auth_negotiate.c
|
407
|
-
- vendor/libgit2/src/transports/auth_negotiate.h
|
408
396
|
- vendor/libgit2/src/transports/cred.c
|
409
|
-
- vendor/libgit2/src/transports/cred.h
|
410
397
|
- vendor/libgit2/src/transports/cred_helpers.c
|
411
398
|
- vendor/libgit2/src/transports/git.c
|
412
399
|
- vendor/libgit2/src/transports/http.c
|
@@ -484,9 +471,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
484
471
|
version: 1.9.3
|
485
472
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
486
473
|
requirements:
|
487
|
-
- - "
|
474
|
+
- - ">="
|
488
475
|
- !ruby/object:Gem::Version
|
489
|
-
version:
|
476
|
+
version: '0'
|
490
477
|
requirements: []
|
491
478
|
rubyforge_project:
|
492
479
|
rubygems_version: 2.2.2
|
data/lib/rugged/attributes.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
module Rugged
|
2
|
-
class Repository
|
3
|
-
def attributes(path, options = {})
|
4
|
-
Attributes.new(self, path, options)
|
5
|
-
end
|
6
|
-
|
7
|
-
class Attributes
|
8
|
-
include Enumerable
|
9
|
-
|
10
|
-
LOAD_PRIORITIES = {
|
11
|
-
[:file, :index] => 0,
|
12
|
-
[:index, :file] => 1,
|
13
|
-
[:index] => 2,
|
14
|
-
}
|
15
|
-
|
16
|
-
def self.parse_opts(opt)
|
17
|
-
flags = LOAD_PRIORITIES[opt[:priority]] || 0
|
18
|
-
flags |= 4 if opt[:skip_system]
|
19
|
-
flags
|
20
|
-
end
|
21
|
-
|
22
|
-
def initialize(repository, path, options = {})
|
23
|
-
@repository = repository
|
24
|
-
@path = path
|
25
|
-
@load_flags = Attributes.parse_opts(options)
|
26
|
-
end
|
27
|
-
|
28
|
-
def [](attribute)
|
29
|
-
@repository.fetch_attributes(@path, attribute, @load_flags)
|
30
|
-
end
|
31
|
-
|
32
|
-
def to_h
|
33
|
-
@hash ||= @repository.fetch_attributes(@path, nil, @load_flags)
|
34
|
-
end
|
35
|
-
|
36
|
-
def each(&block)
|
37
|
-
to_h.each(&block)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
data/lib/rugged/blob.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
module Rugged
|
2
|
-
class Blob
|
3
|
-
class HashSignature
|
4
|
-
WHITESPACE_DEFAULT = 0
|
5
|
-
WHITESPACE_IGNORE = 1
|
6
|
-
WHITESPACE_SMART = 2
|
7
|
-
end
|
8
|
-
|
9
|
-
def hashsig(options = 0)
|
10
|
-
@hashsig ||= HashSignature.new(self, options)
|
11
|
-
end
|
12
|
-
|
13
|
-
def similarity(other)
|
14
|
-
other_sig = case other
|
15
|
-
when HashSignature
|
16
|
-
other
|
17
|
-
when String
|
18
|
-
HashSignature.new(other)
|
19
|
-
when Blob
|
20
|
-
other.hashsig
|
21
|
-
else
|
22
|
-
raise TypeError, "Expected a Rugged::Blob, String or Rugged::Blob::HashSignature"
|
23
|
-
end
|
24
|
-
|
25
|
-
HashSignature.compare(self.hashsig, other_sig)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,324 +0,0 @@
|
|
1
|
-
# - Try to find GSSAPI
|
2
|
-
# Once done this will define
|
3
|
-
#
|
4
|
-
# KRB5_CONFIG - Path to krb5-config
|
5
|
-
# GSSAPI_ROOT_DIR - Set this variable to the root installation of GSSAPI
|
6
|
-
#
|
7
|
-
# Read-Only variables:
|
8
|
-
# GSSAPI_FLAVOR_MIT - set to TURE if MIT Kerberos has been found
|
9
|
-
# GSSAPI_FLAVOR_HEIMDAL - set to TRUE if Heimdal Keberos has been found
|
10
|
-
# GSSAPI_FOUND - system has GSSAPI
|
11
|
-
# GSSAPI_INCLUDE_DIR - the GSSAPI include directory
|
12
|
-
# GSSAPI_LIBRARIES - Link these to use GSSAPI
|
13
|
-
# GSSAPI_DEFINITIONS - Compiler switches required for using GSSAPI
|
14
|
-
#
|
15
|
-
#=============================================================================
|
16
|
-
# Copyright (c) 2013 Andreas Schneider <asn@cryptomilk.org>
|
17
|
-
#
|
18
|
-
# Distributed under the OSI-approved BSD License (the "License");
|
19
|
-
# see accompanying file Copyright.txt for details.
|
20
|
-
#
|
21
|
-
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
22
|
-
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
23
|
-
# See the License for more information.
|
24
|
-
#=============================================================================
|
25
|
-
#
|
26
|
-
|
27
|
-
find_path(GSSAPI_ROOT_DIR
|
28
|
-
NAMES
|
29
|
-
include/gssapi.h
|
30
|
-
include/gssapi/gssapi.h
|
31
|
-
HINTS
|
32
|
-
${_GSSAPI_ROOT_HINTS}
|
33
|
-
PATHS
|
34
|
-
${_GSSAPI_ROOT_PATHS}
|
35
|
-
)
|
36
|
-
mark_as_advanced(GSSAPI_ROOT_DIR)
|
37
|
-
|
38
|
-
if (UNIX)
|
39
|
-
find_program(KRB5_CONFIG
|
40
|
-
NAMES
|
41
|
-
krb5-config
|
42
|
-
PATHS
|
43
|
-
${GSSAPI_ROOT_DIR}/bin
|
44
|
-
/opt/local/bin)
|
45
|
-
mark_as_advanced(KRB5_CONFIG)
|
46
|
-
|
47
|
-
if (KRB5_CONFIG)
|
48
|
-
# Check if we have MIT KRB5
|
49
|
-
execute_process(
|
50
|
-
COMMAND
|
51
|
-
${KRB5_CONFIG} --vendor
|
52
|
-
RESULT_VARIABLE
|
53
|
-
_GSSAPI_VENDOR_RESULT
|
54
|
-
OUTPUT_VARIABLE
|
55
|
-
_GSSAPI_VENDOR_STRING)
|
56
|
-
|
57
|
-
if (_GSSAPI_VENDOR_STRING MATCHES ".*Massachusetts.*")
|
58
|
-
set(GSSAPI_FLAVOR_MIT TRUE)
|
59
|
-
else()
|
60
|
-
execute_process(
|
61
|
-
COMMAND
|
62
|
-
${KRB5_CONFIG} --libs gssapi
|
63
|
-
RESULT_VARIABLE
|
64
|
-
_GSSAPI_LIBS_RESULT
|
65
|
-
OUTPUT_VARIABLE
|
66
|
-
_GSSAPI_LIBS_STRING)
|
67
|
-
|
68
|
-
if (_GSSAPI_LIBS_STRING MATCHES ".*roken.*")
|
69
|
-
set(GSSAPI_FLAVOR_HEIMDAL TRUE)
|
70
|
-
endif()
|
71
|
-
endif()
|
72
|
-
|
73
|
-
# Get the include dir
|
74
|
-
execute_process(
|
75
|
-
COMMAND
|
76
|
-
${KRB5_CONFIG} --cflags gssapi
|
77
|
-
RESULT_VARIABLE
|
78
|
-
_GSSAPI_INCLUDE_RESULT
|
79
|
-
OUTPUT_VARIABLE
|
80
|
-
_GSSAPI_INCLUDE_STRING)
|
81
|
-
string(REGEX REPLACE "(\r?\n)+$" "" _GSSAPI_INCLUDE_STRING "${_GSSAPI_INCLUDE_STRING}")
|
82
|
-
string(REGEX REPLACE " *-I" "" _GSSAPI_INCLUDEDIR "${_GSSAPI_INCLUDE_STRING}")
|
83
|
-
endif()
|
84
|
-
|
85
|
-
if (NOT GSSAPI_FLAVOR_MIT AND NOT GSSAPI_FLAVOR_HEIMDAL)
|
86
|
-
# Check for HEIMDAL
|
87
|
-
find_package(PkgConfig)
|
88
|
-
if (PKG_CONFIG_FOUND)
|
89
|
-
pkg_check_modules(_GSSAPI heimdal-gssapi)
|
90
|
-
endif (PKG_CONFIG_FOUND)
|
91
|
-
|
92
|
-
if (_GSSAPI_FOUND)
|
93
|
-
set(GSSAPI_FLAVOR_HEIMDAL TRUE)
|
94
|
-
else()
|
95
|
-
find_path(_GSSAPI_ROKEN
|
96
|
-
NAMES
|
97
|
-
roken.h
|
98
|
-
PATHS
|
99
|
-
${GSSAPI_ROOT_DIR}/include
|
100
|
-
${_GSSAPI_INCLUDEDIR})
|
101
|
-
if (_GSSAPI_ROKEN)
|
102
|
-
set(GSSAPI_FLAVOR_HEIMDAL TRUE)
|
103
|
-
endif()
|
104
|
-
endif ()
|
105
|
-
endif()
|
106
|
-
endif (UNIX)
|
107
|
-
|
108
|
-
find_path(GSSAPI_INCLUDE_DIR
|
109
|
-
NAMES
|
110
|
-
gssapi.h
|
111
|
-
gssapi/gssapi.h
|
112
|
-
PATHS
|
113
|
-
${GSSAPI_ROOT_DIR}/include
|
114
|
-
${_GSSAPI_INCLUDEDIR}
|
115
|
-
)
|
116
|
-
|
117
|
-
if (GSSAPI_FLAVOR_MIT)
|
118
|
-
find_library(GSSAPI_LIBRARY
|
119
|
-
NAMES
|
120
|
-
gssapi_krb5
|
121
|
-
PATHS
|
122
|
-
${GSSAPI_ROOT_DIR}/lib
|
123
|
-
${_GSSAPI_LIBDIR}
|
124
|
-
)
|
125
|
-
|
126
|
-
find_library(KRB5_LIBRARY
|
127
|
-
NAMES
|
128
|
-
krb5
|
129
|
-
PATHS
|
130
|
-
${GSSAPI_ROOT_DIR}/lib
|
131
|
-
${_GSSAPI_LIBDIR}
|
132
|
-
)
|
133
|
-
|
134
|
-
find_library(K5CRYPTO_LIBRARY
|
135
|
-
NAMES
|
136
|
-
k5crypto
|
137
|
-
PATHS
|
138
|
-
${GSSAPI_ROOT_DIR}/lib
|
139
|
-
${_GSSAPI_LIBDIR}
|
140
|
-
)
|
141
|
-
|
142
|
-
find_library(COM_ERR_LIBRARY
|
143
|
-
NAMES
|
144
|
-
com_err
|
145
|
-
PATHS
|
146
|
-
${GSSAPI_ROOT_DIR}/lib
|
147
|
-
${_GSSAPI_LIBDIR}
|
148
|
-
)
|
149
|
-
|
150
|
-
if (GSSAPI_LIBRARY)
|
151
|
-
set(GSSAPI_LIBRARIES
|
152
|
-
${GSSAPI_LIBRARIES}
|
153
|
-
${GSSAPI_LIBRARY}
|
154
|
-
)
|
155
|
-
endif (GSSAPI_LIBRARY)
|
156
|
-
|
157
|
-
if (KRB5_LIBRARY)
|
158
|
-
set(GSSAPI_LIBRARIES
|
159
|
-
${GSSAPI_LIBRARIES}
|
160
|
-
${KRB5_LIBRARY}
|
161
|
-
)
|
162
|
-
endif (KRB5_LIBRARY)
|
163
|
-
|
164
|
-
if (K5CRYPTO_LIBRARY)
|
165
|
-
set(GSSAPI_LIBRARIES
|
166
|
-
${GSSAPI_LIBRARIES}
|
167
|
-
${K5CRYPTO_LIBRARY}
|
168
|
-
)
|
169
|
-
endif (K5CRYPTO_LIBRARY)
|
170
|
-
|
171
|
-
if (COM_ERR_LIBRARY)
|
172
|
-
set(GSSAPI_LIBRARIES
|
173
|
-
${GSSAPI_LIBRARIES}
|
174
|
-
${COM_ERR_LIBRARY}
|
175
|
-
)
|
176
|
-
endif (COM_ERR_LIBRARY)
|
177
|
-
endif (GSSAPI_FLAVOR_MIT)
|
178
|
-
|
179
|
-
if (GSSAPI_FLAVOR_HEIMDAL)
|
180
|
-
find_library(GSSAPI_LIBRARY
|
181
|
-
NAMES
|
182
|
-
gssapi
|
183
|
-
PATHS
|
184
|
-
${GSSAPI_ROOT_DIR}/lib
|
185
|
-
${_GSSAPI_LIBDIR}
|
186
|
-
)
|
187
|
-
|
188
|
-
find_library(KRB5_LIBRARY
|
189
|
-
NAMES
|
190
|
-
krb5
|
191
|
-
PATHS
|
192
|
-
${GSSAPI_ROOT_DIR}/lib
|
193
|
-
${_GSSAPI_LIBDIR}
|
194
|
-
)
|
195
|
-
|
196
|
-
find_library(HCRYPTO_LIBRARY
|
197
|
-
NAMES
|
198
|
-
hcrypto
|
199
|
-
PATHS
|
200
|
-
${GSSAPI_ROOT_DIR}/lib
|
201
|
-
${_GSSAPI_LIBDIR}
|
202
|
-
)
|
203
|
-
|
204
|
-
find_library(COM_ERR_LIBRARY
|
205
|
-
NAMES
|
206
|
-
com_err
|
207
|
-
PATHS
|
208
|
-
${GSSAPI_ROOT_DIR}/lib
|
209
|
-
${_GSSAPI_LIBDIR}
|
210
|
-
)
|
211
|
-
|
212
|
-
find_library(HEIMNTLM_LIBRARY
|
213
|
-
NAMES
|
214
|
-
heimntlm
|
215
|
-
PATHS
|
216
|
-
${GSSAPI_ROOT_DIR}/lib
|
217
|
-
${_GSSAPI_LIBDIR}
|
218
|
-
)
|
219
|
-
|
220
|
-
find_library(HX509_LIBRARY
|
221
|
-
NAMES
|
222
|
-
hx509
|
223
|
-
PATHS
|
224
|
-
${GSSAPI_ROOT_DIR}/lib
|
225
|
-
${_GSSAPI_LIBDIR}
|
226
|
-
)
|
227
|
-
|
228
|
-
find_library(ASN1_LIBRARY
|
229
|
-
NAMES
|
230
|
-
asn1
|
231
|
-
PATHS
|
232
|
-
${GSSAPI_ROOT_DIR}/lib
|
233
|
-
${_GSSAPI_LIBDIR}
|
234
|
-
)
|
235
|
-
|
236
|
-
find_library(WIND_LIBRARY
|
237
|
-
NAMES
|
238
|
-
wind
|
239
|
-
PATHS
|
240
|
-
${GSSAPI_ROOT_DIR}/lib
|
241
|
-
${_GSSAPI_LIBDIR}
|
242
|
-
)
|
243
|
-
|
244
|
-
find_library(ROKEN_LIBRARY
|
245
|
-
NAMES
|
246
|
-
roken
|
247
|
-
PATHS
|
248
|
-
${GSSAPI_ROOT_DIR}/lib
|
249
|
-
${_GSSAPI_LIBDIR}
|
250
|
-
)
|
251
|
-
|
252
|
-
if (GSSAPI_LIBRARY)
|
253
|
-
set(GSSAPI_LIBRARIES
|
254
|
-
${GSSAPI_LIBRARIES}
|
255
|
-
${GSSAPI_LIBRARY}
|
256
|
-
)
|
257
|
-
endif (GSSAPI_LIBRARY)
|
258
|
-
|
259
|
-
if (KRB5_LIBRARY)
|
260
|
-
set(GSSAPI_LIBRARIES
|
261
|
-
${GSSAPI_LIBRARIES}
|
262
|
-
${KRB5_LIBRARY}
|
263
|
-
)
|
264
|
-
endif (KRB5_LIBRARY)
|
265
|
-
|
266
|
-
if (HCRYPTO_LIBRARY)
|
267
|
-
set(GSSAPI_LIBRARIES
|
268
|
-
${GSSAPI_LIBRARIES}
|
269
|
-
${HCRYPTO_LIBRARY}
|
270
|
-
)
|
271
|
-
endif (HCRYPTO_LIBRARY)
|
272
|
-
|
273
|
-
if (COM_ERR_LIBRARY)
|
274
|
-
set(GSSAPI_LIBRARIES
|
275
|
-
${GSSAPI_LIBRARIES}
|
276
|
-
${COM_ERR_LIBRARY}
|
277
|
-
)
|
278
|
-
endif (COM_ERR_LIBRARY)
|
279
|
-
|
280
|
-
if (HEIMNTLM_LIBRARY)
|
281
|
-
set(GSSAPI_LIBRARIES
|
282
|
-
${GSSAPI_LIBRARIES}
|
283
|
-
${HEIMNTLM_LIBRARY}
|
284
|
-
)
|
285
|
-
endif (HEIMNTLM_LIBRARY)
|
286
|
-
|
287
|
-
if (HX509_LIBRARY)
|
288
|
-
set(GSSAPI_LIBRARIES
|
289
|
-
${GSSAPI_LIBRARIES}
|
290
|
-
${HX509_LIBRARY}
|
291
|
-
)
|
292
|
-
endif (HX509_LIBRARY)
|
293
|
-
|
294
|
-
if (ASN1_LIBRARY)
|
295
|
-
set(GSSAPI_LIBRARIES
|
296
|
-
${GSSAPI_LIBRARIES}
|
297
|
-
${ASN1_LIBRARY}
|
298
|
-
)
|
299
|
-
endif (ASN1_LIBRARY)
|
300
|
-
|
301
|
-
if (WIND_LIBRARY)
|
302
|
-
set(GSSAPI_LIBRARIES
|
303
|
-
${GSSAPI_LIBRARIES}
|
304
|
-
${WIND_LIBRARY}
|
305
|
-
)
|
306
|
-
endif (WIND_LIBRARY)
|
307
|
-
|
308
|
-
if (ROKEN_LIBRARY)
|
309
|
-
set(GSSAPI_LIBRARIES
|
310
|
-
${GSSAPI_LIBRARIES}
|
311
|
-
${WIND_LIBRARY}
|
312
|
-
)
|
313
|
-
endif (ROKEN_LIBRARY)
|
314
|
-
endif (GSSAPI_FLAVOR_HEIMDAL)
|
315
|
-
|
316
|
-
include(FindPackageHandleStandardArgs)
|
317
|
-
find_package_handle_standard_args(GSSAPI DEFAULT_MSG GSSAPI_LIBRARIES GSSAPI_INCLUDE_DIR)
|
318
|
-
|
319
|
-
if (GSSAPI_INCLUDE_DIRS AND GSSAPI_LIBRARIES)
|
320
|
-
set(GSSAPI_FOUND TRUE)
|
321
|
-
endif (GSSAPI_INCLUDE_DIRS AND GSSAPI_LIBRARIES)
|
322
|
-
|
323
|
-
# show the GSSAPI_INCLUDE_DIRS and GSSAPI_LIBRARIES variables only in the advanced view
|
324
|
-
mark_as_advanced(GSSAPI_INCLUDE_DIRS GSSAPI_LIBRARIES)
|