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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e89817f5d7f231b9fbc27471abce5a55f74bf0fcd2342ec15095193661998104
|
4
|
+
data.tar.gz: ae78864fce931a502eb24976580267eecc3154424b5dd83f60f1f6c7a4a2e197
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 708153d5e4713a4408589a7f74c94a91693eac5c9c042798b0c27f95fa4898d0bb382a299bb78229035407b5b9e3a22cd988549a8ac68538147e800520b73a13
|
7
|
+
data.tar.gz: 8ca8589c6b6e67184a641269511e495519c4756ae527d92eed0d3ee87a64ba100a70b4d99148187e3f5b7ba053544dd1bd5e759b439678e0108760b973753a5a
|
data/lib/rugged/version.rb
CHANGED
@@ -28,6 +28,7 @@ INCLUDE(CheckLibraryExists)
|
|
28
28
|
INCLUDE(CheckFunctionExists)
|
29
29
|
INCLUDE(CheckSymbolExists)
|
30
30
|
INCLUDE(CheckStructHasMember)
|
31
|
+
INCLUDE(CheckPrototypeDefinition) # Added in CMake 3.0
|
31
32
|
INCLUDE(AddCFlagIfSupported)
|
32
33
|
INCLUDE(FindPkgLibraries)
|
33
34
|
INCLUDE(FindThreads)
|
@@ -48,7 +49,7 @@ OPTION( PROFILE "Generate profiling information" OFF )
|
|
48
49
|
OPTION( ENABLE_TRACE "Enables tracing support" OFF )
|
49
50
|
OPTION( LIBGIT2_FILENAME "Name of the produced binary" OFF )
|
50
51
|
|
51
|
-
SET(SHA1_BACKEND "CollisionDetection" CACHE STRING "Backend to use for SHA1. One of Generic, OpenSSL, Win32, CommonCrypto,
|
52
|
+
SET(SHA1_BACKEND "CollisionDetection" CACHE STRING "Backend to use for SHA1. One of Generic, OpenSSL, Win32, CommonCrypto, CollisionDetection. ")
|
52
53
|
OPTION( USE_SSH "Link with libssh to enable SSH support" ON )
|
53
54
|
OPTION( USE_HTTPS "Enable HTTPS support. Can be set to a specific backend" ON )
|
54
55
|
OPTION( USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF )
|
@@ -196,7 +197,7 @@ ELSE ()
|
|
196
197
|
ENABLE_WARNINGS(extra)
|
197
198
|
|
198
199
|
IF (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
|
199
|
-
SET(CMAKE_C_FLAGS "-D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS ${CMAKE_C_FLAGS}")
|
200
|
+
SET(CMAKE_C_FLAGS "-std=c99 -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS ${CMAKE_C_FLAGS}")
|
200
201
|
ENDIF()
|
201
202
|
|
202
203
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -O0")
|
@@ -224,6 +225,9 @@ ELSE ()
|
|
224
225
|
ENABLE_WARNINGS(shift-count-overflow)
|
225
226
|
DISABLE_WARNINGS(unused-const-variable)
|
226
227
|
DISABLE_WARNINGS(unused-function)
|
228
|
+
ENABLE_WARNINGS(format)
|
229
|
+
ENABLE_WARNINGS(format-security)
|
230
|
+
ENABLE_WARNINGS(int-conversion)
|
227
231
|
|
228
232
|
IF (APPLE) # Apple deprecated OpenSSL
|
229
233
|
DISABLE_WARNINGS(deprecated-declarations)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
@CHECK_PROTOTYPE_DEFINITION_HEADER@
|
2
|
+
|
3
|
+
static void cmakeRequireSymbol(int dummy, ...) {
|
4
|
+
(void) dummy;
|
5
|
+
}
|
6
|
+
|
7
|
+
static void checkSymbol(void) {
|
8
|
+
#ifndef @CHECK_PROTOTYPE_DEFINITION_SYMBOL@
|
9
|
+
cmakeRequireSymbol(0, &@CHECK_PROTOTYPE_DEFINITION_SYMBOL@);
|
10
|
+
#endif
|
11
|
+
}
|
12
|
+
|
13
|
+
@CHECK_PROTOTYPE_DEFINITION_PROTO@ {
|
14
|
+
return @CHECK_PROTOTYPE_DEFINITION_RETURN@;
|
15
|
+
}
|
16
|
+
|
17
|
+
#ifdef __CLASSIC_C__
|
18
|
+
int main() {
|
19
|
+
int ac;
|
20
|
+
char*av[];
|
21
|
+
#else
|
22
|
+
int main(int ac, char *av[]) {
|
23
|
+
#endif
|
24
|
+
checkSymbol();
|
25
|
+
if (ac > 1000) {
|
26
|
+
return *av[0];
|
27
|
+
}
|
28
|
+
return 0;
|
29
|
+
}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# - Check if the protoype we expect is correct.
|
2
|
+
# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)
|
3
|
+
# FUNCTION - The name of the function (used to check if prototype exists)
|
4
|
+
# PROTOTYPE- The prototype to check.
|
5
|
+
# RETURN - The return value of the function.
|
6
|
+
# HEADER - The header files required.
|
7
|
+
# VARIABLE - The variable to store the result.
|
8
|
+
# Example:
|
9
|
+
# check_prototype_definition(getpwent_r
|
10
|
+
# "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
|
11
|
+
# "NULL"
|
12
|
+
# "unistd.h;pwd.h"
|
13
|
+
# SOLARIS_GETPWENT_R)
|
14
|
+
# The following variables may be set before calling this macro to
|
15
|
+
# modify the way the check is run:
|
16
|
+
#
|
17
|
+
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
18
|
+
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
19
|
+
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
20
|
+
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
21
|
+
|
22
|
+
#=============================================================================
|
23
|
+
# Copyright 2005-2009 Kitware, Inc.
|
24
|
+
# Copyright 2010-2011 Andreas Schneider <asn@cryptomilk.org>
|
25
|
+
#
|
26
|
+
# Distributed under the OSI-approved BSD License (the "License");
|
27
|
+
# see accompanying file Copyright.txt for details.
|
28
|
+
#
|
29
|
+
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
30
|
+
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
31
|
+
# See the License for more information.
|
32
|
+
#=============================================================================
|
33
|
+
# (To distribute this file outside of CMake, substitute the full
|
34
|
+
# License text for the above reference.)
|
35
|
+
#
|
36
|
+
|
37
|
+
get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
38
|
+
|
39
|
+
function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
|
40
|
+
|
41
|
+
if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
|
42
|
+
set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
|
43
|
+
|
44
|
+
set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
45
|
+
if (CMAKE_REQUIRED_LIBRARIES)
|
46
|
+
set(CHECK_PROTOTYPE_DEFINITION_LIBS
|
47
|
+
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
48
|
+
else(CMAKE_REQUIRED_LIBRARIES)
|
49
|
+
set(CHECK_PROTOTYPE_DEFINITION_LIBS)
|
50
|
+
endif(CMAKE_REQUIRED_LIBRARIES)
|
51
|
+
if (CMAKE_REQUIRED_INCLUDES)
|
52
|
+
set(CMAKE_SYMBOL_EXISTS_INCLUDES
|
53
|
+
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
54
|
+
else(CMAKE_REQUIRED_INCLUDES)
|
55
|
+
set(CMAKE_SYMBOL_EXISTS_INCLUDES)
|
56
|
+
endif(CMAKE_REQUIRED_INCLUDES)
|
57
|
+
|
58
|
+
foreach(_FILE ${_HEADER})
|
59
|
+
set(CHECK_PROTOTYPE_DEFINITION_HEADER
|
60
|
+
"${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n")
|
61
|
+
endforeach(_FILE)
|
62
|
+
|
63
|
+
set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
|
64
|
+
set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
|
65
|
+
set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})
|
66
|
+
|
67
|
+
configure_file("${__check_proto_def_dir}/CheckPrototypeDefinition.c.in"
|
68
|
+
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)
|
69
|
+
|
70
|
+
file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE)
|
71
|
+
|
72
|
+
try_compile(${_VARIABLE}
|
73
|
+
${CMAKE_BINARY_DIR}
|
74
|
+
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c
|
75
|
+
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
76
|
+
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS}
|
77
|
+
"${CHECK_PROTOTYPE_DEFINITION_LIBS}"
|
78
|
+
"${CMAKE_SYMBOL_EXISTS_INCLUDES}"
|
79
|
+
OUTPUT_VARIABLE OUTPUT)
|
80
|
+
|
81
|
+
if (${_VARIABLE})
|
82
|
+
set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
|
83
|
+
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True")
|
84
|
+
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
85
|
+
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n"
|
86
|
+
"${OUTPUT}\n\n")
|
87
|
+
else (${_VARIABLE})
|
88
|
+
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False")
|
89
|
+
set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
|
90
|
+
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
91
|
+
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
|
92
|
+
"${OUTPUT}\n\n${_SOURCE}\n\n")
|
93
|
+
endif (${_VARIABLE})
|
94
|
+
endif("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
|
95
|
+
|
96
|
+
endfunction(CHECK_PROTOTYPE_DEFINITION)
|
@@ -12,14 +12,19 @@ IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
|
12
12
|
ENDIF()
|
13
13
|
|
14
14
|
FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
|
15
|
+
CHECK_FUNCTION_EXISTS(iconv_open libc_has_iconv)
|
15
16
|
FIND_LIBRARY(iconv_lib NAMES iconv libiconv libiconv-2 c)
|
16
17
|
|
17
|
-
IF(ICONV_INCLUDE_DIR AND
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
IF(ICONV_INCLUDE_DIR AND libc_has_iconv)
|
19
|
+
SET(ICONV_FOUND TRUE)
|
20
|
+
SET(ICONV_LIBRARIES "")
|
21
|
+
IF(NOT ICONV_FIND_QUIETLY)
|
22
|
+
MESSAGE(STATUS "Found Iconv: provided by libc")
|
23
|
+
ENDIF(NOT ICONV_FIND_QUIETLY)
|
24
|
+
ELSEIF(ICONV_INCLUDE_DIR AND iconv_lib)
|
25
|
+
SET(ICONV_FOUND TRUE)
|
26
|
+
# split iconv into -L and -l linker options, so we can
|
27
|
+
# set them for pkg-config
|
23
28
|
GET_FILENAME_COMPONENT(iconv_path ${iconv_lib} PATH)
|
24
29
|
GET_FILENAME_COMPONENT(iconv_name ${iconv_lib} NAME_WE)
|
25
30
|
STRING(REGEX REPLACE "^lib" "" iconv_name ${iconv_name})
|
@@ -186,22 +186,6 @@ GIT_EXTERN(int) git_attr_get_many(
|
|
186
186
|
size_t num_attr,
|
187
187
|
const char **names);
|
188
188
|
|
189
|
-
/**
|
190
|
-
* The callback used with git_attr_foreach.
|
191
|
-
*
|
192
|
-
* This callback will be invoked only once per attribute name, even if there
|
193
|
-
* are multiple rules for a given file. The highest priority rule will be
|
194
|
-
* used.
|
195
|
-
*
|
196
|
-
* @see git_attr_foreach.
|
197
|
-
*
|
198
|
-
* @param name The attribute name.
|
199
|
-
* @param value The attribute value. May be NULL if the attribute is explicitly
|
200
|
-
* set to UNSPECIFIED using the '!' sign.
|
201
|
-
* @param payload A user-specified pointer.
|
202
|
-
* @return 0 to continue looping, non-zero to stop. This value will be returned
|
203
|
-
* from git_attr_foreach.
|
204
|
-
*/
|
205
189
|
typedef int (*git_attr_foreach_cb)(const char *name, const char *value, void *payload);
|
206
190
|
|
207
191
|
/**
|
@@ -212,8 +196,13 @@ typedef int (*git_attr_foreach_cb)(const char *name, const char *value, void *pa
|
|
212
196
|
* @param path Path inside the repo to check attributes. This does not have
|
213
197
|
* to exist, but if it does not, then it will be treated as a
|
214
198
|
* plain file (i.e. not a directory).
|
215
|
-
* @param callback Function to invoke on each attribute name and value.
|
216
|
-
*
|
199
|
+
* @param callback Function to invoke on each attribute name and value. The
|
200
|
+
* value may be NULL is the attribute is explicitly set to
|
201
|
+
* UNSPECIFIED using the '!' sign. Callback will be invoked
|
202
|
+
* only once per attribute name, even if there are multiple
|
203
|
+
* rules for a given file. The highest priority rule will be
|
204
|
+
* used. Return a non-zero value from this to stop looping.
|
205
|
+
* The value will be returned from `git_attr_foreach`.
|
217
206
|
* @param payload Passed on as extra parameter to callback function.
|
218
207
|
* @return 0 on success, non-zero callback return value, or error code
|
219
208
|
*/
|
@@ -43,47 +43,38 @@ typedef enum {
|
|
43
43
|
/** Restrict the search of commits to those reachable following only the
|
44
44
|
* first parents. */
|
45
45
|
GIT_BLAME_FIRST_PARENT = (1<<4),
|
46
|
-
/** Use mailmap file to map author and committer names and email addresses
|
47
|
-
* to canonical real names and email addresses. The mailmap will be read
|
48
|
-
* from the working directory, or HEAD in a bare repository. */
|
49
|
-
GIT_BLAME_USE_MAILMAP = (1<<5),
|
50
46
|
} git_blame_flag_t;
|
51
47
|
|
52
48
|
/**
|
53
49
|
* Blame options structure
|
54
50
|
*
|
55
|
-
*
|
56
|
-
*
|
51
|
+
* Use zeros to indicate default settings. It's easiest to use the
|
52
|
+
* `GIT_BLAME_OPTIONS_INIT` macro:
|
53
|
+
* git_blame_options opts = GIT_BLAME_OPTIONS_INIT;
|
57
54
|
*
|
55
|
+
* - `flags` is a combination of the `git_blame_flag_t` values above.
|
56
|
+
* - `min_match_characters` is the lower bound on the number of alphanumeric
|
57
|
+
* characters that must be detected as moving/copying within a file for it to
|
58
|
+
* associate those lines with the parent commit. The default value is 20.
|
59
|
+
* This value only takes effect if any of the `GIT_BLAME_TRACK_COPIES_*`
|
60
|
+
* flags are specified.
|
61
|
+
* - `newest_commit` is the id of the newest commit to consider. The default
|
62
|
+
* is HEAD.
|
63
|
+
* - `oldest_commit` is the id of the oldest commit to consider. The default
|
64
|
+
* is the first commit encountered with a NULL parent.
|
65
|
+
* - `min_line` is the first line in the file to blame. The default is 1 (line
|
66
|
+
* numbers start with 1).
|
67
|
+
* - `max_line` is the last line in the file to blame. The default is the last
|
68
|
+
* line of the file.
|
58
69
|
*/
|
59
70
|
typedef struct git_blame_options {
|
60
71
|
unsigned int version;
|
61
72
|
|
62
|
-
/** A combination of `git_blame_flag_t` */
|
63
73
|
uint32_t flags;
|
64
|
-
/** The lower bound on the number of alphanumeric
|
65
|
-
* characters that must be detected as moving/copying within a file for it to
|
66
|
-
* associate those lines with the parent commit. The default value is 20.
|
67
|
-
* This value only takes effect if any of the `GIT_BLAME_TRACK_COPIES_*`
|
68
|
-
* flags are specified.
|
69
|
-
*/
|
70
74
|
uint16_t min_match_characters;
|
71
|
-
/** The id of the newest commit to consider. The default is HEAD. */
|
72
75
|
git_oid newest_commit;
|
73
|
-
/**
|
74
|
-
* The id of the oldest commit to consider.
|
75
|
-
* The default is the first commit encountered with a NULL parent.
|
76
|
-
*/
|
77
76
|
git_oid oldest_commit;
|
78
|
-
/**
|
79
|
-
* The first line in the file to blame.
|
80
|
-
* The default is 1 (line numbers start with 1).
|
81
|
-
*/
|
82
77
|
size_t min_line;
|
83
|
-
/**
|
84
|
-
* The last line in the file to blame.
|
85
|
-
* The default is the last line of the file.
|
86
|
-
*/
|
87
78
|
size_t max_line;
|
88
79
|
} git_blame_options;
|
89
80
|
|
@@ -91,13 +82,11 @@ typedef struct git_blame_options {
|
|
91
82
|
#define GIT_BLAME_OPTIONS_INIT {GIT_BLAME_OPTIONS_VERSION}
|
92
83
|
|
93
84
|
/**
|
94
|
-
*
|
85
|
+
* Initializes a `git_blame_options` with default values. Equivalent to
|
86
|
+
* creating an instance with GIT_BLAME_OPTIONS_INIT.
|
95
87
|
*
|
96
|
-
*
|
97
|
-
*
|
98
|
-
*
|
99
|
-
* @param opts The `git_blame_options` struct to initialize.
|
100
|
-
* @param version The struct version; pass `GIT_BLAME_OPTIONS_VERSION`.
|
88
|
+
* @param opts The `git_blame_options` struct to initialize
|
89
|
+
* @param version Version of struct; pass `GIT_BLAME_OPTIONS_VERSION`
|
101
90
|
* @return Zero on success; -1 on failure.
|
102
91
|
*/
|
103
92
|
GIT_EXTERN(int) git_blame_init_options(
|
@@ -112,9 +101,6 @@ GIT_EXTERN(int) git_blame_init_options(
|
|
112
101
|
* changed.
|
113
102
|
* - `final_start_line_number` is the 1-based line number where this hunk
|
114
103
|
* begins, in the final version of the file
|
115
|
-
* - `final_signature` is the author of `final_commit_id`. If
|
116
|
-
* `GIT_BLAME_USE_MAILMAP` has been specified, it will contain the canonical
|
117
|
-
* real name and email address.
|
118
104
|
* - `orig_commit_id` is the OID of the commit where this hunk was found. This
|
119
105
|
* will usually be the same as `final_commit_id`, except when
|
120
106
|
* `GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES` has been specified.
|
@@ -123,9 +109,6 @@ GIT_EXTERN(int) git_blame_init_options(
|
|
123
109
|
* - `orig_start_line_number` is the 1-based line number where this hunk begins
|
124
110
|
* in the file named by `orig_path` in the commit specified by
|
125
111
|
* `orig_commit_id`.
|
126
|
-
* - `orig_signature` is the author of `orig_commit_id`. If
|
127
|
-
* `GIT_BLAME_USE_MAILMAP` has been specified, it will contain the canonical
|
128
|
-
* real name and email address.
|
129
112
|
* - `boundary` is 1 iff the hunk has been tracked to a boundary commit (the
|
130
113
|
* root, or the commit specified in git_blame_options.oldest_commit)
|
131
114
|
*/
|
@@ -145,7 +128,7 @@ typedef struct git_blame_hunk {
|
|
145
128
|
} git_blame_hunk;
|
146
129
|
|
147
130
|
|
148
|
-
|
131
|
+
/* Opaque structure to hold blame results */
|
149
132
|
typedef struct git_blame git_blame;
|
150
133
|
|
151
134
|
/**
|
@@ -105,7 +105,7 @@ GIT_EXTERN(git_off_t) git_blob_rawsize(const git_blob *blob);
|
|
105
105
|
* attributes set for the blob and the content detected in it.
|
106
106
|
*
|
107
107
|
* The output is written into a `git_buf` which the caller must free
|
108
|
-
* when done (via `
|
108
|
+
* when done (via `git_buf_free`).
|
109
109
|
*
|
110
110
|
* If no filters need to be applied, then the `out` buffer will just
|
111
111
|
* be populated with a pointer to the raw content of the blob. In
|
@@ -278,7 +278,7 @@ GIT_EXTERN(int) git_branch_remote_name(
|
|
278
278
|
|
279
279
|
|
280
280
|
/**
|
281
|
-
* Retrieve the name
|
281
|
+
* Retrieve the name fo the upstream remote of a local branch
|
282
282
|
*
|
283
283
|
* @param buf the buffer into which to write the name
|
284
284
|
* @param repo the repository in which to look
|
@@ -25,7 +25,7 @@ GIT_BEGIN_DECL
|
|
25
25
|
* caller and have the caller take responsibility for freeing that memory.
|
26
26
|
* This can be awkward if the caller does not have easy access to the same
|
27
27
|
* allocation functions that libgit2 is using. In those cases, libgit2
|
28
|
-
* will fill in a `git_buf` and the caller can use `
|
28
|
+
* will fill in a `git_buf` and the caller can use `git_buf_free()` to
|
29
29
|
* release it when they are done.
|
30
30
|
*
|
31
31
|
* A `git_buf` may also be used for the caller to pass in a reference to
|
@@ -69,19 +69,7 @@ typedef struct {
|
|
69
69
|
*
|
70
70
|
* @param buffer The buffer to deallocate
|
71
71
|
*/
|
72
|
-
GIT_EXTERN(void)
|
73
|
-
|
74
|
-
/**
|
75
|
-
* Alias of `git_buf_dispose`.
|
76
|
-
*
|
77
|
-
* This function is directly calls `git_buf_dispose` now and is deprecated.
|
78
|
-
* Going forward, we refer to functions freeing the internal state of a
|
79
|
-
* structure a `dispose` function, while functions freeing the structure
|
80
|
-
* themselves will be called a `free` function.
|
81
|
-
*
|
82
|
-
* This function is going to be removed in v0.30.0.
|
83
|
-
*/
|
84
|
-
GIT_EXTERN(void) GIT_DEPRECATED(git_buf_free)(git_buf *buffer);
|
72
|
+
GIT_EXTERN(void) git_buf_free(git_buf *buffer);
|
85
73
|
|
86
74
|
/**
|
87
75
|
* Resize the buffer allocation to make more space.
|
@@ -243,14 +243,15 @@ typedef void (*git_checkout_perfdata_cb)(
|
|
243
243
|
/**
|
244
244
|
* Checkout options structure
|
245
245
|
*
|
246
|
-
* Initialize with `GIT_CHECKOUT_OPTIONS_INIT
|
247
|
-
*
|
246
|
+
* Zero out for defaults. Initialize with `GIT_CHECKOUT_OPTIONS_INIT` macro to
|
247
|
+
* correctly set the `version` field. E.g.
|
248
248
|
*
|
249
|
+
* git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
|
249
250
|
*/
|
250
251
|
typedef struct git_checkout_options {
|
251
252
|
unsigned int version;
|
252
253
|
|
253
|
-
unsigned int checkout_strategy; /**< default will be a
|
254
|
+
unsigned int checkout_strategy; /**< default will be a dry run */
|
254
255
|
|
255
256
|
int disable_filters; /**< don't apply filters like CRLF conversion */
|
256
257
|
unsigned int dir_mode; /**< default is 0755 */
|
@@ -294,18 +295,16 @@ typedef struct git_checkout_options {
|
|
294
295
|
} git_checkout_options;
|
295
296
|
|
296
297
|
#define GIT_CHECKOUT_OPTIONS_VERSION 1
|
297
|
-
#define GIT_CHECKOUT_OPTIONS_INIT {GIT_CHECKOUT_OPTIONS_VERSION
|
298
|
+
#define GIT_CHECKOUT_OPTIONS_INIT {GIT_CHECKOUT_OPTIONS_VERSION}
|
298
299
|
|
299
300
|
/**
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
* @return Zero on success; -1 on failure.
|
308
|
-
*/
|
301
|
+
* Initializes a `git_checkout_options` with default values. Equivalent to
|
302
|
+
* creating an instance with GIT_CHECKOUT_OPTIONS_INIT.
|
303
|
+
*
|
304
|
+
* @param opts the `git_checkout_options` struct to initialize.
|
305
|
+
* @param version Version of struct; pass `GIT_CHECKOUT_OPTIONS_VERSION`
|
306
|
+
* @return Zero on success; -1 on failure.
|
307
|
+
*/
|
309
308
|
GIT_EXTERN(int) git_checkout_init_options(
|
310
309
|
git_checkout_options *opts,
|
311
310
|
unsigned int version);
|