rugged 0.22.0b4 → 0.22.0b5

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.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/ext/rugged/rugged.c +8 -7
  3. data/ext/rugged/rugged_note.c +1 -1
  4. data/ext/rugged/rugged_remote.c +0 -5
  5. data/ext/rugged/rugged_tree.c +23 -25
  6. data/lib/rugged/version.rb +1 -1
  7. data/vendor/libgit2/include/git2/blame.h +0 -1
  8. data/vendor/libgit2/include/git2/branch.h +1 -1
  9. data/vendor/libgit2/include/git2/buffer.h +1 -1
  10. data/vendor/libgit2/include/git2/cherrypick.h +5 -2
  11. data/vendor/libgit2/include/git2/clone.h +0 -1
  12. data/vendor/libgit2/include/git2/common.h +6 -1
  13. data/vendor/libgit2/include/git2/config.h +13 -4
  14. data/vendor/libgit2/include/git2/filter.h +3 -0
  15. data/vendor/libgit2/include/git2/global.h +10 -4
  16. data/vendor/libgit2/include/git2/index.h +3 -0
  17. data/vendor/libgit2/include/git2/merge.h +20 -5
  18. data/vendor/libgit2/include/git2/net.h +3 -2
  19. data/vendor/libgit2/include/git2/notes.h +5 -7
  20. data/vendor/libgit2/include/git2/push.h +7 -14
  21. data/vendor/libgit2/include/git2/rebase.h +14 -1
  22. data/vendor/libgit2/include/git2/refs.h +7 -1
  23. data/vendor/libgit2/include/git2/remote.h +6 -1
  24. data/vendor/libgit2/include/git2/repository.h +6 -0
  25. data/vendor/libgit2/include/git2/revert.h +5 -2
  26. data/vendor/libgit2/include/git2/stash.h +15 -6
  27. data/vendor/libgit2/include/git2/submodule.h +1 -1
  28. data/vendor/libgit2/include/git2/sys/diff.h +5 -2
  29. data/vendor/libgit2/include/git2/sys/hashsig.h +3 -0
  30. data/vendor/libgit2/include/git2/sys/mempack.h +1 -1
  31. data/vendor/libgit2/include/git2/sys/stream.h +40 -0
  32. data/vendor/libgit2/include/git2/sys/transport.h +17 -4
  33. data/vendor/libgit2/include/git2/tree.h +3 -3
  34. data/vendor/libgit2/src/checkout.c +27 -1
  35. data/vendor/libgit2/src/commit_list.c +1 -1
  36. data/vendor/libgit2/src/common.h +1 -1
  37. data/vendor/libgit2/src/config_cache.c +2 -0
  38. data/vendor/libgit2/src/config_file.c +1 -1
  39. data/vendor/libgit2/src/describe.c +2 -2
  40. data/vendor/libgit2/src/global.c +31 -14
  41. data/vendor/libgit2/src/ignore.c +86 -3
  42. data/vendor/libgit2/src/index.c +48 -25
  43. data/vendor/libgit2/src/indexer.c +1 -0
  44. data/vendor/libgit2/src/netops.c +18 -474
  45. data/vendor/libgit2/src/netops.h +3 -8
  46. data/vendor/libgit2/src/notes.c +3 -3
  47. data/vendor/libgit2/src/odb.c +1 -0
  48. data/vendor/libgit2/src/odb_loose.c +1 -1
  49. data/vendor/libgit2/src/openssl_stream.c +375 -0
  50. data/vendor/libgit2/src/openssl_stream.h +14 -0
  51. data/vendor/libgit2/src/path.c +256 -0
  52. data/vendor/libgit2/src/path.h +44 -1
  53. data/vendor/libgit2/src/pool.c +1 -1
  54. data/vendor/libgit2/src/push.c +5 -5
  55. data/vendor/libgit2/src/rebase.c +2 -2
  56. data/vendor/libgit2/src/refdb_fs.c +11 -1
  57. data/vendor/libgit2/src/remote.c +2 -7
  58. data/vendor/libgit2/src/repository.c +25 -0
  59. data/vendor/libgit2/src/repository.h +26 -2
  60. data/vendor/libgit2/src/socket_stream.c +212 -0
  61. data/vendor/libgit2/src/socket_stream.h +21 -0
  62. data/vendor/libgit2/src/stream.h +48 -0
  63. data/vendor/libgit2/src/tag.c +1 -1
  64. data/vendor/libgit2/src/transports/git.c +71 -57
  65. data/vendor/libgit2/src/transports/http.c +40 -62
  66. data/vendor/libgit2/src/transports/local.c +6 -11
  67. data/vendor/libgit2/src/transports/smart.c +3 -3
  68. data/vendor/libgit2/src/transports/ssh.c +12 -8
  69. data/vendor/libgit2/src/transports/winhttp.c +68 -47
  70. data/vendor/libgit2/src/tree.c +16 -14
  71. data/vendor/libgit2/src/tree.h +1 -0
  72. data/vendor/libgit2/src/util.c +91 -0
  73. data/vendor/libgit2/src/util.h +12 -0
  74. data/vendor/libgit2/src/win32/findfile.c +1 -0
  75. data/vendor/libgit2/src/win32/path_w32.c +305 -0
  76. data/vendor/libgit2/src/win32/path_w32.h +80 -0
  77. data/vendor/libgit2/src/win32/posix.h +1 -0
  78. data/vendor/libgit2/src/win32/posix_w32.c +25 -42
  79. data/vendor/libgit2/src/win32/utf-conv.c +36 -6
  80. data/vendor/libgit2/src/win32/utf-conv.h +0 -39
  81. data/vendor/libgit2/src/win32/w32_util.h +1 -0
  82. data/vendor/libgit2/src/xdiff/xdiffi.c +1 -1
  83. data/vendor/libgit2/src/xdiff/xhistogram.c +1 -1
  84. metadata +10 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c23a53921543d1466bbda19c3f6008f8977d0767
