rugged 0.22.0b4 → 0.22.0b5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rugged/rugged.c +8 -7
- data/ext/rugged/rugged_note.c +1 -1
- data/ext/rugged/rugged_remote.c +0 -5
- data/ext/rugged/rugged_tree.c +23 -25
- data/lib/rugged/version.rb +1 -1
- data/vendor/libgit2/include/git2/blame.h +0 -1
- data/vendor/libgit2/include/git2/branch.h +1 -1
- data/vendor/libgit2/include/git2/buffer.h +1 -1
- data/vendor/libgit2/include/git2/cherrypick.h +5 -2
- data/vendor/libgit2/include/git2/clone.h +0 -1
- data/vendor/libgit2/include/git2/common.h +6 -1
- data/vendor/libgit2/include/git2/config.h +13 -4
- data/vendor/libgit2/include/git2/filter.h +3 -0
- data/vendor/libgit2/include/git2/global.h +10 -4
- data/vendor/libgit2/include/git2/index.h +3 -0
- data/vendor/libgit2/include/git2/merge.h +20 -5
- data/vendor/libgit2/include/git2/net.h +3 -2
- data/vendor/libgit2/include/git2/notes.h +5 -7
- data/vendor/libgit2/include/git2/push.h +7 -14
- data/vendor/libgit2/include/git2/rebase.h +14 -1
- data/vendor/libgit2/include/git2/refs.h +7 -1
- data/vendor/libgit2/include/git2/remote.h +6 -1
- data/vendor/libgit2/include/git2/repository.h +6 -0
- data/vendor/libgit2/include/git2/revert.h +5 -2
- data/vendor/libgit2/include/git2/stash.h +15 -6
- data/vendor/libgit2/include/git2/submodule.h +1 -1
- data/vendor/libgit2/include/git2/sys/diff.h +5 -2
- data/vendor/libgit2/include/git2/sys/hashsig.h +3 -0
- data/vendor/libgit2/include/git2/sys/mempack.h +1 -1
- data/vendor/libgit2/include/git2/sys/stream.h +40 -0
- data/vendor/libgit2/include/git2/sys/transport.h +17 -4
- data/vendor/libgit2/include/git2/tree.h +3 -3
- data/vendor/libgit2/src/checkout.c +27 -1
- data/vendor/libgit2/src/commit_list.c +1 -1
- data/vendor/libgit2/src/common.h +1 -1
- data/vendor/libgit2/src/config_cache.c +2 -0
- data/vendor/libgit2/src/config_file.c +1 -1
- data/vendor/libgit2/src/describe.c +2 -2
- data/vendor/libgit2/src/global.c +31 -14
- data/vendor/libgit2/src/ignore.c +86 -3
- data/vendor/libgit2/src/index.c +48 -25
- data/vendor/libgit2/src/indexer.c +1 -0
- data/vendor/libgit2/src/netops.c +18 -474
- data/vendor/libgit2/src/netops.h +3 -8
- data/vendor/libgit2/src/notes.c +3 -3
- data/vendor/libgit2/src/odb.c +1 -0
- data/vendor/libgit2/src/odb_loose.c +1 -1
- data/vendor/libgit2/src/openssl_stream.c +375 -0
- data/vendor/libgit2/src/openssl_stream.h +14 -0
- data/vendor/libgit2/src/path.c +256 -0
- data/vendor/libgit2/src/path.h +44 -1
- data/vendor/libgit2/src/pool.c +1 -1
- data/vendor/libgit2/src/push.c +5 -5
- data/vendor/libgit2/src/rebase.c +2 -2
- data/vendor/libgit2/src/refdb_fs.c +11 -1
- data/vendor/libgit2/src/remote.c +2 -7
- data/vendor/libgit2/src/repository.c +25 -0
- data/vendor/libgit2/src/repository.h +26 -2
- data/vendor/libgit2/src/socket_stream.c +212 -0
- data/vendor/libgit2/src/socket_stream.h +21 -0
- data/vendor/libgit2/src/stream.h +48 -0
- data/vendor/libgit2/src/tag.c +1 -1
- data/vendor/libgit2/src/transports/git.c +71 -57
- data/vendor/libgit2/src/transports/http.c +40 -62
- data/vendor/libgit2/src/transports/local.c +6 -11
- data/vendor/libgit2/src/transports/smart.c +3 -3
- data/vendor/libgit2/src/transports/ssh.c +12 -8
- data/vendor/libgit2/src/transports/winhttp.c +68 -47
- data/vendor/libgit2/src/tree.c +16 -14
- data/vendor/libgit2/src/tree.h +1 -0
- data/vendor/libgit2/src/util.c +91 -0
- data/vendor/libgit2/src/util.h +12 -0
- data/vendor/libgit2/src/win32/findfile.c +1 -0
- data/vendor/libgit2/src/win32/path_w32.c +305 -0
- data/vendor/libgit2/src/win32/path_w32.h +80 -0
- data/vendor/libgit2/src/win32/posix.h +1 -0
- data/vendor/libgit2/src/win32/posix_w32.c +25 -42
- data/vendor/libgit2/src/win32/utf-conv.c +36 -6
- data/vendor/libgit2/src/win32/utf-conv.h +0 -39
- data/vendor/libgit2/src/win32/w32_util.h +1 -0
- data/vendor/libgit2/src/xdiff/xdiffi.c +1 -1
- data/vendor/libgit2/src/xdiff/xhistogram.c +1 -1
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 096ce237a96fe39032ff6e26839007148fb90ea8
|
4
|
+
data.tar.gz: 4a8b6154d4ef9c9be73f6c473d8edcd7eede1747
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 340fe46665f934cb4925d9ac63153107e322f06335753c753f09314515658ae8fd50d127084afc22904d9ee6730e9f933b27a9e8043fc8fc7df484ac722cc553
|
7
|
+
data.tar.gz: ce7e75586a31232cda3b5a61c7742ba9a1d5f82b6f9fad14d6da8d346f73e44505195ee8a5d50a444ec04218f25701665133fe0a31b67ec378e5ca877dc2cdbe
|
data/ext/rugged/rugged.c
CHANGED
@@ -310,12 +310,12 @@ void rugged_exception_raise(void)
|
|
310
310
|
|
311
311
|
error = giterr_last();
|
312
312
|
|
313
|
-
if (error && error->klass
|
313
|
+
if (error && error->klass > 0 && error->klass < RUGGED_ERROR_COUNT) {
|
314
314
|
err_klass = rb_eRuggedErrors[error->klass];
|
315
315
|
err_message = error->message;
|
316
316
|
} else {
|
317
|
-
err_klass =
|
318
|
-
err_message = "
|
317
|
+
err_klass = rb_eRuntimeError;
|
318
|
+
err_message = "Rugged operation failed";
|
319
319
|
}
|
320
320
|
|
321
321
|
err_obj = rb_exc_new2(err_klass, err_message);
|
@@ -409,11 +409,12 @@ void Init_rugged(void)
|
|
409
409
|
|
410
410
|
rb_eRuggedError = rb_define_class_under(rb_mRugged, "Error", rb_eStandardError);
|
411
411
|
|
412
|
-
rb_eRuggedErrors[0] =
|
413
|
-
rb_eRuggedErrors[1] = rb_define_class_under(rb_mRugged, RUGGED_ERROR_NAMES[1],
|
414
|
-
rb_eRuggedErrors[2] = rb_define_class_under(rb_mRugged, RUGGED_ERROR_NAMES[2],
|
412
|
+
rb_eRuggedErrors[0] = Qnil; /* 0 return value -- no exception */
|
413
|
+
rb_eRuggedErrors[1] = rb_define_class_under(rb_mRugged, RUGGED_ERROR_NAMES[1], rb_eNoMemError);
|
414
|
+
rb_eRuggedErrors[2] = rb_define_class_under(rb_mRugged, RUGGED_ERROR_NAMES[2], rb_eIOError);
|
415
|
+
rb_eRuggedErrors[3] = rb_define_class_under(rb_mRugged, RUGGED_ERROR_NAMES[3], rb_eArgError);
|
415
416
|
|
416
|
-
for (i =
|
417
|
+
for (i = 4; i < RUGGED_ERROR_COUNT; ++i) {
|
417
418
|
rb_eRuggedErrors[i] = rb_define_class_under(rb_mRugged, RUGGED_ERROR_NAMES[i], rb_eRuggedError);
|
418
419
|
}
|
419
420
|
}
|
data/ext/rugged/rugged_note.c
CHANGED
data/ext/rugged/rugged_remote.c
CHANGED
@@ -803,11 +803,6 @@ static VALUE rb_git_remote_push(int argc, VALUE *argv, VALUE self)
|
|
803
803
|
if ((error = git_push_finish(push)))
|
804
804
|
goto cleanup;
|
805
805
|
|
806
|
-
if (!git_push_unpack_ok(push)) {
|
807
|
-
rb_exception = rb_exc_new2(rb_eRuggedError, "the remote side did not unpack successfully");
|
808
|
-
goto cleanup;
|
809
|
-
}
|
810
|
-
|
811
806
|
if ((error = git_push_status_foreach(push, &push_status_cb, (void *)rb_result)) ||
|
812
807
|
(error = git_push_update_tips(push, signature, log_message)))
|
813
808
|
goto cleanup;
|
data/ext/rugged/rugged_tree.c
CHANGED
@@ -629,40 +629,42 @@ static void rb_git_treebuilder_free(git_treebuilder *bld)
|
|
629
629
|
git_treebuilder_free(bld);
|
630
630
|
}
|
631
631
|
|
632
|
-
static VALUE rb_git_treebuilder_allocate(VALUE klass)
|
633
|
-
{
|
634
|
-
return Data_Wrap_Struct(klass, NULL, &rb_git_treebuilder_free, NULL);
|
635
|
-
}
|
636
|
-
|
637
632
|
/*
|
638
633
|
* call-seq:
|
639
|
-
* TreeBuilder.new([tree])
|
634
|
+
* TreeBuilder.new(repository, [tree])
|
640
635
|
*
|
641
|
-
* Create a new Rugged::Trebuilder instance
|
636
|
+
* Create a new Rugged::Trebuilder instance to write a tree to
|
637
|
+
* the given +repository+.
|
642
638
|
*
|
643
639
|
* If an optional +tree+ is given, the returned TreeBuilder will be
|
644
640
|
* initialized with the entry of +tree+. Otherwise, the TreeBuilder
|
645
641
|
* will be empty and has to be filled manually.
|
646
642
|
*/
|
647
|
-
static VALUE
|
643
|
+
static VALUE rb_git_treebuilder_new(int argc, VALUE *argv, VALUE klass)
|
648
644
|
{
|
649
645
|
git_treebuilder *builder;
|
646
|
+
git_repository *repo;
|
650
647
|
git_tree *tree = NULL;
|
651
|
-
VALUE rb_object;
|
648
|
+
VALUE rb_object, rb_builder, rb_repo;
|
652
649
|
int error;
|
653
650
|
|
654
|
-
if (rb_scan_args(argc, argv, "
|
651
|
+
if (rb_scan_args(argc, argv, "11", &rb_repo, &rb_object) == 2) {
|
655
652
|
if (!rb_obj_is_kind_of(rb_object, rb_cRuggedTree))
|
656
653
|
rb_raise(rb_eTypeError, "A Rugged::Tree instance is required");
|
657
654
|
|
658
655
|
Data_Get_Struct(rb_object, git_tree, tree);
|
659
656
|
}
|
660
657
|
|
661
|
-
|
658
|
+
rugged_check_repo(rb_repo);
|
659
|
+
Data_Get_Struct(rb_repo, git_repository, repo);
|
660
|
+
|
661
|
+
error = git_treebuilder_create(&builder, repo, tree);
|
662
662
|
rugged_exception_check(error);
|
663
663
|
|
664
|
-
|
665
|
-
|
664
|
+
rb_builder = Data_Wrap_Struct(klass, NULL, &rb_git_treebuilder_free, builder);
|
665
|
+
rugged_set_owner(rb_builder, rb_repo);
|
666
|
+
|
667
|
+
return rb_builder;
|
666
668
|
}
|
667
669
|
|
668
670
|
/*
|
@@ -759,24 +761,21 @@ static VALUE rb_git_treebuilder_remove(VALUE self, VALUE path)
|
|
759
761
|
|
760
762
|
/*
|
761
763
|
* call-seq:
|
762
|
-
* builder.write
|
764
|
+
* builder.write -> oid
|
763
765
|
*
|
764
|
-
* Write +builder+'s content as a tree to the
|
765
|
-
* and return the +oid+ for the
|
766
|
+
* Write +builder+'s content as a tree to the repository
|
767
|
+
* that owns the builder and return the +oid+ for the
|
768
|
+
* newly created tree.
|
766
769
|
*/
|
767
|
-
static VALUE rb_git_treebuilder_write(VALUE self
|
770
|
+
static VALUE rb_git_treebuilder_write(VALUE self)
|
768
771
|
{
|
769
772
|
git_treebuilder *builder;
|
770
|
-
git_repository *repo;
|
771
773
|
git_oid written_id;
|
772
774
|
int error;
|
773
775
|
|
774
|
-
rugged_check_repo(rb_repo);
|
775
|
-
Data_Get_Struct(rb_repo, git_repository, repo);
|
776
|
-
|
777
776
|
Data_Get_Struct(self, git_treebuilder, builder);
|
778
777
|
|
779
|
-
error = git_treebuilder_write(&written_id,
|
778
|
+
error = git_treebuilder_write(&written_id, builder);
|
780
779
|
rugged_exception_check(error);
|
781
780
|
|
782
781
|
return rugged_create_oid(&written_id);
|
@@ -827,13 +826,12 @@ void Init_rugged_tree(void)
|
|
827
826
|
rb_define_singleton_method(rb_cRuggedTree, "diff", rb_git_tree_diff_, -1);
|
828
827
|
|
829
828
|
rb_cRuggedTreeBuilder = rb_define_class_under(rb_cRuggedTree, "Builder", rb_cObject);
|
830
|
-
|
831
|
-
rb_define_method(rb_cRuggedTreeBuilder, "initialize", rb_git_treebuilder_init, -1);
|
829
|
+
rb_define_singleton_method(rb_cRuggedTreeBuilder, "new", rb_git_treebuilder_new, -1);
|
832
830
|
rb_define_method(rb_cRuggedTreeBuilder, "clear", rb_git_treebuilder_clear, 0);
|
833
831
|
rb_define_method(rb_cRuggedTreeBuilder, "[]", rb_git_treebuilder_get, 1);
|
834
832
|
rb_define_method(rb_cRuggedTreeBuilder, "insert", rb_git_treebuilder_insert, 1);
|
835
833
|
rb_define_method(rb_cRuggedTreeBuilder, "<<", rb_git_treebuilder_insert, 1);
|
836
834
|
rb_define_method(rb_cRuggedTreeBuilder, "remove", rb_git_treebuilder_remove, 1);
|
837
|
-
rb_define_method(rb_cRuggedTreeBuilder, "write", rb_git_treebuilder_write,
|
835
|
+
rb_define_method(rb_cRuggedTreeBuilder, "write", rb_git_treebuilder_write, 0);
|
838
836
|
rb_define_method(rb_cRuggedTreeBuilder, "reject!", rb_git_treebuilder_filter, 0);
|
839
837
|
}
|
data/lib/rugged/version.rb
CHANGED
@@ -244,7 +244,7 @@ GIT_EXTERN(int) git_branch_is_head(
|
|
244
244
|
/**
|
245
245
|
* Return the name of remote that the remote tracking branch belongs to.
|
246
246
|
*
|
247
|
-
* @param out Pointer to the user-allocated git_buf which will be filled
|
247
|
+
* @param out Pointer to the user-allocated git_buf which will be filled with the name of the remote.
|
248
248
|
*
|
249
249
|
* @param repo The repository where the branch lives.
|
250
250
|
*
|
@@ -74,7 +74,7 @@ GIT_EXTERN(void) git_buf_free(git_buf *buffer);
|
|
74
74
|
/**
|
75
75
|
* Resize the buffer allocation to make more space.
|
76
76
|
*
|
77
|
-
* This will attempt to grow the buffer to
|
77
|
+
* This will attempt to grow the buffer to accommodate the target size.
|
78
78
|
*
|
79
79
|
* If the buffer refers to memory that was not allocated by libgit2 (i.e.
|
80
80
|
* the `asize` field is zero), then `ptr` will be replaced with a newly
|
@@ -20,14 +20,17 @@
|
|
20
20
|
*/
|
21
21
|
GIT_BEGIN_DECL
|
22
22
|
|
23
|
+
/**
|
24
|
+
* Cherry-pick options
|
25
|
+
*/
|
23
26
|
typedef struct {
|
24
27
|
unsigned int version;
|
25
28
|
|
26
29
|
/** For merge commits, the "mainline" is treated as the parent. */
|
27
30
|
unsigned int mainline;
|
28
31
|
|
29
|
-
git_merge_options merge_opts;
|
30
|
-
git_checkout_options checkout_opts;
|
32
|
+
git_merge_options merge_opts; /*< Options for the merging */
|
33
|
+
git_checkout_options checkout_opts; /*< Options for the checkout */
|
31
34
|
} git_cherrypick_options;
|
32
35
|
|
33
36
|
#define GIT_CHERRYPICK_OPTIONS_VERSION 1
|
@@ -123,7 +123,12 @@ typedef enum {
|
|
123
123
|
*/
|
124
124
|
GIT_EXTERN(int) git_libgit2_features(void);
|
125
125
|
|
126
|
-
|
126
|
+
/**
|
127
|
+
* Global library options
|
128
|
+
*
|
129
|
+
* These are used to select which global option to set or get and are
|
130
|
+
* used in `git_libgit2_opts()`.
|
131
|
+
*/
|
127
132
|
typedef enum {
|
128
133
|
GIT_OPT_GET_MWINDOW_SIZE,
|
129
134
|
GIT_OPT_SET_MWINDOW_SIZE,
|
@@ -55,15 +55,21 @@ typedef enum {
|
|
55
55
|
GIT_CONFIG_HIGHEST_LEVEL = -1,
|
56
56
|
} git_config_level_t;
|
57
57
|
|
58
|
+
/**
|
59
|
+
* An entry in a configuration file
|
60
|
+
*/
|
58
61
|
typedef struct {
|
59
|
-
const char *name;
|
60
|
-
const char *value;
|
61
|
-
git_config_level_t level;
|
62
|
+
const char *name; /*< Name of the entry (normalised) */
|
63
|
+
const char *value; /*< String value of the entry */
|
64
|
+
git_config_level_t level; /*< Which config file this was found in */
|
62
65
|
} git_config_entry;
|
63
66
|
|
64
67
|
typedef int (*git_config_foreach_cb)(const git_config_entry *, void *);
|
65
68
|
typedef struct git_config_iterator git_config_iterator;
|
66
69
|
|
70
|
+
/**
|
71
|
+
* Config var type
|
72
|
+
*/
|
67
73
|
typedef enum {
|
68
74
|
GIT_CVAR_FALSE = 0,
|
69
75
|
GIT_CVAR_TRUE = 1,
|
@@ -71,6 +77,9 @@ typedef enum {
|
|
71
77
|
GIT_CVAR_STRING
|
72
78
|
} git_cvar_t;
|
73
79
|
|
80
|
+
/**
|
81
|
+
* Mapping from config variables to values.
|
82
|
+
*/
|
74
83
|
typedef struct {
|
75
84
|
git_cvar_t cvar_type;
|
76
85
|
const char *str_match;
|
@@ -270,7 +279,7 @@ GIT_EXTERN(int) git_config_get_entry(
|
|
270
279
|
*
|
271
280
|
* All config files will be looked into, in the order of their
|
272
281
|
* defined level. A higher level means a higher priority. The
|
273
|
-
* first
|
282
|
+
* first occurrence of the variable will be returned here.
|
274
283
|
*
|
275
284
|
* @param out pointer to the variable where the value should be stored
|
276
285
|
* @param cfg where to look for the variable
|
@@ -17,9 +17,11 @@ GIT_BEGIN_DECL
|
|
17
17
|
* This function must the called before any other libgit2 function in
|
18
18
|
* order to set up global state and threading.
|
19
19
|
*
|
20
|
-
* This function may be called multiple times
|
20
|
+
* This function may be called multiple times - it will return the number
|
21
|
+
* of times the initialization has been called (including this one) that have
|
22
|
+
* not subsequently been shutdown.
|
21
23
|
*
|
22
|
-
* @return
|
24
|
+
* @return the number of initializations of the library, or an error code.
|
23
25
|
*/
|
24
26
|
GIT_EXTERN(int) git_libgit2_init(void);
|
25
27
|
|
@@ -27,10 +29,14 @@ GIT_EXTERN(int) git_libgit2_init(void);
|
|
27
29
|
* Shutdown the global state
|
28
30
|
*
|
29
31
|
* Clean up the global state and threading context after calling it as
|
30
|
-
* many times as `git_libgit2_init()` was called
|
32
|
+
* many times as `git_libgit2_init()` was called - it will return the
|
33
|
+
* number of remainining initializations that have not been shutdown
|
34
|
+
* (after this one).
|
31
35
|
*
|
36
|
+
* @return the number of remaining initializations of the library, or an
|
37
|
+
* error code.
|
32
38
|
*/
|
33
|
-
GIT_EXTERN(
|
39
|
+
GIT_EXTERN(int) git_libgit2_shutdown(void);
|
34
40
|
|
35
41
|
/** @} */
|
36
42
|
GIT_END_DECL
|
@@ -110,20 +110,26 @@ typedef enum {
|
|
110
110
|
GIT_MERGE_FILE_FAVOR_UNION = 3,
|
111
111
|
} git_merge_file_favor_t;
|
112
112
|
|
113
|
+
/**
|
114
|
+
* File merging flags
|
115
|
+
*/
|
113
116
|
typedef enum {
|
114
|
-
|
117
|
+
/** Defaults */
|
115
118
|
GIT_MERGE_FILE_DEFAULT = 0,
|
116
119
|
|
117
|
-
|
120
|
+
/** Create standard conflicted merge files */
|
118
121
|
GIT_MERGE_FILE_STYLE_MERGE = (1 << 0),
|
119
122
|
|
120
|
-
|
123
|
+
/** Create diff3-style files */
|
121
124
|
GIT_MERGE_FILE_STYLE_DIFF3 = (1 << 1),
|
122
125
|
|
123
|
-
|
126
|
+
/** Condense non-alphanumeric regions for simplified diff file */
|
124
127
|
GIT_MERGE_FILE_SIMPLIFY_ALNUM = (1 << 2),
|
125
128
|
} git_merge_file_flags_t;
|
126
129
|
|
130
|
+
/**
|
131
|
+
* Options for merging a file
|
132
|
+
*/
|
127
133
|
typedef struct {
|
128
134
|
unsigned int version;
|
129
135
|
|
@@ -168,6 +174,9 @@ GIT_EXTERN(int) git_merge_file_init_options(
|
|
168
174
|
git_merge_file_options *opts,
|
169
175
|
unsigned int version);
|
170
176
|
|
177
|
+
/**
|
178
|
+
* Information about file-level merging
|
179
|
+
*/
|
171
180
|
typedef struct {
|
172
181
|
/**
|
173
182
|
* True if the output was automerged, false if the output contains
|
@@ -191,6 +200,9 @@ typedef struct {
|
|
191
200
|
size_t len;
|
192
201
|
} git_merge_file_result;
|
193
202
|
|
203
|
+
/**
|
204
|
+
* Merging options
|
205
|
+
*/
|
194
206
|
typedef struct {
|
195
207
|
unsigned int version;
|
196
208
|
git_merge_tree_flag_t flags;
|
@@ -270,8 +282,11 @@ typedef enum {
|
|
270
282
|
GIT_MERGE_ANALYSIS_UNBORN = (1 << 3),
|
271
283
|
} git_merge_analysis_t;
|
272
284
|
|
285
|
+
/**
|
286
|
+
* The user's stated preference for merges.
|
287
|
+
*/
|
273
288
|
typedef enum {
|
274
|
-
|
289
|
+
/**
|
275
290
|
* No configuration was found that suggests a preferred behavior for
|
276
291
|
* merge.
|
277
292
|
*/
|
@@ -21,12 +21,13 @@ GIT_BEGIN_DECL
|
|
21
21
|
|
22
22
|
#define GIT_DEFAULT_PORT "9418"
|
23
23
|
|
24
|
-
|
24
|
+
/**
|
25
|
+
* Direction of the connection.
|
26
|
+
*
|
25
27
|
* We need this because we need to know whether we should call
|
26
28
|
* git-upload-pack or git-receive-pack on the remote end when get_refs
|
27
29
|
* gets called.
|
28
30
|
*/
|
29
|
-
|
30
31
|
typedef enum {
|
31
32
|
GIT_DIRECTION_FETCH = 0,
|
32
33
|
GIT_DIRECTION_PUSH = 1
|
@@ -59,14 +59,12 @@ GIT_EXTERN(int) git_note_iterator_new(
|
|
59
59
|
GIT_EXTERN(void) git_note_iterator_free(git_note_iterator *it);
|
60
60
|
|
61
61
|
/**
|
62
|
-
*
|
62
|
+
* Return the current item (note_id and annotated_id) and advance the iterator
|
63
63
|
* internally to the next value
|
64
64
|
*
|
65
|
-
* The notes must not be freed manually by the user.
|
66
|
-
*
|
67
|
-
* @param it pointer to the iterator
|
68
65
|
* @param note_id id of blob containing the message
|
69
66
|
* @param annotated_id id of the git object being annotated
|
67
|
+
* @param it pointer to the iterator
|
70
68
|
*
|
71
69
|
* @return 0 (no error), GIT_ITEROVER (iteration is done) or an error code
|
72
70
|
* (negative value)
|
@@ -135,10 +133,10 @@ GIT_EXTERN(const git_oid *) git_note_id(const git_note *note);
|
|
135
133
|
*
|
136
134
|
* @param out pointer to store the OID (optional); NULL in case of error
|
137
135
|
* @param repo repository where to store the note
|
138
|
-
* @param author signature of the notes commit author
|
139
|
-
* @param committer signature of the notes commit committer
|
140
136
|
* @param notes_ref canonical name of the reference to use (optional);
|
141
137
|
* defaults to "refs/notes/commits"
|
138
|
+
* @param author signature of the notes commit author
|
139
|
+
* @param committer signature of the notes commit committer
|
142
140
|
* @param oid OID of the git object to decorate
|
143
141
|
* @param note Content of the note to add for object oid
|
144
142
|
* @param force Overwrite existing note
|
@@ -148,9 +146,9 @@ GIT_EXTERN(const git_oid *) git_note_id(const git_note *note);
|
|
148
146
|
GIT_EXTERN(int) git_note_create(
|
149
147
|
git_oid *out,
|
150
148
|
git_repository *repo,
|
149
|
+
const char *notes_ref,
|
151
150
|
const git_signature *author,
|
152
151
|
const git_signature *committer,
|
153
|
-
const char *notes_ref,
|
154
152
|
const git_oid *oid,
|
155
153
|
const char *note,
|
156
154
|
int force);
|