rugged 0.23.0b1 → 0.23.0b2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rugged/rugged_note.c +7 -2
- data/ext/rugged/rugged_revwalk.c +321 -145
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +83 -8
- data/vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake +9 -0
- data/vendor/libgit2/cmake/Modules/FindIconv.cmake +0 -3
- data/vendor/libgit2/cmake/Modules/FindSecurity.cmake +9 -0
- data/vendor/libgit2/deps/winhttp/urlmon.h +45 -0
- data/vendor/libgit2/deps/winhttp/winhttp.def +29 -0
- data/vendor/libgit2/deps/winhttp/winhttp.h +592 -0
- data/vendor/libgit2/deps/winhttp/winhttp64.def +29 -0
- data/vendor/libgit2/include/git2/diff.h +6 -1
- data/vendor/libgit2/include/git2/index.h +1 -1
- data/vendor/libgit2/include/git2/merge.h +2 -1
- data/vendor/libgit2/include/git2/notes.h +2 -2
- data/vendor/libgit2/include/git2/pack.h +12 -0
- data/vendor/libgit2/include/git2/push.h +30 -0
- data/vendor/libgit2/include/git2/rebase.h +36 -16
- data/vendor/libgit2/include/git2/remote.h +6 -0
- data/vendor/libgit2/include/git2/reset.h +2 -2
- data/vendor/libgit2/include/git2/revwalk.h +10 -8
- data/vendor/libgit2/include/git2/submodule.h +16 -0
- data/vendor/libgit2/include/git2/sys/transport.h +12 -4
- data/vendor/libgit2/include/git2/types.h +1 -0
- data/vendor/libgit2/src/attr.c +3 -3
- data/vendor/libgit2/src/attr_file.c +24 -3
- data/vendor/libgit2/src/attr_file.h +3 -1
- data/vendor/libgit2/src/checkout.c +31 -7
- data/vendor/libgit2/src/config.c +5 -6
- data/vendor/libgit2/src/config_file.c +533 -469
- data/vendor/libgit2/src/describe.c +1 -1
- data/vendor/libgit2/src/diff.c +20 -10
- data/vendor/libgit2/src/diff_driver.c +1 -1
- data/vendor/libgit2/src/diff_tform.c +8 -2
- data/vendor/libgit2/src/filter.c +6 -3
- data/vendor/libgit2/src/global.c +17 -15
- data/vendor/libgit2/src/global.h +3 -1
- data/vendor/libgit2/src/ignore.c +48 -8
- data/vendor/libgit2/src/ignore.h +1 -1
- data/vendor/libgit2/src/index.c +12 -8
- data/vendor/libgit2/src/iterator.c +133 -12
- data/vendor/libgit2/src/netops.h +2 -2
- data/vendor/libgit2/src/notes.c +40 -21
- data/vendor/libgit2/src/openssl_stream.c +5 -1
- data/vendor/libgit2/src/pack-objects.c +36 -0
- data/vendor/libgit2/src/path.c +277 -140
- data/vendor/libgit2/src/path.h +132 -60
- data/vendor/libgit2/src/posix.h +0 -1
- data/vendor/libgit2/src/push.c +43 -4
- data/vendor/libgit2/src/push.h +8 -1
- data/vendor/libgit2/src/rebase.c +139 -119
- data/vendor/libgit2/src/reflog.c +1 -1
- data/vendor/libgit2/src/refs.c +3 -5
- data/vendor/libgit2/src/remote.c +6 -5
- data/vendor/libgit2/src/repository.c +7 -3
- data/vendor/libgit2/src/reset.c +3 -3
- data/vendor/libgit2/src/revwalk.c +26 -2
- data/vendor/libgit2/src/settings.c +3 -3
- data/vendor/libgit2/src/stransport_stream.c +249 -0
- data/vendor/libgit2/src/stransport_stream.h +14 -0
- data/vendor/libgit2/src/submodule.c +26 -2
- data/vendor/libgit2/src/tls_stream.c +28 -0
- data/vendor/libgit2/src/tls_stream.h +21 -0
- data/vendor/libgit2/src/transport.c +4 -4
- data/vendor/libgit2/src/transports/git.c +4 -1
- data/vendor/libgit2/src/transports/http.c +6 -4
- data/vendor/libgit2/src/transports/local.c +2 -1
- data/vendor/libgit2/src/transports/smart.c +1 -1
- data/vendor/libgit2/src/transports/ssh.c +5 -1
- data/vendor/libgit2/src/transports/winhttp.c +30 -23
- data/vendor/libgit2/src/tree.c +2 -2
- data/vendor/libgit2/src/unix/posix.h +1 -0
- data/vendor/libgit2/src/util.h +117 -0
- data/vendor/libgit2/src/win32/buffer.c +55 -0
- data/vendor/libgit2/src/win32/buffer.h +18 -0
- data/vendor/libgit2/src/win32/path_w32.c +75 -0
- data/vendor/libgit2/src/win32/path_w32.h +3 -0
- data/vendor/libgit2/src/win32/posix.h +2 -2
- data/vendor/libgit2/src/win32/posix_w32.c +2 -118
- data/vendor/libgit2/src/win32/pthread.c +2 -0
- data/vendor/libgit2/src/win32/utf-conv.c +0 -4
- data/vendor/libgit2/src/win32/utf-conv.h +4 -0
- data/vendor/libgit2/src/win32/w32_util.h +72 -0
- metadata +14 -2
@@ -9,8 +9,21 @@
|
|
9
9
|
#define INCLUDE_w32_util_h__
|
10
10
|
|
11
11
|
#include "utf-conv.h"
|
12
|
+
#include "posix.h"
|
12
13
|
#include "path_w32.h"
|
13
14
|
|
15
|
+
/*
|
16
|
+
|
17
|
+
#include "common.h"
|
18
|
+
#include "path.h"
|
19
|
+
#include "path_w32.h"
|
20
|
+
#include "utf-conv.h"
|
21
|
+
#include "posix.h"
|
22
|
+
#include "reparse.h"
|
23
|
+
#include "dir.h"
|
24
|
+
*/
|
25
|
+
|
26
|
+
|
14
27
|
GIT_INLINE(bool) git_win32__isalpha(wchar_t c)
|
15
28
|
{
|
16
29
|
return ((c >= L'A' && c <= L'Z') || (c >= L'a' && c <= L'z'));
|
@@ -52,4 +65,63 @@ size_t git_win32__path_trim_end(wchar_t *str, size_t len);
|
|
52
65
|
*/
|
53
66
|
size_t git_win32__canonicalize_path(wchar_t *str, size_t len);
|
54
67
|
|
68
|
+
/**
|
69
|
+
* Converts a FILETIME structure to a time_t.
|
70
|
+
*
|
71
|
+
* @param FILETIME A pointer to a FILETIME
|
72
|
+
* @return A time_t containing the same time
|
73
|
+
*/
|
74
|
+
GIT_INLINE(time_t) git_win32__filetime_to_time_t(const FILETIME *ft)
|
75
|
+
{
|
76
|
+
long long winTime = ((long long)ft->dwHighDateTime << 32) + ft->dwLowDateTime;
|
77
|
+
winTime -= 116444736000000000LL; /* Windows to Unix Epoch conversion */
|
78
|
+
winTime /= 10000000; /* Nano to seconds resolution */
|
79
|
+
return (time_t)winTime;
|
80
|
+
}
|
81
|
+
|
82
|
+
GIT_INLINE(int) git_win32__file_attribute_to_stat(
|
83
|
+
struct stat *st,
|
84
|
+
const WIN32_FILE_ATTRIBUTE_DATA *attrdata,
|
85
|
+
const wchar_t *path)
|
86
|
+
{
|
87
|
+
mode_t mode = S_IREAD;
|
88
|
+
|
89
|
+
if (attrdata->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
90
|
+
mode |= S_IFDIR;
|
91
|
+
else
|
92
|
+
mode |= S_IFREG;
|
93
|
+
|
94
|
+
if ((attrdata->dwFileAttributes & FILE_ATTRIBUTE_READONLY) == 0)
|
95
|
+
mode |= S_IWRITE;
|
96
|
+
|
97
|
+
st->st_ino = 0;
|
98
|
+
st->st_gid = 0;
|
99
|
+
st->st_uid = 0;
|
100
|
+
st->st_nlink = 1;
|
101
|
+
st->st_mode = mode;
|
102
|
+
st->st_size = ((git_off_t)attrdata->nFileSizeHigh << 32) + attrdata->nFileSizeLow;
|
103
|
+
st->st_dev = _getdrive() - 1;
|
104
|
+
st->st_rdev = st->st_dev;
|
105
|
+
st->st_atime = git_win32__filetime_to_time_t(&(attrdata->ftLastAccessTime));
|
106
|
+
st->st_mtime = git_win32__filetime_to_time_t(&(attrdata->ftLastWriteTime));
|
107
|
+
st->st_ctime = git_win32__filetime_to_time_t(&(attrdata->ftCreationTime));
|
108
|
+
|
109
|
+
if (attrdata->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT && path) {
|
110
|
+
git_win32_path target;
|
111
|
+
|
112
|
+
if (git_win32_path_readlink_w(target, path) >= 0) {
|
113
|
+
st->st_mode = (st->st_mode & ~S_IFMT) | S_IFLNK;
|
114
|
+
|
115
|
+
/* st_size gets the UTF-8 length of the target name, in bytes,
|
116
|
+
* not counting the NULL terminator */
|
117
|
+
if ((st->st_size = git__utf16_to_8(NULL, 0, target)) < 0) {
|
118
|
+
giterr_set(GITERR_OS, "Could not convert reparse point name for '%s'", path);
|
119
|
+
return -1;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
return 0;
|
125
|
+
}
|
126
|
+
|
55
127
|
#endif
|
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.23.
|
4
|
+
version: 0.23.0b2
|
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: 2015-
|
12
|
+
date: 2015-05-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|
@@ -123,9 +123,11 @@ files:
|
|
123
123
|
- vendor/libgit2/COPYING
|
124
124
|
- vendor/libgit2/Makefile.embed
|
125
125
|
- vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
|
126
|
+
- vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake
|
126
127
|
- vendor/libgit2/cmake/Modules/FindGSSAPI.cmake
|
127
128
|
- vendor/libgit2/cmake/Modules/FindHTTP_Parser.cmake
|
128
129
|
- vendor/libgit2/cmake/Modules/FindIconv.cmake
|
130
|
+
- vendor/libgit2/cmake/Modules/FindSecurity.cmake
|
129
131
|
- vendor/libgit2/deps/http-parser/LICENSE-MIT
|
130
132
|
- vendor/libgit2/deps/http-parser/http_parser.c
|
131
133
|
- vendor/libgit2/deps/http-parser/http_parser.h
|
@@ -136,6 +138,10 @@ files:
|
|
136
138
|
- vendor/libgit2/deps/regex/regex_internal.c
|
137
139
|
- vendor/libgit2/deps/regex/regex_internal.h
|
138
140
|
- vendor/libgit2/deps/regex/regexec.c
|
141
|
+
- vendor/libgit2/deps/winhttp/urlmon.h
|
142
|
+
- vendor/libgit2/deps/winhttp/winhttp.def
|
143
|
+
- vendor/libgit2/deps/winhttp/winhttp.h
|
144
|
+
- vendor/libgit2/deps/winhttp/winhttp64.def
|
139
145
|
- vendor/libgit2/deps/zlib/adler32.c
|
140
146
|
- vendor/libgit2/deps/zlib/crc32.c
|
141
147
|
- vendor/libgit2/deps/zlib/crc32.h
|
@@ -405,6 +411,8 @@ files:
|
|
405
411
|
- vendor/libgit2/src/stash.c
|
406
412
|
- vendor/libgit2/src/status.c
|
407
413
|
- vendor/libgit2/src/status.h
|
414
|
+
- vendor/libgit2/src/stransport_stream.c
|
415
|
+
- vendor/libgit2/src/stransport_stream.h
|
408
416
|
- vendor/libgit2/src/stream.h
|
409
417
|
- vendor/libgit2/src/strmap.c
|
410
418
|
- vendor/libgit2/src/strmap.h
|
@@ -417,6 +425,8 @@ files:
|
|
417
425
|
- vendor/libgit2/src/tag.h
|
418
426
|
- vendor/libgit2/src/thread-utils.c
|
419
427
|
- vendor/libgit2/src/thread-utils.h
|
428
|
+
- vendor/libgit2/src/tls_stream.c
|
429
|
+
- vendor/libgit2/src/tls_stream.h
|
420
430
|
- vendor/libgit2/src/trace.c
|
421
431
|
- vendor/libgit2/src/trace.h
|
422
432
|
- vendor/libgit2/src/transaction.c
|
@@ -450,6 +460,8 @@ files:
|
|
450
460
|
- vendor/libgit2/src/util.h
|
451
461
|
- vendor/libgit2/src/vector.c
|
452
462
|
- vendor/libgit2/src/vector.h
|
463
|
+
- vendor/libgit2/src/win32/buffer.c
|
464
|
+
- vendor/libgit2/src/win32/buffer.h
|
453
465
|
- vendor/libgit2/src/win32/dir.c
|
454
466
|
- vendor/libgit2/src/win32/dir.h
|
455
467
|
- vendor/libgit2/src/win32/error.c
|