4
- data.tar.gz: c955ad35377960f880ec4d23ea1a484705217fa0
3
+ metadata.gz: 096ce237a96fe39032ff6e26839007148fb90ea8
4
+ data.tar.gz: 4a8b6154d4ef9c9be73f6c473d8edcd7eede1747
5
5
  SHA512:
6
- metadata.gz: 33fbe1de4ca4dffebe7519d55b3214c604cf1c76537f5731d6c862cad864571f7620207eddb9b35e0a8e746254dadd389e1f0e586f1bd23b3314ed609700825f
7
- data.tar.gz: d4097230c3f632ac55cdd8de180dd4f18cc96a5d0761f72cbc4a4d5868062adfe30c7eb5d9c2a81aecd9b240f113a6229f9f76f237cc29d0d1d6a9ed23e5d4ce
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 >= 0 && error->klass < RUGGED_ERROR_COUNT) {
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 = rb_eRuggedErrors[2]; /* InvalidError */
318
- err_message = "Unknown Error";
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] = rb_define_class_under(rb_mRugged, RUGGED_ERROR_NAMES[0], rb_eNoMemError);
413
- rb_eRuggedErrors[1] = rb_define_class_under(rb_mRugged, RUGGED_ERROR_NAMES[1], rb_eIOError);
414
- rb_eRuggedErrors[2] = rb_define_class_under(rb_mRugged, RUGGED_ERROR_NAMES[2], rb_eArgError);
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 = 3; i < RUGGED_ERROR_COUNT; ++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
  }
@@ -171,9 +171,9 @@ static VALUE rb_git_note_create(VALUE self, VALUE rb_data)
171
171
  error = git_note_create(
172
172
  &note_oid,
173
173
  repo,
174
+ notes_ref,
174
175
  author,
175
176
  committer,
176
- notes_ref,
177
177
  git_object_id(target),
178
178
  StringValueCStr(rb_message),
179
179
  force);
@@ -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;
@@ -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 rb_git_treebuilder_init(int argc, VALUE *argv, VALUE self)
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, "01", &rb_object) == 1) {
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
- error = git_treebuilder_create(&builder, tree);
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
- DATA_PTR(self) = builder;
665
- return Qnil;
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(repo) -> oid
764
+ * builder.write -> oid
763
765
  *
764
- * Write +builder+'s content as a tree to the given +repo+
765
- * and return the +oid+ for the newly created tree.
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, VALUE rb_repo)
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, repo, builder);
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
- rb_define_alloc_func(rb_cRuggedTreeBuilder, rb_git_treebuilder_allocate);
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, 1);
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
  }
@@ -1,3 +1,3 @@
1
1
  module Rugged
2
- Version = VERSION = '0.22.0b4'
2
+ Version = VERSION = '0.22.0b5'
3
3
  end
@@ -67,7 +67,6 @@ typedef enum {
67
67
  * - `max_line` is the last line in the file to blame. The default is the last
68
68
  * line of the file.
69
69
  */
70
-
71
70
  typedef struct git_blame_options {
72
71
  unsigned int version;
73
72
 
@@ -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 iwth the name of the remote.
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 accomodate the target size.
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
@@ -100,7 +100,6 @@ typedef int (*git_repository_create_cb)(
100
100
  *
101
101
  * git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
102
102
  */
103
-
104
103
  typedef struct git_clone_options {
105
104
  unsigned int version;
106
105
 
@@ -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 occurence of the variable will be returned here.
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
@@ -35,6 +35,9 @@ typedef enum {
35
35
  GIT_FILTER_CLEAN = GIT_FILTER_TO_ODB,
36
36
  } git_filter_mode_t;
37
37
 
38
+ /**
39
+ * Filter option flags.
40
+ */
38
41
  typedef enum {
39
42
  GIT_FILTER_OPT_DEFAULT = 0u,
40
43
  GIT_FILTER_OPT_ALLOW_UNSAFE = (1u << 0),
@@ -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 0 or an error code
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(void) git_libgit2_shutdown(void);
39
+ GIT_EXTERN(int) git_libgit2_shutdown(void);
34
40
 
35
41
  /** @} */
36
42
  GIT_END_DECL
@@ -75,6 +75,9 @@ typedef struct git_index_entry {
75
75
  #define GIT_IDXENTRY_STAGEMASK (0x3000)
76
76
  #define GIT_IDXENTRY_STAGESHIFT 12
77
77
 
78
+ /**
79
+ * Flags for index entries
80
+ */
78
81
  typedef enum {
79
82
  GIT_IDXENTRY_EXTENDED = (0x4000),
80
83
  GIT_IDXENTRY_VALID = (0x8000),
@@ -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
- /* Defaults */
117
+ /** Defaults */
115
118
  GIT_MERGE_FILE_DEFAULT = 0,
116
119
 
117
- /* Create standard conflicted merge files */
120
+ /** Create standard conflicted merge files */
118
121
  GIT_MERGE_FILE_STYLE_MERGE = (1 << 0),
119
122
 
120
- /* Create diff3-style files */
123
+ /** Create diff3-style files */
121
124
  GIT_MERGE_FILE_STYLE_DIFF3 = (1 << 1),
122
125
 
123
- /* Condense non-alphanumeric regions for simplified diff file */
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
- * Returns the current item (note_id and annotated_id) and advance the iterator
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);