rugged 0.23.0 → 0.23.1
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/ext/rugged/rugged_remote.c +1 -8
- data/ext/rugged/rugged_submodule_collection.c +3 -3
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/CMakeLists.txt +3 -1
- data/vendor/libgit2/include/git2/diff.h +19 -0
- data/vendor/libgit2/include/git2/errors.h +1 -12
- data/vendor/libgit2/include/git2/remote.h +9 -1
- data/vendor/libgit2/include/git2/repository.h +1 -1
- data/vendor/libgit2/include/git2/sys/config.h +1 -1
- data/vendor/libgit2/include/git2/sys/diff.h +4 -4
- data/vendor/libgit2/include/git2/sys/filter.h +4 -1
- data/vendor/libgit2/include/git2/sys/odb_backend.h +1 -1
- data/vendor/libgit2/include/git2/sys/refdb_backend.h +4 -3
- data/vendor/libgit2/include/git2/transport.h +14 -21
- data/vendor/libgit2/src/blame_git.c +10 -15
- data/vendor/libgit2/src/blob.c +6 -0
- data/vendor/libgit2/src/branch.c +1 -12
- data/vendor/libgit2/src/cache.c +4 -4
- data/vendor/libgit2/src/checkout.c +2 -2
- data/vendor/libgit2/src/clone.c +2 -2
- data/vendor/libgit2/src/common.h +13 -4
- data/vendor/libgit2/src/curl_stream.c +7 -7
- data/vendor/libgit2/src/describe.c +1 -1
- data/vendor/libgit2/src/diff.c +25 -0
- data/vendor/libgit2/src/errors.c +75 -40
- data/vendor/libgit2/src/filebuf.c +6 -1
- data/vendor/libgit2/src/filebuf.h +2 -0
- data/vendor/libgit2/src/filter.c +14 -9
- data/vendor/libgit2/src/global.c +25 -9
- data/vendor/libgit2/src/global.h +1 -0
- data/vendor/libgit2/src/index.c +75 -2
- data/vendor/libgit2/src/indexer.c +1 -1
- data/vendor/libgit2/src/iterator.c +6 -3
- data/vendor/libgit2/src/khash.h +1 -1
- data/vendor/libgit2/src/merge.c +3 -3
- data/vendor/libgit2/src/openssl_stream.c +5 -2
- data/vendor/libgit2/src/pack-objects.c +1 -1
- data/vendor/libgit2/src/pack.c +2 -2
- data/vendor/libgit2/src/path.c +25 -4
- data/vendor/libgit2/src/path.h +6 -1
- data/vendor/libgit2/src/push.h +3 -1
- data/vendor/libgit2/src/rebase.c +2 -2
- data/vendor/libgit2/src/refdb_fs.c +7 -0
- data/vendor/libgit2/src/remote.c +18 -9
- data/vendor/libgit2/src/revwalk.c +1 -1
- data/vendor/libgit2/src/stash.c +1 -1
- data/vendor/libgit2/src/stransport_stream.c +1 -1
- data/vendor/libgit2/src/submodule.c +12 -1
- data/vendor/libgit2/src/sysdir.c +22 -8
- data/vendor/libgit2/src/thread-utils.c +2 -0
- data/vendor/libgit2/src/transports/git.c +2 -0
- data/vendor/libgit2/src/transports/http.c +2 -2
- data/vendor/libgit2/src/transports/smart_pkt.c +1 -1
- data/vendor/libgit2/src/transports/ssh.c +4 -2
- data/vendor/libgit2/src/transports/winhttp.c +1 -1
- data/vendor/libgit2/src/util.c +48 -0
- data/vendor/libgit2/src/util.h +13 -5
- data/vendor/libgit2/src/win32/posix_w32.c +2 -0
- data/vendor/libgit2/src/win32/{buffer.c → w32_buffer.c} +1 -2
- data/vendor/libgit2/src/win32/{buffer.h → w32_buffer.h} +0 -0
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +343 -0
- data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +93 -0
- data/vendor/libgit2/src/win32/w32_stack.c +192 -0
- data/vendor/libgit2/src/win32/w32_stack.h +138 -0
- data/vendor/libgit2/src/xdiff/xdiff.h +10 -6
- data/vendor/libgit2/src/xdiff/xdiffi.c +46 -4
- data/vendor/libgit2/src/xdiff/xdiffi.h +1 -0
- data/vendor/libgit2/src/xdiff/xemit.c +43 -6
- data/vendor/libgit2/src/xdiff/xemit.h +1 -1
- data/vendor/libgit2/src/xdiff/xhistogram.c +1 -1
- data/vendor/libgit2/src/xdiff/xmerge.c +2 -2
- data/vendor/libgit2/src/xdiff/xpatience.c +1 -1
- data/vendor/libgit2/src/xdiff/xprepare.c +10 -11
- data/vendor/libgit2/src/xdiff/xutils.c +13 -29
- data/vendor/libgit2/src/xdiff/xutils.h +1 -0
- metadata +84 -80
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 908d5cc69a9c2694268229e0c32f174f2e849260
|
|
4
|
+
data.tar.gz: 01f60ed642064d77e78676fb93e7876b5a5c7279
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5a3e08df00ea4527b864df64b7490ae0f88182a158ed11128c30691891a90364ce688bed4e3d4b3dbaf94fe918051ea8fb2562cd635afebf7af06f0d99b6a273
|
|
7
|
+
data.tar.gz: d93f2bd237d2e798d03c9096b3989408d8d30b460a35970ce667ebf57b5312edae0726a08a6815f7e9a8dec0f95895ccedbe742d2f519fb97a871bdb74bd9b7d
|
data/ext/rugged/rugged_remote.c
CHANGED
|
@@ -514,7 +514,6 @@ static VALUE rb_git_remote_check_connection(int argc, VALUE *argv, VALUE self)
|
|
|
514
514
|
static VALUE rb_git_remote_fetch(int argc, VALUE *argv, VALUE self)
|
|
515
515
|
{
|
|
516
516
|
git_remote *remote;
|
|
517
|
-
git_repository *repo;
|
|
518
517
|
git_strarray refspecs;
|
|
519
518
|
git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;
|
|
520
519
|
const git_transfer_progress *stats;
|
|
@@ -523,15 +522,13 @@ static VALUE rb_git_remote_fetch(int argc, VALUE *argv, VALUE self)
|
|
|
523
522
|
char *log_message = NULL;
|
|
524
523
|
int error;
|
|
525
524
|
|
|
526
|
-
VALUE rb_options, rb_refspecs, rb_result = Qnil
|
|
525
|
+
VALUE rb_options, rb_refspecs, rb_result = Qnil;
|
|
527
526
|
|
|
528
527
|
rb_scan_args(argc, argv, "01:", &rb_refspecs, &rb_options);
|
|
529
528
|
|
|
530
529
|
rugged_rb_ary_to_strarray(rb_refspecs, &refspecs);
|
|
531
530
|
|
|
532
531
|
Data_Get_Struct(self, git_remote, remote);
|
|
533
|
-
rugged_check_repo(rb_repo);
|
|
534
|
-
Data_Get_Struct(rb_repo, git_repository, repo);
|
|
535
532
|
|
|
536
533
|
rugged_remote_init_callbacks_and_payload_from_options(rb_options, &opts.callbacks, &payload);
|
|
537
534
|
|
|
@@ -594,9 +591,7 @@ static VALUE rb_git_remote_fetch(int argc, VALUE *argv, VALUE self)
|
|
|
594
591
|
static VALUE rb_git_remote_push(int argc, VALUE *argv, VALUE self)
|
|
595
592
|
{
|
|
596
593
|
VALUE rb_refspecs, rb_options;
|
|
597
|
-
VALUE rb_repo = rugged_owner(self);
|
|
598
594
|
|
|
599
|
-
git_repository *repo;
|
|
600
595
|
git_remote *remote;
|
|
601
596
|
git_strarray refspecs;
|
|
602
597
|
git_push_options opts = GIT_PUSH_OPTIONS_INIT;
|
|
@@ -609,8 +604,6 @@ static VALUE rb_git_remote_push(int argc, VALUE *argv, VALUE self)
|
|
|
609
604
|
|
|
610
605
|
rugged_rb_ary_to_strarray(rb_refspecs, &refspecs);
|
|
611
606
|
|
|
612
|
-
rugged_check_repo(rb_repo);
|
|
613
|
-
Data_Get_Struct(rb_repo, git_repository, repo);
|
|
614
607
|
Data_Get_Struct(self, git_remote, remote);
|
|
615
608
|
|
|
616
609
|
rugged_remote_init_callbacks_and_payload_from_options(rb_options, &opts.callbacks, &payload);
|
|
@@ -291,10 +291,10 @@ static git_submodule_update_t rb_git_subm_update_rule_toC(VALUE rb_update_rule)
|
|
|
291
291
|
static VALUE rb_git_submodule_update(VALUE self, VALUE rb_name_or_submodule, VALUE rb_settings)
|
|
292
292
|
{
|
|
293
293
|
git_repository *repo;
|
|
294
|
-
git_submodule_ignore_t ignore_rule;
|
|
295
|
-
git_submodule_update_t update_rule;
|
|
294
|
+
git_submodule_ignore_t ignore_rule = GIT_SUBMODULE_IGNORE_UNSPECIFIED;
|
|
295
|
+
git_submodule_update_t update_rule = GIT_SUBMODULE_UPDATE_DEFAULT;
|
|
296
296
|
const char *submodule_name;
|
|
297
|
-
int fetch_recurse_submodules;
|
|
297
|
+
int fetch_recurse_submodules = 0;
|
|
298
298
|
VALUE rb_repo = rugged_owner(self);
|
|
299
299
|
VALUE rb_url, rb_fetch_recurse_submodules, rb_ignore_rule, rb_update_rule;
|
|
300
300
|
|
data/lib/rugged/version.rb
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
# > cmake --build . --target install
|
|
13
13
|
|
|
14
14
|
PROJECT(libgit2 C)
|
|
15
|
-
CMAKE_MINIMUM_REQUIRED(VERSION 2.
|
|
15
|
+
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
|
16
16
|
CMAKE_POLICY(SET CMP0015 NEW)
|
|
17
17
|
|
|
18
18
|
# Add find modules to the path
|
|
@@ -336,6 +336,7 @@ IF (MSVC)
|
|
|
336
336
|
|
|
337
337
|
IF (MSVC_CRTDBG)
|
|
338
338
|
SET(CRT_FLAG_DEBUG "${CRT_FLAG_DEBUG} /DGIT_MSVC_CRTDBG")
|
|
339
|
+
SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}" "Dbghelp.lib")
|
|
339
340
|
ENDIF()
|
|
340
341
|
|
|
341
342
|
# /Zi - Create debugging information
|
|
@@ -412,6 +413,7 @@ ELSE ()
|
|
|
412
413
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
|
413
414
|
ENDIF ()
|
|
414
415
|
|
|
416
|
+
ADD_C_FLAG_IF_SUPPORTED(-Wdocumentation)
|
|
415
417
|
ADD_C_FLAG_IF_SUPPORTED(-Wno-missing-field-initializers)
|
|
416
418
|
ADD_C_FLAG_IF_SUPPORTED(-Wstrict-aliasing=2)
|
|
417
419
|
ADD_C_FLAG_IF_SUPPORTED(-Wstrict-prototypes)
|
|
@@ -835,6 +835,25 @@ GIT_EXTERN(int) git_diff_tree_to_workdir_with_index(
|
|
|
835
835
|
git_tree *old_tree,
|
|
836
836
|
const git_diff_options *opts); /**< can be NULL for defaults */
|
|
837
837
|
|
|
838
|
+
/**
|
|
839
|
+
* Create a diff with the difference between two index objects.
|
|
840
|
+
*
|
|
841
|
+
* The first index will be used for the "old_file" side of the delta and the
|
|
842
|
+
* second index will be used for the "new_file" side of the delta.
|
|
843
|
+
*
|
|
844
|
+
* @param diff Output pointer to a git_diff pointer to be allocated.
|
|
845
|
+
* @param repo The repository containing the indexes.
|
|
846
|
+
* @param old_index A git_index object to diff from.
|
|
847
|
+
* @param new_index A git_index object to diff to.
|
|
848
|
+
* @param opts Structure with options to influence diff or NULL for defaults.
|
|
849
|
+
*/
|
|
850
|
+
GIT_EXTERN(int) git_diff_index_to_index(
|
|
851
|
+
git_diff **diff,
|
|
852
|
+
git_repository *repo,
|
|
853
|
+
git_index *old_index,
|
|
854
|
+
git_index *new_index,
|
|
855
|
+
const git_diff_options *opts); /**< can be NULL for defaults */
|
|
856
|
+
|
|
838
857
|
/**
|
|
839
858
|
* Merge one diff into another.
|
|
840
859
|
*
|
|
@@ -48,6 +48,7 @@ typedef enum {
|
|
|
48
48
|
GIT_EEOF = -20, /**< Unexpected EOF */
|
|
49
49
|
GIT_EINVALID = -21, /**< Invalid operation or input */
|
|
50
50
|
GIT_EUNCOMMITTED = -22, /**< Uncommitted changes in index prevented operation */
|
|
51
|
+
GIT_EDIRECTORY = -23, /**< The operation is not valid for a directory */
|
|
51
52
|
|
|
52
53
|
GIT_PASSTHROUGH = -30, /**< Internal only */
|
|
53
54
|
GIT_ITEROVER = -31, /**< Signals end of iteration with iterator */
|
|
@@ -112,18 +113,6 @@ GIT_EXTERN(const git_error *) giterr_last(void);
|
|
|
112
113
|
*/
|
|
113
114
|
GIT_EXTERN(void) giterr_clear(void);
|
|
114
115
|
|
|
115
|
-
/**
|
|
116
|
-
* Get the last error data and clear it.
|
|
117
|
-
*
|
|
118
|
-
* This copies the last error into the given `git_error` struct
|
|
119
|
-
* and returns 0 if the copy was successful, leaving the error
|
|
120
|
-
* cleared as if `giterr_clear` had been called.
|
|
121
|
-
*
|
|
122
|
-
* If there was no existing error in the library, -1 will be returned
|
|
123
|
-
* and the contents of `cpy` will be left unmodified.
|
|
124
|
-
*/
|
|
125
|
-
GIT_EXTERN(int) giterr_detach(git_error *cpy);
|
|
126
|
-
|
|
127
116
|
/**
|
|
128
117
|
* Set the error message string for this thread.
|
|
129
118
|
*
|
|
@@ -511,6 +511,14 @@ typedef enum {
|
|
|
511
511
|
GIT_REMOTE_DOWNLOAD_TAGS_ALL,
|
|
512
512
|
} git_remote_autotag_option_t;
|
|
513
513
|
|
|
514
|
+
/**
|
|
515
|
+
* Fetch options structure.
|
|
516
|
+
*
|
|
517
|
+
* Zero out for defaults. Initialize with `GIT_FETCH_OPTIONS_INIT` macro to
|
|
518
|
+
* correctly set the `version` field. E.g.
|
|
519
|
+
*
|
|
520
|
+
* git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;
|
|
521
|
+
*/
|
|
514
522
|
typedef struct {
|
|
515
523
|
int version;
|
|
516
524
|
|
|
@@ -739,7 +747,7 @@ GIT_EXTERN(int) git_remote_prune_refs(const git_remote *remote);
|
|
|
739
747
|
* stored here for further processing by the caller. Always free this
|
|
740
748
|
* strarray on successful return.
|
|
741
749
|
* @param repo the repository in which to rename
|
|
742
|
-
* @param name the current name of the
|
|
750
|
+
* @param name the current name of the remote
|
|
743
751
|
* @param new_name the new name the remote should bear
|
|
744
752
|
* @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code
|
|
745
753
|
*/
|
|
@@ -745,7 +745,7 @@ GIT_EXTERN(int) git_repository_ident(const char **name, const char **email, cons
|
|
|
745
745
|
*
|
|
746
746
|
* @param repo the repository to configure
|
|
747
747
|
* @param name the name to use for the reflog entries
|
|
748
|
-
* @param
|
|
748
|
+
* @param email the email to use for the reflog entries
|
|
749
749
|
*/
|
|
750
750
|
GIT_EXTERN(int) git_repository_set_ident(git_repository *repo, const char *name, const char *email);
|
|
751
751
|
|
|
@@ -76,7 +76,7 @@ struct git_config_backend {
|
|
|
76
76
|
* Initializes a `git_config_backend` with default values. Equivalent to
|
|
77
77
|
* creating an instance with GIT_CONFIG_BACKEND_INIT.
|
|
78
78
|
*
|
|
79
|
-
* @param
|
|
79
|
+
* @param backend the `git_config_backend` struct to initialize.
|
|
80
80
|
* @param version Version of struct; pass `GIT_CONFIG_BACKEND_VERSION`
|
|
81
81
|
* @return Zero on success; -1 on failure.
|
|
82
82
|
*/
|
|
@@ -38,7 +38,7 @@ GIT_EXTERN(int) git_diff_print_callback__to_buf(
|
|
|
38
38
|
const git_diff_delta *delta,
|
|
39
39
|
const git_diff_hunk *hunk,
|
|
40
40
|
const git_diff_line *line,
|
|
41
|
-
void *payload);
|
|
41
|
+
void *payload); /**< payload must be a `git_buf *` */
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Diff print callback that writes to stdio FILE handle.
|
|
@@ -58,7 +58,7 @@ GIT_EXTERN(int) git_diff_print_callback__to_file_handle(
|
|
|
58
58
|
const git_diff_delta *delta,
|
|
59
59
|
const git_diff_hunk *hunk,
|
|
60
60
|
const git_diff_line *line,
|
|
61
|
-
void *payload);
|
|
61
|
+
void *payload); /**< payload must be a `FILE *` */
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
@@ -66,8 +66,8 @@ GIT_EXTERN(int) git_diff_print_callback__to_file_handle(
|
|
|
66
66
|
*/
|
|
67
67
|
typedef struct {
|
|
68
68
|
unsigned int version;
|
|
69
|
-
size_t stat_calls;
|
|
70
|
-
size_t oid_calculations;
|
|
69
|
+
size_t stat_calls; /**< Number of stat() calls performed */
|
|
70
|
+
size_t oid_calculations; /**< Number of ID calculations */
|
|
71
71
|
} git_diff_perfdata;
|
|
72
72
|
|
|
73
73
|
#define GIT_DIFF_PERFDATA_VERSION 1
|
|
@@ -240,7 +240,10 @@ typedef void (*git_filter_cleanup_fn)(
|
|
|
240
240
|
* for this filter (e.g. "eol crlf text"). If the attribute name is bare,
|
|
241
241
|
* it will be simply loaded and passed to the `check` callback. If it has
|
|
242
242
|
* a value (i.e. "name=value"), the attribute must match that value for
|
|
243
|
-
* the filter to be applied.
|
|
243
|
+
* the filter to be applied. The value may be a wildcard (eg, "name=*"),
|
|
244
|
+
* in which case the filter will be invoked for any value for the given
|
|
245
|
+
* attribute name. See the attribute parameter of the `check` callback
|
|
246
|
+
* for the attribute value that was specified.
|
|
244
247
|
*
|
|
245
248
|
* The `initialize`, `shutdown`, `check`, `apply`, and `cleanup` callbacks
|
|
246
249
|
* are all documented above with the respective function pointer typedefs.
|
|
@@ -93,7 +93,7 @@ struct git_odb_backend {
|
|
|
93
93
|
* Initializes a `git_odb_backend` with default values. Equivalent to
|
|
94
94
|
* creating an instance with GIT_ODB_BACKEND_INIT.
|
|
95
95
|
*
|
|
96
|
-
* @param
|
|
96
|
+
* @param backend the `git_odb_backend` struct to initialize.
|
|
97
97
|
* @param version Version the struct; pass `GIT_ODB_BACKEND_VERSION`
|
|
98
98
|
* @return Zero on success; -1 on failure.
|
|
99
99
|
*/
|
|
@@ -103,8 +103,9 @@ struct git_refdb_backend {
|
|
|
103
103
|
const git_signature *who, const char *message);
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
|
-
* Deletes the given reference
|
|
107
|
-
* must provide this
|
|
106
|
+
* Deletes the given reference (and if necessary its reflog)
|
|
107
|
+
* from the refdb. A refdb implementation must provide this
|
|
108
|
+
* function.
|
|
108
109
|
*/
|
|
109
110
|
int (*del)(git_refdb_backend *backend, const char *ref_name, const git_oid *old_id, const char *old_target);
|
|
110
111
|
|
|
@@ -175,7 +176,7 @@ struct git_refdb_backend {
|
|
|
175
176
|
* Initializes a `git_refdb_backend` with default values. Equivalent to
|
|
176
177
|
* creating an instance with GIT_REFDB_BACKEND_INIT.
|
|
177
178
|
*
|
|
178
|
-
* @param
|
|
179
|
+
* @param backend the `git_refdb_backend` struct to initialize
|
|
179
180
|
* @param version Version of struct; pass `GIT_REFDB_BACKEND_VERSION`
|
|
180
181
|
* @return Zero on success; -1 on failure.
|
|
181
182
|
*/
|
|
@@ -37,39 +37,32 @@ typedef enum {
|
|
|
37
37
|
* Hostkey information taken from libssh2
|
|
38
38
|
*/
|
|
39
39
|
typedef struct {
|
|
40
|
+
git_cert parent;
|
|
41
|
+
|
|
40
42
|
/**
|
|
41
|
-
*
|
|
42
|
-
* `
|
|
43
|
+
* A hostkey type from libssh2, either
|
|
44
|
+
* `GIT_CERT_SSH_MD5` or `GIT_CERT_SSH_SHA1`
|
|
43
45
|
*/
|
|
44
|
-
git_cert_t cert_type;
|
|
45
|
-
/**
|
|
46
|
-
* A hostkey type from libssh2, either
|
|
47
|
-
* `GIT_CERT_SSH_MD5` or `GIT_CERT_SSH_SHA1`
|
|
48
|
-
*/
|
|
49
46
|
git_cert_ssh_t type;
|
|
50
47
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Hostkey hash. If type has `GIT_CERT_SSH_MD5` set, this will
|
|
50
|
+
* have the MD5 hash of the hostkey.
|
|
51
|
+
*/
|
|
55
52
|
unsigned char hash_md5[16];
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Hostkey hash. If type has `GIT_CERT_SSH_SHA1` set, this will
|
|
56
|
+
* have the SHA-1 hash of the hostkey.
|
|
57
|
+
*/
|
|
58
|
+
unsigned char hash_sha1[20];
|
|
62
59
|
} git_cert_hostkey;
|
|
63
60
|
|
|
64
61
|
/**
|
|
65
62
|
* X.509 certificate information
|
|
66
63
|
*/
|
|
67
64
|
typedef struct {
|
|
68
|
-
|
|
69
|
-
* Type of certificate. Here to share the header with
|
|
70
|
-
* `git_cert`.
|
|
71
|
-
*/
|
|
72
|
-
git_cert_t cert_type;
|
|
65
|
+
git_cert parent;
|
|
73
66
|
/**
|
|
74
67
|
* Pointer to the X.509 certificate data
|
|
75
68
|
*/
|
|
@@ -304,21 +304,16 @@ static void blame_chunk(
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
static int my_emit(
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
xdemitconf_t const *xecfg)
|
|
307
|
+
long start_a, long count_a,
|
|
308
|
+
long start_b, long count_b,
|
|
309
|
+
void *cb_data)
|
|
311
310
|
{
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
d->plno = xch->i1 + xch->chg1;
|
|
319
|
-
d->tlno = xch->i2 + xch->chg2;
|
|
320
|
-
xch = xch->next;
|
|
321
|
-
}
|
|
311
|
+
blame_chunk_cb_data *d = (blame_chunk_cb_data *)cb_data;
|
|
312
|
+
|
|
313
|
+
blame_chunk(d->blame, d->tlno, d->plno, start_b, d->target, d->parent);
|
|
314
|
+
d->plno = start_a + count_a;
|
|
315
|
+
d->tlno = start_b + count_b;
|
|
316
|
+
|
|
322
317
|
return 0;
|
|
323
318
|
}
|
|
324
319
|
|
|
@@ -352,7 +347,7 @@ static int diff_hunks(mmfile_t file_a, mmfile_t file_b, void *cb_data)
|
|
|
352
347
|
xdemitconf_t xecfg = {0};
|
|
353
348
|
xdemitcb_t ecb = {0};
|
|
354
349
|
|
|
355
|
-
xecfg.
|
|
350
|
+
xecfg.hunk_func = my_emit;
|
|
356
351
|
ecb.priv = cb_data;
|
|
357
352
|
|
|
358
353
|
trim_common_tail(&file_a, &file_b, 0);
|
data/vendor/libgit2/src/blob.c
CHANGED
|
@@ -185,6 +185,12 @@ int git_blob__create_from_paths(
|
|
|
185
185
|
(error = git_repository_odb(&odb, repo)) < 0)
|
|
186
186
|
goto done;
|
|
187
187
|
|
|
188
|
+
if (S_ISDIR(st.st_mode)) {
|
|
189
|
+
giterr_set(GITERR_ODB, "cannot create blob from '%s'; it is a directory", content_path);
|
|
190
|
+
error = GIT_EDIRECTORY;
|
|
191
|
+
goto done;
|
|
192
|
+
}
|
|
193
|
+
|
|
188
194
|
if (out_st)
|
|
189
195
|
memcpy(out_st, &st, sizeof(st));
|
|
190
196
|
|
data/vendor/libgit2/src/branch.c
CHANGED
|
@@ -155,18 +155,7 @@ int git_branch_delete(git_reference *branch)
|
|
|
155
155
|
git_reference_owner(branch), git_buf_cstr(&config_section), NULL) < 0)
|
|
156
156
|
goto on_error;
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
goto on_error;
|
|
160
|
-
|
|
161
|
-
if ((error = git_reflog_delete(git_reference_owner(branch), git_reference_name(branch))) < 0) {
|
|
162
|
-
if (error == GIT_ENOTFOUND) {
|
|
163
|
-
giterr_clear();
|
|
164
|
-
error = 0;
|
|
165
|
-
}
|
|
166
|
-
goto on_error;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
error = 0;
|
|
158
|
+
error = git_reference_delete(branch);
|
|
170
159
|
|
|
171
160
|
on_error:
|
|
172
161
|
git_buf_free(&config_section);
|
data/vendor/libgit2/src/cache.c
CHANGED
|
@@ -50,16 +50,16 @@ void git_cache_dump_stats(git_cache *cache)
|
|
|
50
50
|
if (kh_size(cache->map) == 0)
|
|
51
51
|
return;
|
|
52
52
|
|
|
53
|
-
printf("Cache %p: %d items cached, %
|
|
54
|
-
cache, kh_size(cache->map),
|
|
53
|
+
printf("Cache %p: %d items cached, %"PRIdZ" bytes\n",
|
|
54
|
+
cache, kh_size(cache->map), cache->used_memory);
|
|
55
55
|
|
|
56
56
|
kh_foreach_value(cache->map, object, {
|
|
57
57
|
char oid_str[9];
|
|
58
|
-
printf(" %s%c %s (%
|
|
58
|
+
printf(" %s%c %s (%"PRIuZ")\n",
|
|
59
59
|
git_object_type2string(object->type),
|
|
60
60
|
object->flags == GIT_CACHE_STORE_PARSED ? '*' : ' ',
|
|
61
61
|
git_oid_tostr(oid_str, sizeof(oid_str), &object->oid),
|
|
62
|
-
|
|
62
|
+
object->size
|
|
63
63
|
);
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -1299,8 +1299,8 @@ static int checkout_get_actions(
|
|
|
1299
1299
|
if (counts[CHECKOUT_ACTION__CONFLICT] > 0 &&
|
|
1300
1300
|
(data->strategy & GIT_CHECKOUT_ALLOW_CONFLICTS) == 0)
|
|
1301
1301
|
{
|
|
1302
|
-
giterr_set(GITERR_CHECKOUT, "%
|
|
1303
|
-
|
|
1302
|
+
giterr_set(GITERR_CHECKOUT, "%"PRIuZ" %s checkout",
|
|
1303
|
+
counts[CHECKOUT_ACTION__CONFLICT],
|
|
1304
1304
|
counts[CHECKOUT_ACTION__CONFLICT] == 1 ?
|
|
1305
1305
|
"conflict prevents" : "conflicts prevent");
|
|
1306
1306
|
error = GIT_ECONFLICT;
|
data/vendor/libgit2/src/clone.c
CHANGED
|
@@ -440,14 +440,14 @@ int git_clone(
|
|
|
440
440
|
|
|
441
441
|
if (error != 0) {
|
|
442
442
|
git_error_state last_error = {0};
|
|
443
|
-
|
|
443
|
+
giterr_state_capture(&last_error, error);
|
|
444
444
|
|
|
445
445
|
git_repository_free(repo);
|
|
446
446
|
repo = NULL;
|
|
447
447
|
|
|
448
448
|
(void)git_futils_rmdir_r(local_path, NULL, rmdir_flags);
|
|
449
449
|
|
|
450
|
-
|
|
450
|
+
giterr_state_restore(&last_error);
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
*out = repo;
|