rugged 0.99.0 → 1.0.0
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/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +1 -0
- data/vendor/libgit2/cmake/Modules/PkgBuildConfig.cmake +4 -37
- data/vendor/libgit2/cmake/Modules/SanitizeBool.cmake +20 -0
- data/vendor/libgit2/cmake/Modules/SelectGSSAPI.cmake +3 -0
- data/vendor/libgit2/cmake/Modules/SelectHTTPSBackend.cmake +3 -0
- data/vendor/libgit2/cmake/Modules/SelectHashes.cmake +3 -0
- data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +2 -0
- data/vendor/libgit2/deps/ntlmclient/compat.h +22 -0
- data/vendor/libgit2/include/git2/deprecated.h +7 -0
- data/vendor/libgit2/include/git2/repository.h +5 -4
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +109 -2
- data/vendor/libgit2/include/git2/version.h +4 -4
- data/vendor/libgit2/src/CMakeLists.txt +11 -13
- data/vendor/libgit2/src/blame.c +1 -1
- data/vendor/libgit2/src/cache.c +8 -4
- data/vendor/libgit2/src/indexer.c +3 -3
- data/vendor/libgit2/src/notes.c +6 -3
- data/vendor/libgit2/src/odb_pack.c +0 -1
- data/vendor/libgit2/src/pack-objects.c +3 -1
- data/vendor/libgit2/src/pack.c +21 -1
- data/vendor/libgit2/src/push.c +3 -2
- data/vendor/libgit2/src/refdb_fs.c +3 -0
- data/vendor/libgit2/src/repository.c +63 -50
- data/vendor/libgit2/src/revwalk.c +1 -1
- data/vendor/libgit2/src/streams/openssl.c +1 -1
- data/vendor/libgit2/src/transports/auth_ntlm.c +2 -2
- data/vendor/libgit2/src/transports/httpclient.c +13 -2
- data/vendor/libgit2/src/unix/posix.h +1 -1
- data/vendor/libgit2/src/win32/path_w32.c +28 -1
- data/vendor/libgit2/src/win32/path_w32.h +16 -1
- data/vendor/libgit2/src/win32/posix_w32.c +1 -2
- data/vendor/libgit2/src/worktree.c +44 -28
- metadata +4 -6
- data/vendor/libgit2/src/sha1_lookup.c +0 -35
- data/vendor/libgit2/src/sha1_lookup.h +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3da2dd9613a57a897d79059d83ed3383a8b814dda9dd3b0a850dc52addc354c0
|
4
|
+
data.tar.gz: 27a171313a2b9c7031ec1e5f104676934b16a347487a4533a660b47e98e77eac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5c3e519057e1154b0245b221524fcda071ddaae994c81d277fa466adc20ec38f83d69b6632ab5ab65ceadbd903c400d81f1f31cec8b6b214d14a7b9c48cd390
|
7
|
+
data.tar.gz: e0a2246325bdf104f4d2c9a5654694705d7fd41674f0dd520888067cdfa8939877a05cdaa34baeff954555fd4528ea668af8446ff450f9080601b7e8a0d9b2c6
|
data/lib/rugged/version.rb
CHANGED
@@ -1,10 +1,5 @@
|
|
1
1
|
# pkg-config file generation
|
2
2
|
#
|
3
|
-
# Uses the following globals:
|
4
|
-
# - PKG_BUILD_PREFIX: the build location (aka prefix). Defaults to CMAKE_INSTALL_PREFIX
|
5
|
-
# - PKG_BUILD_LIBDIR: the libdir location. Defaults to ${prefix}/lib.
|
6
|
-
# - PKG_BUILD_INCLUDEDIR: the includedir location. Defaults to ${prefix}/include.
|
7
|
-
#
|
8
3
|
|
9
4
|
function(pkg_build_config)
|
10
5
|
set(options)
|
@@ -29,37 +24,11 @@ function(pkg_build_config)
|
|
29
24
|
message(FATAL_ERROR "Missing VERSION argument")
|
30
25
|
endif()
|
31
26
|
|
32
|
-
if (DEFINED PKG_BUILD_PREFIX)
|
33
|
-
set(PKGCONFIG_PREFIX "${PKG_BUILD_PREFIX}")
|
34
|
-
else()
|
35
|
-
set(PKGCONFIG_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
36
|
-
endif()
|
37
|
-
|
38
|
-
if(DEFINED PKG_BUILD_LIBDIR)
|
39
|
-
if (IS_ABSOLUTE ${PKG_BUILD_LIBDIR})
|
40
|
-
set(PKGCONFIG_LIBDIR ${PKG_BUILD_LIBDIR})
|
41
|
-
else()
|
42
|
-
set(PKGCONFIG_LIBDIR "\${prefix}/${PKG_BUILD_LIBDIR}")
|
43
|
-
endif()
|
44
|
-
else()
|
45
|
-
set(PKGCONFIG_LIBDIR "\${prefix}/lib")
|
46
|
-
endif()
|
47
|
-
|
48
|
-
if(DEFINED PKG_BUILD_INCLUDEDIR)
|
49
|
-
if (IS_ABSOLUTE ${PKG_BUILD_INCLUDEDIR})
|
50
|
-
set(PKGCONFIG_INCLUDEDIR ${PKG_BUILD_INCLUDEDIR})
|
51
|
-
else()
|
52
|
-
set(PKGCONFIG_INCLUDEDIR "\${prefix}/${PKG_BUILD_INCLUDEDIR}")
|
53
|
-
endif()
|
54
|
-
else()
|
55
|
-
set(PKGCONFIG_INCLUDEDIR "\${prefix}/include")
|
56
|
-
endif()
|
57
|
-
|
58
27
|
# Write .pc "header"
|
59
28
|
file(WRITE "${PKGCONFIG_FILE}"
|
60
|
-
"prefix=\"${
|
61
|
-
"libdir=\"${
|
62
|
-
"includedir=\"${
|
29
|
+
"prefix=\"${CMAKE_INSTALL_PREFIX}\"\n"
|
30
|
+
"libdir=\"${CMAKE_INSTALL_FULL_LIBDIR}\"\n"
|
31
|
+
"includedir=\"${CMAKE_INSTALL_FULL_INCLUDEDIR}\"\n"
|
63
32
|
"\n"
|
64
33
|
"Name: ${PKGCONFIG_NAME}\n"
|
65
34
|
"Description: ${PKGCONFIG_DESCRIPTION}\n"
|
@@ -104,7 +73,5 @@ function(pkg_build_config)
|
|
104
73
|
file(APPEND "${PKGCONFIG_FILE}" "Cflags: -I\${includedir} ${PKGCONFIG_CFLAGS}\n")
|
105
74
|
|
106
75
|
# Install .pc file
|
107
|
-
install(FILES "${PKGCONFIG_FILE}"
|
108
|
-
DESTINATION "${PKGCONFIG_PREFIX}/${PKGCONFIG_LIBDIR}/pkgconfig"
|
109
|
-
)
|
76
|
+
install(FILES "${PKGCONFIG_FILE}" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
110
77
|
endfunction()
|
@@ -0,0 +1,20 @@
|
|
1
|
+
FUNCTION(SanitizeBool VAR)
|
2
|
+
STRING(TOLOWER "${${VAR}}" VALUE)
|
3
|
+
IF(VALUE STREQUAL "on")
|
4
|
+
SET(${VAR} "ON" PARENT_SCOPE)
|
5
|
+
ELSEIF(VALUE STREQUAL "yes")
|
6
|
+
SET(${VAR} "ON" PARENT_SCOPE)
|
7
|
+
ELSEIF(VALUE STREQUAL "true")
|
8
|
+
SET(${VAR} "ON" PARENT_SCOPE)
|
9
|
+
ELSEIF(VALUE STREQUAL "1")
|
10
|
+
SET(${VAR} "ON" PARENT_SCOPE)
|
11
|
+
ELSEIF(VALUE STREQUAL "off")
|
12
|
+
SET(${VAR} "OFF" PARENT_SCOPE)
|
13
|
+
ELSEIF(VALUE STREQUAL "no")
|
14
|
+
SET(${VAR} "OFF" PARENT_SCOPE)
|
15
|
+
ELSEIF(VALUE STREQUAL "false")
|
16
|
+
SET(${VAR} "OFF" PARENT_SCOPE)
|
17
|
+
ELSEIF(VALUE STREQUAL "0")
|
18
|
+
SET(${VAR} "OFF" PARENT_SCOPE)
|
19
|
+
ENDIF()
|
20
|
+
ENDFUNCTION()
|
@@ -2,12 +2,15 @@
|
|
2
2
|
|
3
3
|
# We try to find any packages our backends might use
|
4
4
|
|
5
|
+
INCLUDE(SanitizeBool)
|
6
|
+
|
5
7
|
FIND_PACKAGE(GSSAPI)
|
6
8
|
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
7
9
|
INCLUDE(FindGSSFramework)
|
8
10
|
ENDIF()
|
9
11
|
|
10
12
|
# Auto-select GSS backend
|
13
|
+
SanitizeBool(USE_GSSAPI)
|
11
14
|
IF (USE_GSSAPI STREQUAL ON)
|
12
15
|
IF (GSSFRAMEWORK_FOUND)
|
13
16
|
SET(GSS_BACKEND "GSS.framework")
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# Select the backend to use
|
2
2
|
|
3
|
+
INCLUDE(SanitizeBool)
|
4
|
+
|
3
5
|
# We try to find any packages our backends might use
|
4
6
|
FIND_PACKAGE(OpenSSL)
|
5
7
|
FIND_PACKAGE(mbedTLS)
|
@@ -9,6 +11,7 @@ IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
9
11
|
ENDIF()
|
10
12
|
|
11
13
|
# Auto-select TLS backend
|
14
|
+
SanitizeBool(USE_HTTPS)
|
12
15
|
IF (USE_HTTPS STREQUAL ON)
|
13
16
|
IF (SECURITY_FOUND)
|
14
17
|
IF (SECURITY_HAS_SSLCREATECONTEXT)
|
@@ -1,7 +1,10 @@
|
|
1
1
|
# Select a hash backend
|
2
2
|
|
3
|
+
INCLUDE(SanitizeBool)
|
4
|
+
|
3
5
|
# USE_SHA1=CollisionDetection(ON)/HTTPS/Generic/OFF
|
4
6
|
|
7
|
+
SanitizeBool(USE_SHA1)
|
5
8
|
IF(USE_SHA1 STREQUAL ON OR USE_SHA1 STREQUAL "CollisionDetection")
|
6
9
|
SET(SHA1_BACKEND "CollisionDetection")
|
7
10
|
ELSEIF(USE_SHA1 STREQUAL "HTTPS")
|
@@ -7,6 +7,8 @@ DISABLE_WARNINGS(implicit-fallthrough)
|
|
7
7
|
IF (HTTPS_BACKEND STREQUAL "SecureTransport")
|
8
8
|
ADD_DEFINITIONS(-DCRYPT_COMMONCRYPTO)
|
9
9
|
SET(SRC_NTLMCLIENT_CRYPTO "crypt_commoncrypto.c")
|
10
|
+
# CC_MD4 has been deprecated in macOS 10.15.
|
11
|
+
SET_SOURCE_FILES_PROPERTIES("crypt_commoncrypto.c" COMPILE_FLAGS "-Wno-deprecated")
|
10
12
|
ELSEIF (HTTPS_BACKEND STREQUAL "OpenSSL")
|
11
13
|
ADD_DEFINITIONS(-DCRYPT_OPENSSL)
|
12
14
|
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
|
@@ -22,8 +22,30 @@
|
|
22
22
|
#endif
|
23
23
|
|
24
24
|
#ifdef __linux__
|
25
|
+
/* See man page endian(3) */
|
25
26
|
# include <endian.h>
|
26
27
|
# define htonll htobe64
|
28
|
+
#elif defined(__OpenBSD__)
|
29
|
+
/* See man page htobe64(3) */
|
30
|
+
# include <endian.h>
|
31
|
+
# define htonll htobe64
|
32
|
+
#elif defined(__FreeBSD__)
|
33
|
+
/* See man page bwaps64(9) */
|
34
|
+
# include <sys/endian.h>
|
35
|
+
# define htonll htobe64
|
36
|
+
#elif defined(sun) || defined(__sun)
|
37
|
+
/* See man page byteorder(3SOCKET) */
|
38
|
+
# include <sys/types.h>
|
39
|
+
# include <netinet/in.h>
|
40
|
+
# include <inttypes.h>
|
41
|
+
|
42
|
+
# if !defined(htonll)
|
43
|
+
# if defined(_BIG_ENDIAN)
|
44
|
+
# define htonll(x) (x)
|
45
|
+
# else
|
46
|
+
# define htonll(x) ((((uint64_t)htonl(x)) << 32) + htonl((uint64_t)(x) >> 32))
|
47
|
+
# endif
|
48
|
+
# endif
|
27
49
|
#endif
|
28
50
|
|
29
51
|
#ifndef MIN
|
@@ -41,6 +41,13 @@
|
|
41
41
|
*/
|
42
42
|
#ifndef GIT_DEPRECATE_HARD
|
43
43
|
|
44
|
+
/*
|
45
|
+
* The credential structures are now opaque by default, and their
|
46
|
+
* definition has moved into the `sys/credential.h` header; include
|
47
|
+
* them here for backward compatibility.
|
48
|
+
*/
|
49
|
+
#include "sys/credential.h"
|
50
|
+
|
44
51
|
/**
|
45
52
|
* @file git2/deprecated.h
|
46
53
|
* @brief libgit2 deprecated functions and values
|
@@ -481,10 +481,11 @@ GIT_EXTERN(const char *) git_repository_path(const git_repository *repo);
|
|
481
481
|
GIT_EXTERN(const char *) git_repository_workdir(const git_repository *repo);
|
482
482
|
|
483
483
|
/**
|
484
|
-
* Get the path of the shared common directory for this repository
|
485
|
-
*
|
486
|
-
* If the repository is bare is
|
487
|
-
*
|
484
|
+
* Get the path of the shared common directory for this repository.
|
485
|
+
*
|
486
|
+
* If the repository is bare, it is the root directory for the repository.
|
487
|
+
* If the repository is a worktree, it is the parent repo's gitdir.
|
488
|
+
* Otherwise, it is the gitdir.
|
488
489
|
*
|
489
490
|
* @param repo A repository object
|
490
491
|
* @return the path to the common dir
|
@@ -64,6 +64,12 @@ struct git_refdb_backend {
|
|
64
64
|
* Queries the refdb backend for the existence of a reference.
|
65
65
|
*
|
66
66
|
* A refdb implementation must provide this function.
|
67
|
+
*
|
68
|
+
* @arg exists The implementation shall set this to `0` if a ref does
|
69
|
+
* not exist, otherwise to `1`.
|
70
|
+
* @arg ref_name The reference's name that should be checked for
|
71
|
+
* existence.
|
72
|
+
* @return `0` on success, a negative error value code.
|
67
73
|
*/
|
68
74
|
int GIT_CALLBACK(exists)(
|
69
75
|
int *exists,
|
@@ -74,6 +80,13 @@ struct git_refdb_backend {
|
|
74
80
|
* Queries the refdb backend for a given reference.
|
75
81
|
*
|
76
82
|
* A refdb implementation must provide this function.
|
83
|
+
*
|
84
|
+
* @arg out The implementation shall set this to the allocated
|
85
|
+
* reference, if it could be found, otherwise to `NULL`.
|
86
|
+
* @arg ref_name The reference's name that should be checked for
|
87
|
+
* existence.
|
88
|
+
* @return `0` on success, `GIT_ENOTFOUND` if the reference does
|
89
|
+
* exist, otherwise a negative error code.
|
77
90
|
*/
|
78
91
|
int GIT_CALLBACK(lookup)(
|
79
92
|
git_reference **out,
|
@@ -84,6 +97,16 @@ struct git_refdb_backend {
|
|
84
97
|
* Allocate an iterator object for the backend.
|
85
98
|
*
|
86
99
|
* A refdb implementation must provide this function.
|
100
|
+
*
|
101
|
+
* @arg out The implementation shall set this to the allocated
|
102
|
+
* reference iterator. A custom structure may be used with an
|
103
|
+
* embedded `git_reference_iterator` structure. Both `next`
|
104
|
+
* and `next_name` functions of `git_reference_iterator` need
|
105
|
+
* to be populated.
|
106
|
+
* @arg glob A pattern to filter references by. If given, the iterator
|
107
|
+
* shall only return references that match the glob when
|
108
|
+
* passed to `wildmatch`.
|
109
|
+
* @return `0` on success, otherwise a negative error code.
|
87
110
|
*/
|
88
111
|
int GIT_CALLBACK(iterator)(
|
89
112
|
git_reference_iterator **iter,
|
@@ -94,6 +117,27 @@ struct git_refdb_backend {
|
|
94
117
|
* Writes the given reference to the refdb.
|
95
118
|
*
|
96
119
|
* A refdb implementation must provide this function.
|
120
|
+
*
|
121
|
+
* @arg ref The reference to persist. May either be a symbolic or
|
122
|
+
* direct reference.
|
123
|
+
* @arg force Whether to write the reference if a reference with the
|
124
|
+
* same name already exists.
|
125
|
+
* @arg who The person updating the reference. Shall be used to create
|
126
|
+
* a reflog entry.
|
127
|
+
* @arg message The message detailing what kind of reference update is
|
128
|
+
* performed. Shall be used to create a reflog entry.
|
129
|
+
* @arg old If not `NULL` and `force` is not set, then the
|
130
|
+
* implementation needs to ensure that the reference is currently at
|
131
|
+
* the given OID before writing the new value. If both `old`
|
132
|
+
* and `old_target` are `NULL`, then the reference should not
|
133
|
+
* exist at the point of writing.
|
134
|
+
* @arg old_target If not `NULL` and `force` is not set, then the
|
135
|
+
* implementation needs to ensure that the symbolic
|
136
|
+
* reference is currently at the given target before
|
137
|
+
* writing the new value. If both `old` and
|
138
|
+
* `old_target` are `NULL`, then the reference should
|
139
|
+
* not exist at the point of writing.
|
140
|
+
* @return `0` on success, otherwise a negative error code.
|
97
141
|
*/
|
98
142
|
int GIT_CALLBACK(write)(git_refdb_backend *backend,
|
99
143
|
const git_reference *ref, int force,
|
@@ -104,6 +148,18 @@ struct git_refdb_backend {
|
|
104
148
|
* Rename a reference in the refdb.
|
105
149
|
*
|
106
150
|
* A refdb implementation must provide this function.
|
151
|
+
*
|
152
|
+
* @arg out The implementation shall set this to the newly created
|
153
|
+
* reference or `NULL` on error.
|
154
|
+
* @arg old_name The current name of the reference that is to be renamed.
|
155
|
+
* @arg new_name The new name that the old reference shall be renamed to.
|
156
|
+
* @arg force Whether to write the reference if a reference with the
|
157
|
+
* target name already exists.
|
158
|
+
* @arg who The person updating the reference. Shall be used to create
|
159
|
+
* a reflog entry.
|
160
|
+
* @arg message The message detailing what kind of reference update is
|
161
|
+
* performed. Shall be used to create a reflog entry.
|
162
|
+
* @return `0` on success, otherwise a negative error code.
|
107
163
|
*/
|
108
164
|
int GIT_CALLBACK(rename)(
|
109
165
|
git_reference **out, git_refdb_backend *backend,
|
@@ -116,6 +172,16 @@ struct git_refdb_backend {
|
|
116
172
|
* If it exists, its reflog should be deleted as well.
|
117
173
|
*
|
118
174
|
* A refdb implementation must provide this function.
|
175
|
+
*
|
176
|
+
* @arg ref_name The name of the reference name that shall be deleted.
|
177
|
+
* @arg old_id If not `NULL` and `force` is not set, then the
|
178
|
+
* implementation needs to ensure that the reference is currently at
|
179
|
+
* the given OID before writing the new value.
|
180
|
+
* @arg old_target If not `NULL` and `force` is not set, then the
|
181
|
+
* implementation needs to ensure that the symbolic
|
182
|
+
* reference is currently at the given target before
|
183
|
+
* writing the new value.
|
184
|
+
* @return `0` on success, otherwise a negative error code.
|
119
185
|
*/
|
120
186
|
int GIT_CALLBACK(del)(git_refdb_backend *backend, const char *ref_name, const git_oid *old_id, const char *old_target);
|
121
187
|
|
@@ -127,13 +193,21 @@ struct git_refdb_backend {
|
|
127
193
|
*
|
128
194
|
* A refdb implementation may provide this function; if it is not
|
129
195
|
* provided, nothing will be done.
|
196
|
+
*
|
197
|
+
* @return `0` on success a negative error code otherwise
|
130
198
|
*/
|
131
199
|
int GIT_CALLBACK(compress)(git_refdb_backend *backend);
|
132
200
|
|
133
201
|
/**
|
134
202
|
* Query whether a particular reference has a log (may be empty)
|
135
203
|
*
|
204
|
+
* Shall return 1 if it has a reflog, 0 it it doesn't and negative in
|
205
|
+
* case an error occurred.
|
206
|
+
*
|
136
207
|
* A refdb implementation must provide this function.
|
208
|
+
*
|
209
|
+
* @return `0` on success, `1` if the reflog for the given reference
|
210
|
+
* exists, a negative error code otherwise
|
137
211
|
*/
|
138
212
|
int GIT_CALLBACK(has_log)(git_refdb_backend *backend, const char *refname);
|
139
213
|
|
@@ -142,6 +216,8 @@ struct git_refdb_backend {
|
|
142
216
|
* will be appended to on writes.
|
143
217
|
*
|
144
218
|
* A refdb implementation must provide this function.
|
219
|
+
*
|
220
|
+
* @return `0` on success, a negative error code otherwise
|
145
221
|
*/
|
146
222
|
int GIT_CALLBACK(ensure_log)(git_refdb_backend *backend, const char *refname);
|
147
223
|
|
@@ -157,6 +233,8 @@ struct git_refdb_backend {
|
|
157
233
|
* Read the reflog for the given reference name.
|
158
234
|
*
|
159
235
|
* A refdb implementation must provide this function.
|
236
|
+
*
|
237
|
+
* @return `0` on success, a negative error code otherwise
|
160
238
|
*/
|
161
239
|
int GIT_CALLBACK(reflog_read)(git_reflog **out, git_refdb_backend *backend, const char *name);
|
162
240
|
|
@@ -164,6 +242,11 @@ struct git_refdb_backend {
|
|
164
242
|
* Write a reflog to disk.
|
165
243
|
*
|
166
244
|
* A refdb implementation must provide this function.
|
245
|
+
*
|
246
|
+
* @arg reflog The complete reference log for a given reference. Note
|
247
|
+
* that this may contain entries that have already been
|
248
|
+
* written to disk.
|
249
|
+
* @return `0` on success, a negative error code otherwise
|
167
250
|
*/
|
168
251
|
int GIT_CALLBACK(reflog_write)(git_refdb_backend *backend, git_reflog *reflog);
|
169
252
|
|
@@ -171,6 +254,10 @@ struct git_refdb_backend {
|
|
171
254
|
* Rename a reflog.
|
172
255
|
*
|
173
256
|
* A refdb implementation must provide this function.
|
257
|
+
*
|
258
|
+
* @arg old_name The name of old reference whose reflog shall be renamed from.
|
259
|
+
* @arg new_name The name of new reference whose reflog shall be renamed to.
|
260
|
+
* @return `0` on success, a negative error code otherwise
|
174
261
|
*/
|
175
262
|
int GIT_CALLBACK(reflog_rename)(git_refdb_backend *_backend, const char *old_name, const char *new_name);
|
176
263
|
|
@@ -178,16 +265,22 @@ struct git_refdb_backend {
|
|
178
265
|
* Remove a reflog.
|
179
266
|
*
|
180
267
|
* A refdb implementation must provide this function.
|
268
|
+
*
|
269
|
+
* @arg name The name of the reference whose reflog shall be deleted.
|
270
|
+
* @return `0` on success, a negative error code otherwise
|
181
271
|
*/
|
182
272
|
int GIT_CALLBACK(reflog_delete)(git_refdb_backend *backend, const char *name);
|
183
273
|
|
184
274
|
/**
|
185
275
|
* Lock a reference.
|
186
276
|
*
|
187
|
-
* The opaque parameter will be passed to the unlock function.
|
188
|
-
*
|
189
277
|
* A refdb implementation may provide this function; if it is not
|
190
278
|
* provided, the transaction API will fail to work.
|
279
|
+
*
|
280
|
+
* @arg payload_out Opaque parameter that will be passed verbosely to
|
281
|
+
* `unlock`.
|
282
|
+
* @arg refname Reference that shall be locked.
|
283
|
+
* @return `0` on success, a negative error code otherwise
|
191
284
|
*/
|
192
285
|
int GIT_CALLBACK(lock)(void **payload_out, git_refdb_backend *backend, const char *refname);
|
193
286
|
|
@@ -200,6 +293,20 @@ struct git_refdb_backend {
|
|
200
293
|
*
|
201
294
|
* A refdb implementation must provide this function if a `lock`
|
202
295
|
* implementation is provided.
|
296
|
+
*
|
297
|
+
* @arg payload The payload returned by `lock`.
|
298
|
+
* @arg success `1` if a reference should be updated, `2` if
|
299
|
+
* a reference should be deleted, `0` if the lock must be
|
300
|
+
* discarded.
|
301
|
+
* @arg update_reflog `1` in case the reflog should be updated, `0`
|
302
|
+
* otherwise.
|
303
|
+
* @arg ref The reference which should be unlocked.
|
304
|
+
* @arg who The person updating the reference. Shall be used to create
|
305
|
+
* a reflog entry in case `update_reflog` is set.
|
306
|
+
* @arg message The message detailing what kind of reference update is
|
307
|
+
* performed. Shall be used to create a reflog entry in
|
308
|
+
* case `update_reflog` is set.
|
309
|
+
* @return `0` on success, a negative error code otherwise
|
203
310
|
*/
|
204
311
|
int GIT_CALLBACK(unlock)(git_refdb_backend *backend, void *payload, int success, int update_reflog,
|
205
312
|
const git_reference *ref, const git_signature *sig, const char *message);
|
@@ -7,12 +7,12 @@
|
|
7
7
|
#ifndef INCLUDE_git_version_h__
|
8
8
|
#define INCLUDE_git_version_h__
|
9
9
|
|
10
|
-
#define LIBGIT2_VERSION "0.
|
11
|
-
#define LIBGIT2_VER_MAJOR
|
12
|
-
#define LIBGIT2_VER_MINOR
|
10
|
+
#define LIBGIT2_VERSION "1.0.0"
|
11
|
+
#define LIBGIT2_VER_MAJOR 1
|
12
|
+
#define LIBGIT2_VER_MINOR 0
|
13
13
|
#define LIBGIT2_VER_REVISION 0
|
14
14
|
#define LIBGIT2_VER_PATCH 0
|
15
15
|
|
16
|
-
#define LIBGIT2_SOVERSION "0
|
16
|
+
#define LIBGIT2_SOVERSION "1.0"
|
17
17
|
|
18
18
|
#endif
|