rugged 0.27.7 → 0.27.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +6 -2
- data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.c.in +29 -0
- data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.cmake +96 -0
- data/vendor/libgit2/cmake/Modules/FindIconv.cmake +11 -6
- data/vendor/libgit2/deps/http-parser/CMakeLists.txt +0 -2
- data/vendor/libgit2/include/git2.h +0 -1
- data/vendor/libgit2/include/git2/attr.h +7 -18
- data/vendor/libgit2/include/git2/blame.h +22 -39
- data/vendor/libgit2/include/git2/blob.h +1 -1
- data/vendor/libgit2/include/git2/branch.h +1 -1
- data/vendor/libgit2/include/git2/buffer.h +2 -14
- data/vendor/libgit2/include/git2/checkout.h +12 -13
- data/vendor/libgit2/include/git2/cherrypick.h +4 -6
- data/vendor/libgit2/include/git2/clone.h +6 -8
- data/vendor/libgit2/include/git2/commit.h +0 -28
- data/vendor/libgit2/include/git2/common.h +0 -27
- data/vendor/libgit2/include/git2/config.h +0 -1
- data/vendor/libgit2/include/git2/describe.h +7 -30
- data/vendor/libgit2/include/git2/diff.h +22 -32
- data/vendor/libgit2/include/git2/errors.h +0 -1
- data/vendor/libgit2/include/git2/ignore.h +2 -2
- data/vendor/libgit2/include/git2/merge.h +8 -10
- data/vendor/libgit2/include/git2/proxy.h +5 -9
- data/vendor/libgit2/include/git2/rebase.h +4 -7
- data/vendor/libgit2/include/git2/refs.h +1 -1
- data/vendor/libgit2/include/git2/refspec.h +0 -17
- data/vendor/libgit2/include/git2/remote.h +10 -12
- data/vendor/libgit2/include/git2/repository.h +5 -7
- data/vendor/libgit2/include/git2/revert.h +3 -5
- data/vendor/libgit2/include/git2/stash.h +8 -11
- data/vendor/libgit2/include/git2/status.h +3 -7
- data/vendor/libgit2/include/git2/submodule.h +7 -8
- data/vendor/libgit2/include/git2/sys/index.h +0 -3
- data/vendor/libgit2/include/git2/sys/mempack.h +35 -35
- data/vendor/libgit2/include/git2/sys/merge.h +1 -6
- data/vendor/libgit2/include/git2/transaction.h +0 -1
- data/vendor/libgit2/include/git2/types.h +5 -8
- data/vendor/libgit2/include/git2/version.h +2 -2
- data/vendor/libgit2/include/git2/worktree.h +11 -46
- data/vendor/libgit2/src/CMakeLists.txt +28 -91
- data/vendor/libgit2/src/annotated_commit.c +4 -4
- data/vendor/libgit2/src/apply.c +6 -5
- data/vendor/libgit2/src/attr.c +4 -4
- data/vendor/libgit2/src/attr_file.c +5 -5
- data/vendor/libgit2/src/attrcache.c +2 -2
- data/vendor/libgit2/src/blame.c +4 -11
- data/vendor/libgit2/src/blame.h +0 -1
- data/vendor/libgit2/src/blame_git.c +5 -8
- data/vendor/libgit2/src/blob.c +5 -5
- data/vendor/libgit2/src/branch.c +20 -20
- data/vendor/libgit2/src/buffer.c +4 -9
- data/vendor/libgit2/src/buffer.h +1 -1
- data/vendor/libgit2/src/checkout.c +24 -33
- data/vendor/libgit2/src/cherrypick.c +3 -3
- data/vendor/libgit2/src/clone.c +13 -13
- data/vendor/libgit2/src/commit.c +5 -18
- data/vendor/libgit2/src/commit_list.c +9 -3
- data/vendor/libgit2/src/common.h +1 -3
- data/vendor/libgit2/src/config.c +15 -6
- data/vendor/libgit2/src/config_file.c +249 -193
- data/vendor/libgit2/src/config_parse.c +66 -89
- data/vendor/libgit2/src/config_parse.h +2 -2
- data/vendor/libgit2/src/crlf.c +3 -9
- data/vendor/libgit2/src/diff.c +2 -2
- data/vendor/libgit2/src/diff_driver.c +3 -3
- data/vendor/libgit2/src/diff_file.c +3 -3
- data/vendor/libgit2/src/diff_generate.c +3 -4
- data/vendor/libgit2/src/diff_print.c +8 -8
- data/vendor/libgit2/src/diff_tform.c +4 -2
- data/vendor/libgit2/src/diff_xdiff.c +0 -12
- data/vendor/libgit2/src/features.h.in +0 -2
- data/vendor/libgit2/src/fetch.c +2 -2
- data/vendor/libgit2/src/fetchhead.c +5 -5
- data/vendor/libgit2/src/filebuf.c +4 -4
- data/vendor/libgit2/src/fileops.c +10 -10
- data/vendor/libgit2/src/filter.c +9 -3
- data/vendor/libgit2/src/global.c +12 -17
- data/vendor/libgit2/src/hash.h +0 -2
- data/vendor/libgit2/src/ignore.c +5 -5
- data/vendor/libgit2/src/index.c +40 -80
- data/vendor/libgit2/src/index.h +0 -10
- data/vendor/libgit2/src/indexer.c +9 -9
- data/vendor/libgit2/src/iterator.c +8 -8
- data/vendor/libgit2/src/khash.h +1 -3
- data/vendor/libgit2/src/merge.c +7 -7
- data/vendor/libgit2/src/netops.c +5 -5
- data/vendor/libgit2/src/notes.c +2 -2
- data/vendor/libgit2/src/odb.c +9 -9
- data/vendor/libgit2/src/odb_loose.c +22 -18
- data/vendor/libgit2/src/odb_pack.c +3 -3
- data/vendor/libgit2/src/pack-objects.c +3 -3
- data/vendor/libgit2/src/pack.c +5 -5
- data/vendor/libgit2/src/pack.h +1 -1
- data/vendor/libgit2/src/parse.c +7 -4
- data/vendor/libgit2/src/patch.c +1 -1
- data/vendor/libgit2/src/patch_generate.c +2 -2
- data/vendor/libgit2/src/patch_parse.c +4 -24
- data/vendor/libgit2/src/path.c +140 -39
- data/vendor/libgit2/src/path.h +84 -2
- data/vendor/libgit2/src/pathspec.c +1 -1
- data/vendor/libgit2/src/push.c +2 -2
- data/vendor/libgit2/src/rebase.c +23 -20
- data/vendor/libgit2/src/refdb_fs.c +34 -65
- data/vendor/libgit2/src/refs.c +16 -13
- data/vendor/libgit2/src/refspec.c +5 -30
- data/vendor/libgit2/src/refspec.h +1 -1
- data/vendor/libgit2/src/remote.c +43 -43
- data/vendor/libgit2/src/repository.c +56 -56
- data/vendor/libgit2/src/reset.c +1 -1
- data/vendor/libgit2/src/revert.c +3 -3
- data/vendor/libgit2/src/revparse.c +7 -6
- data/vendor/libgit2/src/revwalk.c +20 -48
- data/vendor/libgit2/src/revwalk.h +1 -2
- data/vendor/libgit2/src/settings.c +1 -25
- data/vendor/libgit2/src/signature.c +4 -2
- data/vendor/libgit2/src/stash.c +34 -80
- data/vendor/libgit2/src/status.c +1 -1
- data/vendor/libgit2/src/streams/curl.c +1 -1
- data/vendor/libgit2/src/streams/openssl.c +34 -132
- data/vendor/libgit2/src/streams/openssl.h +107 -0
- data/vendor/libgit2/src/streams/tls.c +0 -3
- data/vendor/libgit2/src/submodule.c +83 -118
- data/vendor/libgit2/src/sysdir.c +4 -4
- data/vendor/libgit2/src/tag.c +12 -12
- data/vendor/libgit2/src/trace.h +1 -1
- data/vendor/libgit2/src/trailer.c +6 -6
- data/vendor/libgit2/src/transport.c +2 -2
- data/vendor/libgit2/src/transports/auth.c +1 -1
- data/vendor/libgit2/src/transports/auth_negotiate.c +2 -2
- data/vendor/libgit2/src/transports/git.c +1 -1
- data/vendor/libgit2/src/transports/http.c +15 -12
- data/vendor/libgit2/src/transports/local.c +7 -7
- data/vendor/libgit2/src/transports/smart.c +15 -20
- data/vendor/libgit2/src/transports/smart.h +5 -5
- data/vendor/libgit2/src/transports/smart_pkt.c +131 -123
- data/vendor/libgit2/src/transports/smart_protocol.c +38 -48
- data/vendor/libgit2/src/transports/ssh.c +1 -1
- data/vendor/libgit2/src/transports/winhttp.c +26 -21
- data/vendor/libgit2/src/tree-cache.c +2 -2
- data/vendor/libgit2/src/tree.c +69 -23
- data/vendor/libgit2/src/tree.h +12 -0
- data/vendor/libgit2/src/util.c +99 -52
- data/vendor/libgit2/src/util.h +138 -14
- data/vendor/libgit2/src/vector.c +13 -8
- data/vendor/libgit2/src/win32/findfile.c +2 -2
- data/vendor/libgit2/src/win32/posix_w32.c +1 -1
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +0 -94
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +75 -28
- data/vendor/libgit2/src/worktree.c +44 -65
- data/vendor/libgit2/src/worktree.h +0 -2
- data/vendor/libgit2/src/xdiff/xdiffi.c +1 -3
- metadata +5 -17
- data/vendor/libgit2/cmake/Modules/FindmbedTLS.cmake +0 -93
- data/vendor/libgit2/include/git2/mailmap.h +0 -115
- data/vendor/libgit2/include/git2/sys/alloc.h +0 -101
- data/vendor/libgit2/include/git2/sys/path.h +0 -55
- data/vendor/libgit2/src/alloc.c +0 -47
- data/vendor/libgit2/src/alloc.h +0 -40
- data/vendor/libgit2/src/hash/hash_mbedtls.c +0 -38
- data/vendor/libgit2/src/hash/hash_mbedtls.h +0 -20
- data/vendor/libgit2/src/mailmap.c +0 -485
- data/vendor/libgit2/src/mailmap.h +0 -35
- data/vendor/libgit2/src/stdalloc.c +0 -120
- data/vendor/libgit2/src/stdalloc.h +0 -17
- data/vendor/libgit2/src/streams/mbedtls.c +0 -463
- data/vendor/libgit2/src/streams/mbedtls.h +0 -20
@@ -16,7 +16,6 @@ SET(LIBGIT2_INCLUDES
|
|
16
16
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
17
17
|
"${libgit2_SOURCE_DIR}/src"
|
18
18
|
"${libgit2_SOURCE_DIR}/include")
|
19
|
-
SET(LIBGIT2_SYSTEM_INCLUDES "")
|
20
19
|
SET(LIBGIT2_LIBS "")
|
21
20
|
|
22
21
|
# Installation paths
|
@@ -58,10 +57,19 @@ IF (HAVE_FUTIMENS)
|
|
58
57
|
SET(GIT_USE_FUTIMENS 1)
|
59
58
|
ENDIF ()
|
60
59
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
60
|
+
CHECK_PROTOTYPE_DEFINITION(qsort_r
|
61
|
+
"void qsort_r(void *base, size_t nmemb, size_t size, void *thunk, int (*compar)(void *, const void *, const void *))"
|
62
|
+
"" "stdlib.h" HAVE_QSORT_R_BSD)
|
63
|
+
IF (HAVE_QSORT_R_BSD)
|
64
|
+
ADD_DEFINITIONS(-DHAVE_QSORT_R_BSD)
|
65
|
+
ENDIF()
|
66
|
+
|
67
|
+
CHECK_PROTOTYPE_DEFINITION(qsort_r
|
68
|
+
"void qsort_r(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *, void *), void *arg)"
|
69
|
+
"" "stdlib.h" HAVE_QSORT_R_GNU)
|
70
|
+
IF (HAVE_QSORT_R_GNU)
|
71
|
+
ADD_DEFINITIONS(-DHAVE_QSORT_R_GNU)
|
72
|
+
ENDIF()
|
65
73
|
|
66
74
|
CHECK_FUNCTION_EXISTS(qsort_s HAVE_QSORT_S)
|
67
75
|
IF (HAVE_QSORT_S)
|
@@ -95,7 +103,7 @@ ADD_FEATURE_INFO(threadsafe THREADSAFE "threadsafe support")
|
|
95
103
|
|
96
104
|
IF (WIN32 AND EMBED_SSH_PATH)
|
97
105
|
FILE(GLOB SRC_SSH "${EMBED_SSH_PATH}/src/*.c")
|
98
|
-
LIST(APPEND
|
106
|
+
LIST(APPEND LIBGIT2_INCLUDES "${EMBED_SSH_PATH}/include")
|
99
107
|
FILE(WRITE "${EMBED_SSH_PATH}/src/libssh2_config.h" "#define HAVE_WINCNG\n#define LIBSSH2_WINCNG\n#include \"../win32/libssh2_config.h\"")
|
100
108
|
SET(GIT_SSH 1)
|
101
109
|
ENDIF()
|
@@ -108,7 +116,7 @@ IF (WIN32 AND WINHTTP)
|
|
108
116
|
IF (MINGW)
|
109
117
|
ADD_SUBDIRECTORY("${libgit2_SOURCE_DIR}/deps/winhttp" "${libgit2_BINARY_DIR}/deps/winhttp")
|
110
118
|
LIST(APPEND LIBGIT2_LIBS winhttp)
|
111
|
-
LIST(APPEND
|
119
|
+
LIST(APPEND LIBGIT2_INCLUDES "${libgit2_SOURCE_DIR}/deps/winhttp")
|
112
120
|
ELSE()
|
113
121
|
LIST(APPEND LIBGIT2_LIBS "winhttp")
|
114
122
|
LIST(APPEND LIBGIT2_PC_LIBS "-lwinhttp")
|
@@ -122,7 +130,7 @@ ELSE ()
|
|
122
130
|
ENDIF ()
|
123
131
|
IF (CURL_FOUND)
|
124
132
|
SET(GIT_CURL 1)
|
125
|
-
LIST(APPEND
|
133
|
+
LIST(APPEND LIBGIT2_INCLUDES ${CURL_INCLUDE_DIRS})
|
126
134
|
LIST(APPEND LIBGIT2_LIBS ${CURL_LIBRARIES})
|
127
135
|
LIST(APPEND LIBGIT2_PC_LIBS ${CURL_LDFLAGS})
|
128
136
|
ENDIF()
|
@@ -130,9 +138,6 @@ ELSE ()
|
|
130
138
|
ENDIF()
|
131
139
|
|
132
140
|
IF (USE_HTTPS)
|
133
|
-
# We try to find any packages our backends might use
|
134
|
-
FIND_PACKAGE(OpenSSL)
|
135
|
-
FIND_PACKAGE(mbedTLS)
|
136
141
|
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
137
142
|
FIND_PACKAGE(Security)
|
138
143
|
FIND_PACKAGE(CoreFoundation)
|
@@ -149,13 +154,8 @@ IF (USE_HTTPS)
|
|
149
154
|
ENDIF()
|
150
155
|
ELSEIF (WINHTTP)
|
151
156
|
SET(HTTPS_BACKEND "WinHTTP")
|
152
|
-
ELSEIF(OPENSSL_FOUND)
|
153
|
-
SET(HTTPS_BACKEND "OpenSSL")
|
154
|
-
ELSEIF(MBEDTLS_FOUND)
|
155
|
-
SET(HTTPS_BACKEND "mbedTLS")
|
156
157
|
ELSE()
|
157
|
-
|
158
|
-
"Please pass the backend name explicitly (-DUSE_HTTPS=backend)")
|
158
|
+
SET(HTTPS_BACKEND "OpenSSL")
|
159
159
|
ENDIF()
|
160
160
|
ELSE()
|
161
161
|
# Backend was explicitly set
|
@@ -175,68 +175,21 @@ IF (USE_HTTPS)
|
|
175
175
|
ENDIF()
|
176
176
|
|
177
177
|
SET(GIT_SECURE_TRANSPORT 1)
|
178
|
-
LIST(APPEND
|
178
|
+
LIST(APPEND LIBGIT2_INCLUDES ${SECURITY_INCLUDE_DIR})
|
179
179
|
LIST(APPEND LIBGIT2_LIBS ${COREFOUNDATION_LIBRARIES} ${SECURITY_LIBRARIES})
|
180
180
|
LIST(APPEND LIBGIT2_PC_LIBS ${COREFOUNDATION_LDFLAGS} ${SECURITY_LDFLAGS})
|
181
181
|
ELSEIF (HTTPS_BACKEND STREQUAL "OpenSSL")
|
182
|
+
FIND_PACKAGE(OpenSSL)
|
183
|
+
|
182
184
|
IF (NOT OPENSSL_FOUND)
|
183
185
|
MESSAGE(FATAL_ERROR "Asked for OpenSSL TLS backend, but it wasn't found")
|
184
186
|
ENDIF()
|
185
187
|
|
186
188
|
SET(GIT_OPENSSL 1)
|
187
|
-
LIST(APPEND
|
189
|
+
LIST(APPEND LIBGIT2_INCLUDES ${OPENSSL_INCLUDE_DIR})
|
188
190
|
LIST(APPEND LIBGIT2_LIBS ${OPENSSL_LIBRARIES})
|
189
191
|
LIST(APPEND LIBGIT2_PC_LIBS ${OPENSSL_LDFLAGS})
|
190
192
|
LIST(APPEND LIBGIT2_PC_REQUIRES "openssl")
|
191
|
-
ELSEIF(HTTPS_BACKEND STREQUAL "mbedTLS")
|
192
|
-
IF (NOT MBEDTLS_FOUND)
|
193
|
-
MESSAGE(FATAL_ERROR "Asked for mbedTLS backend, but it wasn't found")
|
194
|
-
ENDIF()
|
195
|
-
|
196
|
-
IF(NOT CERT_LOCATION)
|
197
|
-
MESSAGE("Auto-detecting default certificates location")
|
198
|
-
IF(CMAKE_SYSTEM_NAME MATCHES Darwin)
|
199
|
-
# Check for an Homebrew installation
|
200
|
-
SET(OPENSSL_CMD "/usr/local/opt/openssl/bin/openssl")
|
201
|
-
ELSE()
|
202
|
-
SET(OPENSSL_CMD "openssl")
|
203
|
-
ENDIF()
|
204
|
-
EXECUTE_PROCESS(COMMAND ${OPENSSL_CMD} version -d OUTPUT_VARIABLE OPENSSL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
205
|
-
IF(OPENSSL_DIR)
|
206
|
-
STRING(REGEX REPLACE "^OPENSSLDIR: \"(.*)\"$" "\\1/" OPENSSL_DIR ${OPENSSL_DIR})
|
207
|
-
|
208
|
-
SET(OPENSSL_CA_LOCATIONS
|
209
|
-
"ca-bundle.pem" # OpenSUSE Leap 42.1
|
210
|
-
"cert.pem" # Ubuntu 14.04, FreeBSD
|
211
|
-
"certs/ca-certificates.crt" # Ubuntu 16.04
|
212
|
-
"certs/ca.pem" # Debian 7
|
213
|
-
)
|
214
|
-
FOREACH(SUFFIX IN LISTS OPENSSL_CA_LOCATIONS)
|
215
|
-
SET(LOC "${OPENSSL_DIR}${SUFFIX}")
|
216
|
-
IF(NOT CERT_LOCATION AND EXISTS "${OPENSSL_DIR}${SUFFIX}")
|
217
|
-
SET(CERT_LOCATION ${LOC})
|
218
|
-
ENDIF()
|
219
|
-
ENDFOREACH()
|
220
|
-
ELSE()
|
221
|
-
MESSAGE("Unable to find OpenSSL executable. Please provide default certificate location via CERT_LOCATION")
|
222
|
-
ENDIF()
|
223
|
-
ENDIF()
|
224
|
-
|
225
|
-
IF(CERT_LOCATION)
|
226
|
-
IF(NOT EXISTS ${CERT_LOCATION})
|
227
|
-
MESSAGE(FATAL_ERROR "Cannot use CERT_LOCATION=${CERT_LOCATION} as it doesn't exist")
|
228
|
-
ENDIF()
|
229
|
-
ADD_FEATURE_INFO(CERT_LOCATION ON "using certificates from ${CERT_LOCATION}")
|
230
|
-
ADD_DEFINITIONS(-DGIT_DEFAULT_CERT_LOCATION="${CERT_LOCATION}")
|
231
|
-
ENDIF()
|
232
|
-
|
233
|
-
SET(GIT_MBEDTLS 1)
|
234
|
-
LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${MBEDTLS_INCLUDE_DIR})
|
235
|
-
LIST(APPEND LIBGIT2_LIBS ${MBEDTLS_LIBRARIES})
|
236
|
-
# mbedTLS has no pkgconfig file, hence we can't require it
|
237
|
-
# https://github.com/ARMmbed/mbedtls/issues/228
|
238
|
-
# For now, pass its link flags as our own
|
239
|
-
LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
|
240
193
|
ELSEIF (HTTPS_BACKEND STREQUAL "WinHTTP")
|
241
194
|
# WinHTTP setup was handled in the WinHTTP-specific block above
|
242
195
|
ELSE()
|
@@ -282,16 +235,6 @@ ELSEIF(SHA1_BACKEND STREQUAL "Win32")
|
|
282
235
|
ELSEIF(SHA1_BACKEND STREQUAL "CommonCrypto")
|
283
236
|
ADD_FEATURE_INFO(SHA ON "using CommonCrypto")
|
284
237
|
SET(GIT_SHA1_COMMON_CRYPTO 1)
|
285
|
-
ELSEIF (SHA1_BACKEND STREQUAL "mbedTLS")
|
286
|
-
ADD_FEATURE_INFO(SHA ON "using mbedTLS")
|
287
|
-
SET(GIT_SHA1_MBEDTLS 1)
|
288
|
-
FILE(GLOB SRC_SHA1 hash/hash_mbedtls.c)
|
289
|
-
LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${MBEDTLS_INCLUDE_DIR})
|
290
|
-
LIST(APPEND LIBGIT2_LIBS ${MBEDTLS_LIBRARIES})
|
291
|
-
# mbedTLS has no pkgconfig file, hence we can't require it
|
292
|
-
# https://github.com/ARMmbed/mbedtls/issues/228
|
293
|
-
# For now, pass its link flags as our own
|
294
|
-
LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
|
295
238
|
ELSE()
|
296
239
|
MESSAGE(FATAL_ERROR "Asked for unknown SHA1 backend ${SHA1_BACKEND}")
|
297
240
|
ENDIF()
|
@@ -299,21 +242,21 @@ ENDIF()
|
|
299
242
|
# Include POSIX regex when it is required
|
300
243
|
IF(WIN32 OR AMIGA OR CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
|
301
244
|
ADD_SUBDIRECTORY("${libgit2_SOURCE_DIR}/deps/regex" "${libgit2_BINARY_DIR}/deps/regex")
|
302
|
-
LIST(APPEND
|
245
|
+
LIST(APPEND LIBGIT2_INCLUDES "${libgit2_SOURCE_DIR}/deps/regex")
|
303
246
|
LIST(APPEND LIBGIT2_OBJECTS $<TARGET_OBJECTS:regex>)
|
304
247
|
ENDIF()
|
305
248
|
|
306
249
|
# Optional external dependency: http-parser
|
307
250
|
FIND_PACKAGE(HTTP_Parser)
|
308
251
|
IF (USE_EXT_HTTP_PARSER AND HTTP_PARSER_FOUND AND HTTP_PARSER_VERSION_MAJOR EQUAL 2)
|
309
|
-
LIST(APPEND
|
252
|
+
LIST(APPEND LIBGIT2_INCLUDES ${HTTP_PARSER_INCLUDE_DIRS})
|
310
253
|
LIST(APPEND LIBGIT2_LIBS ${HTTP_PARSER_LIBRARIES})
|
311
254
|
LIST(APPEND LIBGIT2_PC_LIBS "-lhttp_parser")
|
312
255
|
ADD_FEATURE_INFO(http-parser ON "http-parser support")
|
313
256
|
ELSE()
|
314
257
|
MESSAGE(STATUS "http-parser version 2 was not found or disabled; using bundled 3rd-party sources.")
|
315
258
|
ADD_SUBDIRECTORY("${libgit2_SOURCE_DIR}/deps/http-parser" "${libgit2_BINARY_DIR}/deps/http-parser")
|
316
|
-
LIST(APPEND
|
259
|
+
LIST(APPEND LIBGIT2_INCLUDES "${libgit2_SOURCE_DIR}/deps/http-parser")
|
317
260
|
LIST(APPEND LIBGIT2_OBJECTS "$<TARGET_OBJECTS:http-parser>")
|
318
261
|
ADD_FEATURE_INFO(http-parser ON "http-parser support (bundled)")
|
319
262
|
ENDIF()
|
@@ -322,7 +265,7 @@ ENDIF()
|
|
322
265
|
IF(NOT USE_BUNDLED_ZLIB)
|
323
266
|
FIND_PACKAGE(ZLIB)
|
324
267
|
IF(ZLIB_FOUND)
|
325
|
-
LIST(APPEND
|
268
|
+
LIST(APPEND LIBGIT2_INCLUDES ${ZLIB_INCLUDE_DIRS})
|
326
269
|
LIST(APPEND LIBGIT2_LIBS ${ZLIB_LIBRARIES})
|
327
270
|
IF(APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
328
271
|
LIST(APPEND LIBGIT2_LIBS "z")
|
@@ -337,7 +280,7 @@ IF(NOT USE_BUNDLED_ZLIB)
|
|
337
280
|
ENDIF()
|
338
281
|
IF(USE_BUNDLED_ZLIB OR NOT ZLIB_FOUND)
|
339
282
|
ADD_SUBDIRECTORY("${libgit2_SOURCE_DIR}/deps/zlib" "${libgit2_BINARY_DIR}/deps/zlib")
|
340
|
-
LIST(APPEND
|
283
|
+
LIST(APPEND LIBGIT2_INCLUDES "${libgit2_SOURCE_DIR}/deps/zlib")
|
341
284
|
LIST(APPEND LIBGIT2_OBJECTS $<TARGET_OBJECTS:zlib>)
|
342
285
|
ADD_FEATURE_INFO(zlib ON "using bundled zlib")
|
343
286
|
ENDIF()
|
@@ -348,7 +291,7 @@ IF (USE_SSH)
|
|
348
291
|
ENDIF()
|
349
292
|
IF (LIBSSH2_FOUND)
|
350
293
|
SET(GIT_SSH 1)
|
351
|
-
LIST(APPEND
|
294
|
+
LIST(APPEND LIBGIT2_INCLUDES ${LIBSSH2_INCLUDE_DIRS})
|
352
295
|
LIST(APPEND LIBGIT2_LIBS ${LIBSSH2_LIBRARIES})
|
353
296
|
LIST(APPEND LIBGIT2_PC_LIBS ${LIBSSH2_LDFLAGS})
|
354
297
|
|
@@ -377,7 +320,7 @@ IF (USE_ICONV)
|
|
377
320
|
ENDIF()
|
378
321
|
IF (ICONV_FOUND)
|
379
322
|
SET(GIT_USE_ICONV 1)
|
380
|
-
LIST(APPEND
|
323
|
+
LIST(APPEND LIBGIT2_INCLUDES ${ICONV_INCLUDE_DIR})
|
381
324
|
LIST(APPEND LIBGIT2_LIBS ${ICONV_LIBRARIES})
|
382
325
|
LIST(APPEND LIBGIT2_PC_LIBS ${ICONV_LIBRARIES})
|
383
326
|
ENDIF()
|
@@ -450,24 +393,19 @@ CONFIGURE_FILE(features.h.in git2/sys/features.h)
|
|
450
393
|
SET(LIBGIT2_SOURCES ${SRC_H} ${SRC_GIT2} ${SRC_OS} ${SRC_SSH} ${SRC_SHA1})
|
451
394
|
|
452
395
|
ADD_LIBRARY(git2internal OBJECT ${LIBGIT2_SOURCES})
|
453
|
-
SET_TARGET_PROPERTIES(git2internal PROPERTIES C_STANDARD 90)
|
454
396
|
IDE_SPLIT_SOURCES(git2internal)
|
455
397
|
LIST(APPEND LIBGIT2_OBJECTS $<TARGET_OBJECTS:git2internal>)
|
456
398
|
|
457
399
|
IF (${CMAKE_VERSION} VERSION_LESS 2.8.12)
|
458
400
|
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})
|
459
|
-
INCLUDE_DIRECTORIES(SYSTEM ${LIBGIT2_SYSTEM_INCLUDES})
|
460
401
|
ELSE()
|
461
402
|
TARGET_INCLUDE_DIRECTORIES(git2internal
|
462
403
|
PRIVATE ${LIBGIT2_INCLUDES}
|
463
404
|
PUBLIC ${libgit2_SOURCE_DIR}/include)
|
464
|
-
TARGET_INCLUDE_DIRECTORIES(git2internal
|
465
|
-
SYSTEM PRIVATE ${LIBGIT2_SYSTEM_INCLUDES})
|
466
405
|
ENDIF()
|
467
406
|
|
468
407
|
SET(LIBGIT2_OBJECTS ${LIBGIT2_OBJECTS} PARENT_SCOPE)
|
469
408
|
SET(LIBGIT2_INCLUDES ${LIBGIT2_INCLUDES} PARENT_SCOPE)
|
470
|
-
SET(LIBGIT2_SYSTEM_INCLUDES ${LIBGIT2_SYSTEM_INCLUDES} PARENT_SCOPE)
|
471
409
|
SET(LIBGIT2_LIBS ${LIBGIT2_LIBS} PARENT_SCOPE)
|
472
410
|
|
473
411
|
IF(XCODE_VERSION)
|
@@ -481,7 +419,6 @@ ENDIF()
|
|
481
419
|
ADD_LIBRARY(git2 ${WIN_RC} ${LIBGIT2_OBJECTS})
|
482
420
|
TARGET_LINK_LIBRARIES(git2 ${LIBGIT2_LIBS})
|
483
421
|
|
484
|
-
SET_TARGET_PROPERTIES(git2 PROPERTIES C_STANDARD 90)
|
485
422
|
SET_TARGET_PROPERTIES(git2 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR})
|
486
423
|
SET_TARGET_PROPERTIES(git2 PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR})
|
487
424
|
SET_TARGET_PROPERTIES(git2 PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR})
|
@@ -123,19 +123,19 @@ int git_annotated_commit_from_ref(
|
|
123
123
|
git_repository *repo,
|
124
124
|
const git_reference *ref)
|
125
125
|
{
|
126
|
-
|
126
|
+
git_object *peeled;
|
127
127
|
int error = 0;
|
128
128
|
|
129
129
|
assert(out && repo && ref);
|
130
130
|
|
131
131
|
*out = NULL;
|
132
132
|
|
133
|
-
if ((error =
|
133
|
+
if ((error = git_reference_peel(&peeled, ref, GIT_OBJ_COMMIT)) < 0)
|
134
134
|
return error;
|
135
135
|
|
136
136
|
error = annotated_commit_init_from_id(out,
|
137
137
|
repo,
|
138
|
-
|
138
|
+
git_object_id(peeled),
|
139
139
|
git_reference_name(ref));
|
140
140
|
|
141
141
|
if (!error) {
|
@@ -143,7 +143,7 @@ int git_annotated_commit_from_ref(
|
|
143
143
|
GITERR_CHECK_ALLOC((*out)->ref_name);
|
144
144
|
}
|
145
145
|
|
146
|
-
|
146
|
+
git_object_free(peeled);
|
147
147
|
return error;
|
148
148
|
}
|
149
149
|
|
data/vendor/libgit2/src/apply.c
CHANGED
@@ -255,7 +255,7 @@ static int apply_binary_delta(
|
|
255
255
|
|
256
256
|
if (!error && inflated.size != binary_file->inflatedlen) {
|
257
257
|
error = apply_err("inflated delta does not match expected length");
|
258
|
-
|
258
|
+
git_buf_free(out);
|
259
259
|
}
|
260
260
|
|
261
261
|
if (error < 0)
|
@@ -281,7 +281,7 @@ static int apply_binary_delta(
|
|
281
281
|
}
|
282
282
|
|
283
283
|
done:
|
284
|
-
|
284
|
+
git_buf_free(&inflated);
|
285
285
|
return error;
|
286
286
|
}
|
287
287
|
|
@@ -312,17 +312,18 @@ static int apply_binary(
|
|
312
312
|
&patch->binary.old_file)) < 0)
|
313
313
|
goto done;
|
314
314
|
|
315
|
+
/* Verify that the resulting file with the reverse patch applied matches the source file */
|
315
316
|
if (source_len != reverse.size ||
|
316
|
-
memcmp(source, reverse.ptr, source_len) != 0) {
|
317
|
+
(source_len && memcmp(source, reverse.ptr, source_len) != 0)) {
|
317
318
|
error = apply_err("binary patch did not apply cleanly");
|
318
319
|
goto done;
|
319
320
|
}
|
320
321
|
|
321
322
|
done:
|
322
323
|
if (error < 0)
|
323
|
-
|
324
|
+
git_buf_free(out);
|
324
325
|
|
325
|
-
|
326
|
+
git_buf_free(&reverse);
|
326
327
|
return error;
|
327
328
|
}
|
328
329
|
|
data/vendor/libgit2/src/attr.c
CHANGED
@@ -298,7 +298,7 @@ static int system_attr_file(
|
|
298
298
|
|
299
299
|
/* We can safely provide a git_buf with no allocation (asize == 0) to
|
300
300
|
* a consumer. This allows them to treat this as a regular `git_buf`,
|
301
|
-
* but their call to `
|
301
|
+
* but their call to `git_buf_free` will not attempt to free it.
|
302
302
|
*/
|
303
303
|
git_buf_attach_notowned(
|
304
304
|
out, attr_session->sysdir.ptr, attr_session->sysdir.size);
|
@@ -359,7 +359,7 @@ static int attr_setup(git_repository *repo, git_attr_session *attr_session)
|
|
359
359
|
attr_session->init_setup = 1;
|
360
360
|
|
361
361
|
out:
|
362
|
-
|
362
|
+
git_buf_free(&path);
|
363
363
|
|
364
364
|
return error;
|
365
365
|
}
|
@@ -565,8 +565,8 @@ static int collect_attr_files(
|
|
565
565
|
cleanup:
|
566
566
|
if (error < 0)
|
567
567
|
release_attr_files(files);
|
568
|
-
|
569
|
-
|
568
|
+
git_buf_free(&attrfile);
|
569
|
+
git_buf_free(&dir);
|
570
570
|
|
571
571
|
return error;
|
572
572
|
}
|
@@ -178,7 +178,7 @@ int git_attr_file__load(
|
|
178
178
|
|
179
179
|
cleanup:
|
180
180
|
git_blob_free(blob);
|
181
|
-
|
181
|
+
git_buf_free(&content);
|
182
182
|
|
183
183
|
return error;
|
184
184
|
}
|
@@ -348,7 +348,7 @@ int git_attr_file__load_standalone(git_attr_file **out, const char *path)
|
|
348
348
|
|
349
349
|
if (!(error = git_futils_readbuffer(&content, path))) {
|
350
350
|
error = git_attr_file__parse_buffer(NULL, file, content.ptr);
|
351
|
-
|
351
|
+
git_buf_free(&content);
|
352
352
|
}
|
353
353
|
|
354
354
|
if (error < 0)
|
@@ -518,7 +518,7 @@ int git_attr_path__init(
|
|
518
518
|
|
519
519
|
void git_attr_path__free(git_attr_path *info)
|
520
520
|
{
|
521
|
-
|
521
|
+
git_buf_free(&info->full);
|
522
522
|
info->path = NULL;
|
523
523
|
info->basename = NULL;
|
524
524
|
}
|
@@ -876,8 +876,8 @@ void git_attr_session__free(git_attr_session *session)
|
|
876
876
|
if (!session)
|
877
877
|
return;
|
878
878
|
|
879
|
-
|
880
|
-
|
879
|
+
git_buf_free(&session->sysdir);
|
880
|
+
git_buf_free(&session->tmp);
|
881
881
|
|
882
882
|
memset(session, 0, sizeof(git_attr_session));
|
883
883
|
}
|
@@ -204,7 +204,7 @@ cleanup:
|
|
204
204
|
*out_file = file;
|
205
205
|
*out_entry = entry;
|
206
206
|
|
207
|
-
|
207
|
+
git_buf_free(&path);
|
208
208
|
return error;
|
209
209
|
}
|
210
210
|
|
@@ -310,7 +310,7 @@ static int attr_cache__lookup_path(
|
|
310
310
|
}
|
311
311
|
|
312
312
|
git_config_entry_free(entry);
|
313
|
-
|
313
|
+
git_buf_free(&buf);
|
314
314
|
|
315
315
|
return error;
|
316
316
|
}
|
data/vendor/libgit2/src/blame.c
CHANGED
@@ -14,7 +14,6 @@
|
|
14
14
|
#include "git2/diff.h"
|
15
15
|
#include "git2/blob.h"
|
16
16
|
#include "git2/signature.h"
|
17
|
-
#include "git2/mailmap.h"
|
18
17
|
#include "util.h"
|
19
18
|
#include "repository.h"
|
20
19
|
#include "blame_git.h"
|
@@ -133,9 +132,6 @@ git_blame* git_blame__alloc(
|
|
133
132
|
return NULL;
|
134
133
|
}
|
135
134
|
|
136
|
-
if (opts.flags & GIT_BLAME_USE_MAILMAP)
|
137
|
-
git_mailmap_from_repository(&gbr->mailmap, repo);
|
138
|
-
|
139
135
|
return gbr;
|
140
136
|
}
|
141
137
|
|
@@ -154,8 +150,6 @@ void git_blame_free(git_blame *blame)
|
|
154
150
|
|
155
151
|
git_array_clear(blame->line_index);
|
156
152
|
|
157
|
-
git_mailmap_free(blame->mailmap);
|
158
|
-
|
159
153
|
git__free(blame->path);
|
160
154
|
git_blob_free(blame->final_blob);
|
161
155
|
git__free(blame);
|
@@ -285,7 +279,7 @@ static int index_blob_lines(git_blame *blame)
|
|
285
279
|
return blame->num_lines;
|
286
280
|
}
|
287
281
|
|
288
|
-
static git_blame_hunk* hunk_from_entry(git_blame__entry *e
|
282
|
+
static git_blame_hunk* hunk_from_entry(git_blame__entry *e)
|
289
283
|
{
|
290
284
|
git_blame_hunk *h = new_hunk(
|
291
285
|
e->lno+1, e->num_lines, e->s_lno+1, e->suspect->path);
|
@@ -295,9 +289,8 @@ static git_blame_hunk* hunk_from_entry(git_blame__entry *e, git_blame *blame)
|
|
295
289
|
|
296
290
|
git_oid_cpy(&h->final_commit_id, git_commit_id(e->suspect->commit));
|
297
291
|
git_oid_cpy(&h->orig_commit_id, git_commit_id(e->suspect->commit));
|
298
|
-
|
299
|
-
|
300
|
-
git_signature_dup(&h->orig_signature, h->final_signature);
|
292
|
+
git_signature_dup(&h->final_signature, git_commit_author(e->suspect->commit));
|
293
|
+
git_signature_dup(&h->orig_signature, git_commit_author(e->suspect->commit));
|
301
294
|
h->boundary = e->is_boundary ? 1 : 0;
|
302
295
|
return h;
|
303
296
|
}
|
@@ -348,7 +341,7 @@ static int blame_internal(git_blame *blame)
|
|
348
341
|
cleanup:
|
349
342
|
for (ent = blame->ent; ent; ) {
|
350
343
|
git_blame__entry *e = ent->next;
|
351
|
-
git_blame_hunk *h = hunk_from_entry(ent
|
344
|
+
git_blame_hunk *h = hunk_from_entry(ent);
|
352
345
|
|
353
346
|
git_vector_insert(&blame->hunks, h);
|
354
347
|
|