rugged 0.25.0b2 → 0.25.0b3
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/LICENSE +1 -1
- data/ext/rugged/extconf.rb +3 -1
- data/ext/rugged/rugged.c +1 -1
- data/ext/rugged/rugged.h +1 -1
- data/ext/rugged/rugged_blob.c +29 -38
- data/ext/rugged/rugged_commit.c +215 -78
- data/ext/rugged/rugged_rebase.c +18 -11
- data/ext/rugged/rugged_remote.c +2 -2
- data/ext/rugged/rugged_tree.c +132 -0
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +11 -3
- data/vendor/libgit2/include/git2.h +1 -0
- data/vendor/libgit2/include/git2/blob.h +39 -28
- data/vendor/libgit2/include/git2/commit.h +30 -0
- data/vendor/libgit2/include/git2/common.h +16 -1
- data/vendor/libgit2/include/git2/merge.h +10 -1
- data/vendor/libgit2/include/git2/proxy.h +92 -0
- data/vendor/libgit2/include/git2/refs.h +11 -0
- data/vendor/libgit2/include/git2/remote.h +17 -4
- data/vendor/libgit2/include/git2/signature.h +13 -0
- data/vendor/libgit2/include/git2/sys/merge.h +177 -0
- data/vendor/libgit2/include/git2/sys/remote.h +16 -0
- data/vendor/libgit2/include/git2/sys/stream.h +2 -1
- data/vendor/libgit2/include/git2/sys/transport.h +3 -1
- data/vendor/libgit2/include/git2/tag.h +9 -0
- data/vendor/libgit2/include/git2/tree.h +55 -0
- data/vendor/libgit2/src/annotated_commit.c +99 -80
- data/vendor/libgit2/src/annotated_commit.h +5 -2
- data/vendor/libgit2/src/array.h +40 -0
- data/vendor/libgit2/src/blame.c +8 -3
- data/vendor/libgit2/src/blame_git.c +2 -1
- data/vendor/libgit2/src/blob.c +71 -39
- data/vendor/libgit2/src/branch.c +2 -1
- data/vendor/libgit2/src/checkout.c +66 -42
- data/vendor/libgit2/src/commit.c +67 -3
- data/vendor/libgit2/src/config_cache.c +2 -1
- data/vendor/libgit2/src/config_file.c +32 -27
- data/vendor/libgit2/src/curl_stream.c +89 -6
- data/vendor/libgit2/src/delta-apply.c +36 -5
- data/vendor/libgit2/src/delta-apply.h +12 -0
- data/vendor/libgit2/src/describe.c +3 -2
- data/vendor/libgit2/src/diff.c +13 -20
- data/vendor/libgit2/src/diff_tform.c +5 -3
- data/vendor/libgit2/src/filebuf.c +12 -2
- data/vendor/libgit2/src/filebuf.h +1 -0
- data/vendor/libgit2/src/fnmatch.c +18 -5
- data/vendor/libgit2/src/global.c +18 -0
- data/vendor/libgit2/src/global.h +1 -0
- data/vendor/libgit2/src/ignore.c +11 -3
- data/vendor/libgit2/src/index.c +11 -5
- data/vendor/libgit2/src/indexer.c +11 -7
- data/vendor/libgit2/src/iterator.c +1575 -1468
- data/vendor/libgit2/src/iterator.h +52 -69
- data/vendor/libgit2/src/merge.c +160 -63
- data/vendor/libgit2/src/merge.h +61 -2
- data/vendor/libgit2/src/merge_driver.c +397 -0
- data/vendor/libgit2/src/merge_driver.h +60 -0
- data/vendor/libgit2/src/merge_file.c +11 -49
- data/vendor/libgit2/src/netops.c +12 -10
- data/vendor/libgit2/src/object.c +3 -6
- data/vendor/libgit2/src/object_api.c +19 -1
- data/vendor/libgit2/src/odb_loose.c +1 -1
- data/vendor/libgit2/src/openssl_stream.c +16 -3
- data/vendor/libgit2/src/pack-objects.c +3 -1
- data/vendor/libgit2/src/pack.c +5 -9
- data/vendor/libgit2/src/path.c +14 -0
- data/vendor/libgit2/src/path.h +12 -0
- data/vendor/libgit2/src/pathspec.c +1 -1
- data/vendor/libgit2/src/posix.c +7 -0
- data/vendor/libgit2/src/posix.h +1 -0
- data/vendor/libgit2/src/proxy.c +32 -0
- data/vendor/libgit2/src/proxy.h +14 -0
- data/vendor/libgit2/src/push.c +7 -7
- data/vendor/libgit2/src/rebase.c +61 -31
- data/vendor/libgit2/src/refdb_fs.c +1 -0
- data/vendor/libgit2/src/refs.c +16 -1
- data/vendor/libgit2/src/remote.c +20 -6
- data/vendor/libgit2/src/repository.c +1 -1
- data/vendor/libgit2/src/reset.c +1 -1
- data/vendor/libgit2/src/settings.c +23 -1
- data/vendor/libgit2/src/signature.c +26 -1
- data/vendor/libgit2/src/stransport_stream.c +5 -2
- data/vendor/libgit2/src/stream.h +2 -2
- data/vendor/libgit2/src/submodule.c +3 -2
- data/vendor/libgit2/src/tag.c +8 -2
- data/vendor/libgit2/src/transports/http.c +32 -9
- data/vendor/libgit2/src/transports/local.c +4 -1
- data/vendor/libgit2/src/transports/smart.c +6 -0
- data/vendor/libgit2/src/transports/smart.h +1 -0
- data/vendor/libgit2/src/transports/smart_protocol.c +61 -17
- data/vendor/libgit2/src/transports/winhttp.c +130 -11
- data/vendor/libgit2/src/tree.c +329 -98
- data/vendor/libgit2/src/tree.h +4 -5
- data/vendor/libgit2/src/unix/map.c +5 -0
- data/vendor/libgit2/src/win32/map.c +24 -5
- data/vendor/libgit2/src/xdiff/xprepare.c +2 -1
- metadata +10 -4
- data/vendor/libgit2/Makefile.embed +0 -60
data/vendor/libgit2/src/tree.h
CHANGED
|
@@ -17,15 +17,14 @@
|
|
|
17
17
|
struct git_tree_entry {
|
|
18
18
|
uint16_t attr;
|
|
19
19
|
uint16_t filename_len;
|
|
20
|
-
git_oid oid;
|
|
21
|
-
|
|
22
|
-
char filename[GIT_FLEX_ARRAY];
|
|
20
|
+
const git_oid *oid;
|
|
21
|
+
const char *filename;
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
struct git_tree {
|
|
26
25
|
git_object object;
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
git_odb_object *odb_obj;
|
|
27
|
+
git_array_t(git_tree_entry) entries;
|
|
29
28
|
};
|
|
30
29
|
|
|
31
30
|
struct git_treebuilder {
|
|
@@ -24,6 +24,11 @@ int git__page_size(size_t *page_size)
|
|
|
24
24
|
return 0;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
int git__mmap_alignment(size_t *alignment)
|
|
28
|
+
{
|
|
29
|
+
return git__page_size(alignment);
|
|
30
|
+
}
|
|
31
|
+
|
|
27
32
|
int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offset)
|
|
28
33
|
{
|
|
29
34
|
int mprot = PROT_READ;
|
|
@@ -17,22 +17,41 @@ static DWORD get_page_size(void)
|
|
|
17
17
|
|
|
18
18
|
if (!page_size) {
|
|
19
19
|
GetSystemInfo(&sys);
|
|
20
|
-
page_size = sys.
|
|
20
|
+
page_size = sys.dwPageSize;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
return page_size;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
static DWORD get_allocation_granularity(void)
|
|
27
|
+
{
|
|
28
|
+
static DWORD granularity;
|
|
29
|
+
SYSTEM_INFO sys;
|
|
30
|
+
|
|
31
|
+
if (!granularity) {
|
|
32
|
+
GetSystemInfo(&sys);
|
|
33
|
+
granularity = sys.dwAllocationGranularity;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return granularity;
|
|
37
|
+
}
|
|
38
|
+
|
|
26
39
|
int git__page_size(size_t *page_size)
|
|
27
40
|
{
|
|
28
41
|
*page_size = get_page_size();
|
|
29
42
|
return 0;
|
|
30
43
|
}
|
|
31
44
|
|
|
45
|
+
int git__mmap_alignment(size_t *page_size)
|
|
46
|
+
{
|
|
47
|
+
*page_size = get_allocation_granularity();
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
32
51
|
int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offset)
|
|
33
52
|
{
|
|
34
53
|
HANDLE fh = (HANDLE)_get_osfhandle(fd);
|
|
35
|
-
DWORD
|
|
54
|
+
DWORD alignment = get_allocation_granularity();
|
|
36
55
|
DWORD fmap_prot = 0;
|
|
37
56
|
DWORD view_prot = 0;
|
|
38
57
|
DWORD off_low = 0;
|
|
@@ -62,12 +81,12 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs
|
|
|
62
81
|
if (prot & GIT_PROT_READ)
|
|
63
82
|
view_prot |= FILE_MAP_READ;
|
|
64
83
|
|
|
65
|
-
page_start = (offset /
|
|
84
|
+
page_start = (offset / alignment) * alignment;
|
|
66
85
|
page_offset = offset - page_start;
|
|
67
86
|
|
|
68
|
-
if (page_offset != 0) { /* offset must be multiple of
|
|
87
|
+
if (page_offset != 0) { /* offset must be multiple of the allocation granularity */
|
|
69
88
|
errno = EINVAL;
|
|
70
|
-
giterr_set(GITERR_OS, "Failed to mmap. Offset must be multiple of
|
|
89
|
+
giterr_set(GITERR_OS, "Failed to mmap. Offset must be multiple of allocation granularity");
|
|
71
90
|
return -1;
|
|
72
91
|
}
|
|
73
92
|
|
|
@@ -301,10 +301,11 @@ int xdl_prepare_env(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
|
|
|
301
301
|
|
|
302
302
|
xdl_free_ctx(&xe->xdf2);
|
|
303
303
|
xdl_free_ctx(&xe->xdf1);
|
|
304
|
+
xdl_free_classifier(&cf);
|
|
304
305
|
return -1;
|
|
305
306
|
}
|
|
306
307
|
|
|
307
|
-
if (
|
|
308
|
+
if (XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF)
|
|
308
309
|
xdl_free_classifier(&cf);
|
|
309
310
|
|
|
310
311
|
return 0;
|
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.25.
|
|
4
|
+
version: 0.25.0b3
|
|
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: 2016-
|
|
12
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake-compiler
|
|
@@ -122,7 +122,6 @@ files:
|
|
|
122
122
|
- vendor/libgit2/AUTHORS
|
|
123
123
|
- vendor/libgit2/CMakeLists.txt
|
|
124
124
|
- vendor/libgit2/COPYING
|
|
125
|
-
- vendor/libgit2/Makefile.embed
|
|
126
125
|
- vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
|
|
127
126
|
- vendor/libgit2/cmake/Modules/FindCoreFoundation.cmake
|
|
128
127
|
- vendor/libgit2/cmake/Modules/FindGSSAPI.cmake
|
|
@@ -198,6 +197,7 @@ files:
|
|
|
198
197
|
- vendor/libgit2/include/git2/pack.h
|
|
199
198
|
- vendor/libgit2/include/git2/patch.h
|
|
200
199
|
- vendor/libgit2/include/git2/pathspec.h
|
|
200
|
+
- vendor/libgit2/include/git2/proxy.h
|
|
201
201
|
- vendor/libgit2/include/git2/rebase.h
|
|
202
202
|
- vendor/libgit2/include/git2/refdb.h
|
|
203
203
|
- vendor/libgit2/include/git2/reflog.h
|
|
@@ -222,11 +222,13 @@ files:
|
|
|
222
222
|
- vendor/libgit2/include/git2/sys/hashsig.h
|
|
223
223
|
- vendor/libgit2/include/git2/sys/index.h
|
|
224
224
|
- vendor/libgit2/include/git2/sys/mempack.h
|
|
225
|
+
- vendor/libgit2/include/git2/sys/merge.h
|
|
225
226
|
- vendor/libgit2/include/git2/sys/odb_backend.h
|
|
226
227
|
- vendor/libgit2/include/git2/sys/openssl.h
|
|
227
228
|
- vendor/libgit2/include/git2/sys/refdb_backend.h
|
|
228
229
|
- vendor/libgit2/include/git2/sys/reflog.h
|
|
229
230
|
- vendor/libgit2/include/git2/sys/refs.h
|
|
231
|
+
- vendor/libgit2/include/git2/sys/remote.h
|
|
230
232
|
- vendor/libgit2/include/git2/sys/repository.h
|
|
231
233
|
- vendor/libgit2/include/git2/sys/stream.h
|
|
232
234
|
- vendor/libgit2/include/git2/sys/transport.h
|
|
@@ -339,6 +341,8 @@ files:
|
|
|
339
341
|
- vendor/libgit2/src/map.h
|
|
340
342
|
- vendor/libgit2/src/merge.c
|
|
341
343
|
- vendor/libgit2/src/merge.h
|
|
344
|
+
- vendor/libgit2/src/merge_driver.c
|
|
345
|
+
- vendor/libgit2/src/merge_driver.h
|
|
342
346
|
- vendor/libgit2/src/merge_file.c
|
|
343
347
|
- vendor/libgit2/src/message.c
|
|
344
348
|
- vendor/libgit2/src/message.h
|
|
@@ -378,6 +382,8 @@ files:
|
|
|
378
382
|
- vendor/libgit2/src/posix.h
|
|
379
383
|
- vendor/libgit2/src/pqueue.c
|
|
380
384
|
- vendor/libgit2/src/pqueue.h
|
|
385
|
+
- vendor/libgit2/src/proxy.c
|
|
386
|
+
- vendor/libgit2/src/proxy.h
|
|
381
387
|
- vendor/libgit2/src/push.c
|
|
382
388
|
- vendor/libgit2/src/push.h
|
|
383
389
|
- vendor/libgit2/src/rebase.c
|
|
@@ -532,7 +538,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
532
538
|
version: 1.3.1
|
|
533
539
|
requirements: []
|
|
534
540
|
rubyforge_project:
|
|
535
|
-
rubygems_version: 2.
|
|
541
|
+
rubygems_version: 2.5.1
|
|
536
542
|
signing_key:
|
|
537
543
|
specification_version: 4
|
|
538
544
|
summary: Rugged is a Ruby binding to the libgit2 linkable library
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
PLATFORM=$(shell uname -s)
|
|
2
|
-
|
|
3
|
-
ifneq (,$(CROSS_COMPILE))
|
|
4
|
-
PREFIX=$(CROSS_COMPILE)-
|
|
5
|
-
else
|
|
6
|
-
PREFIX=
|
|
7
|
-
endif
|
|
8
|
-
|
|
9
|
-
MINGW=0
|
|
10
|
-
ifneq (,$(findstring MINGW32,$(PLATFORM)))
|
|
11
|
-
MINGW=1
|
|
12
|
-
endif
|
|
13
|
-
ifneq (,$(findstring mingw,$(CROSS_COMPILE)))
|
|
14
|
-
MINGW=1
|
|
15
|
-
endif
|
|
16
|
-
|
|
17
|
-
rm=rm -f
|
|
18
|
-
AR=$(PREFIX)ar cq
|
|
19
|
-
RANLIB=$(PREFIX)ranlib
|
|
20
|
-
|
|
21
|
-
LIBNAME=libgit2.a
|
|
22
|
-
|
|
23
|
-
ifeq ($(MINGW),1)
|
|
24
|
-
CC=gcc
|
|
25
|
-
else
|
|
26
|
-
CC=cc
|
|
27
|
-
endif
|
|
28
|
-
|
|
29
|
-
CC:=$(PREFIX)$(CC)
|
|
30
|
-
|
|
31
|
-
INCLUDES= -I. -Isrc -Iinclude -Ideps/http-parser -Ideps/zlib
|
|
32
|
-
|
|
33
|
-
DEFINES= $(INCLUDES) -DNO_VIZ -DSTDC -DNO_GZIP -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $(EXTRA_DEFINES)
|
|
34
|
-
CFLAGS= -g $(DEFINES) -Wall -Wextra -Wno-missing-field-initializers -O2 $(EXTRA_CFLAGS)
|
|
35
|
-
|
|
36
|
-
SRCS = $(wildcard src/*.c) $(wildcard src/transports/*.c) $(wildcard src/xdiff/*.c) $(wildcard deps/http-parser/*.c) $(wildcard deps/zlib/*.c) src/hash/hash_generic.c
|
|
37
|
-
|
|
38
|
-
ifeq ($(MINGW),1)
|
|
39
|
-
SRCS += $(wildcard src/win32/*.c) $(wildcard src/compat/*.c) deps/regex/regex.c
|
|
40
|
-
INCLUDES += -Ideps/regex
|
|
41
|
-
DEFINES += -DWIN32 -D_WIN32_WINNT=0x0501 -D__USE_MINGW_ANSI_STDIO=1
|
|
42
|
-
else
|
|
43
|
-
SRCS += $(wildcard src/unix/*.c)
|
|
44
|
-
CFLAGS += -fPIC
|
|
45
|
-
endif
|
|
46
|
-
|
|
47
|
-
OBJS = $(patsubst %.c,%.o,$(SRCS))
|
|
48
|
-
|
|
49
|
-
%.c.o:
|
|
50
|
-
$(CC) $(CFLAGS) -c $*.c
|
|
51
|
-
|
|
52
|
-
all: $(LIBNAME)
|
|
53
|
-
|
|
54
|
-
$(LIBNAME): $(OBJS)
|
|
55
|
-
$(rm) $@
|
|
56
|
-
$(AR) $@ $(OBJS)
|
|
57
|
-
$(RANLIB) $@
|
|
58
|
-
|
|
59
|
-
clean:
|
|
60
|
-
$(rm) $(OBJS) $(LIBNAME)
|