rugged 0.27.7 → 0.27.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rugged/version.rb +1 -1
  3. data/vendor/libgit2/CMakeLists.txt +6 -2
  4. data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.c.in +29 -0
  5. data/vendor/libgit2/cmake/Modules/CheckPrototypeDefinition.cmake +96 -0
  6. data/vendor/libgit2/cmake/Modules/FindIconv.cmake +11 -6
  7. data/vendor/libgit2/deps/http-parser/CMakeLists.txt +0 -2
  8. data/vendor/libgit2/include/git2.h +0 -1
  9. data/vendor/libgit2/include/git2/attr.h +7 -18
  10. data/vendor/libgit2/include/git2/blame.h +22 -39
  11. data/vendor/libgit2/include/git2/blob.h +1 -1
  12. data/vendor/libgit2/include/git2/branch.h +1 -1
  13. data/vendor/libgit2/include/git2/buffer.h +2 -14
  14. data/vendor/libgit2/include/git2/checkout.h +12 -13
  15. data/vendor/libgit2/include/git2/cherrypick.h +4 -6
  16. data/vendor/libgit2/include/git2/clone.h +6 -8
  17. data/vendor/libgit2/include/git2/commit.h +0 -28
  18. data/vendor/libgit2/include/git2/common.h +0 -27
  19. data/vendor/libgit2/include/git2/config.h +0 -1
  20. data/vendor/libgit2/include/git2/describe.h +7 -30
  21. data/vendor/libgit2/include/git2/diff.h +22 -32
  22. data/vendor/libgit2/include/git2/errors.h +0 -1
  23. data/vendor/libgit2/include/git2/ignore.h +2 -2
  24. data/vendor/libgit2/include/git2/merge.h +8 -10
  25. data/vendor/libgit2/include/git2/proxy.h +5 -9
  26. data/vendor/libgit2/include/git2/rebase.h +4 -7
  27. data/vendor/libgit2/include/git2/refs.h +1 -1
  28. data/vendor/libgit2/include/git2/refspec.h +0 -17
  29. data/vendor/libgit2/include/git2/remote.h +10 -12
  30. data/vendor/libgit2/include/git2/repository.h +5 -7
  31. data/vendor/libgit2/include/git2/revert.h +3 -5
  32. data/vendor/libgit2/include/git2/stash.h +8 -11
  33. data/vendor/libgit2/include/git2/status.h +3 -7
  34. data/vendor/libgit2/include/git2/submodule.h +7 -8
  35. data/vendor/libgit2/include/git2/sys/index.h +0 -3
  36. data/vendor/libgit2/include/git2/sys/mempack.h +35 -35
  37. data/vendor/libgit2/include/git2/sys/merge.h +1 -6
  38. data/vendor/libgit2/include/git2/transaction.h +0 -1
  39. data/vendor/libgit2/include/git2/types.h +5 -8
  40. data/vendor/libgit2/include/git2/version.h +2 -2
  41. data/vendor/libgit2/include/git2/worktree.h +11 -46
  42. data/vendor/libgit2/src/CMakeLists.txt +28 -91
  43. data/vendor/libgit2/src/annotated_commit.c +4 -4
  44. data/vendor/libgit2/src/apply.c +6 -5
  45. data/vendor/libgit2/src/attr.c +4 -4
  46. data/vendor/libgit2/src/attr_file.c +5 -5
  47. data/vendor/libgit2/src/attrcache.c +2 -2
  48. data/vendor/libgit2/src/blame.c +4 -11
  49. data/vendor/libgit2/src/blame.h +0 -1
  50. data/vendor/libgit2/src/blame_git.c +5 -8
  51. data/vendor/libgit2/src/blob.c +5 -5
  52. data/vendor/libgit2/src/branch.c +20 -20
  53. data/vendor/libgit2/src/buffer.c +4 -9
  54. data/vendor/libgit2/src/buffer.h +1 -1
  55. data/vendor/libgit2/src/checkout.c +24 -33
  56. data/vendor/libgit2/src/cherrypick.c +3 -3
  57. data/vendor/libgit2/src/clone.c +13 -13
  58. data/vendor/libgit2/src/commit.c +5 -18
  59. data/vendor/libgit2/src/commit_list.c +9 -3
  60. data/vendor/libgit2/src/common.h +1 -3
  61. data/vendor/libgit2/src/config.c +15 -6
  62. data/vendor/libgit2/src/config_file.c +249 -193
  63. data/vendor/libgit2/src/config_parse.c +66 -89
  64. data/vendor/libgit2/src/config_parse.h +2 -2
  65. data/vendor/libgit2/src/crlf.c +3 -9
  66. data/vendor/libgit2/src/diff.c +2 -2
  67. data/vendor/libgit2/src/diff_driver.c +3 -3
  68. data/vendor/libgit2/src/diff_file.c +3 -3
  69. data/vendor/libgit2/src/diff_generate.c +3 -4
  70. data/vendor/libgit2/src/diff_print.c +8 -8
  71. data/vendor/libgit2/src/diff_tform.c +4 -2
  72. data/vendor/libgit2/src/diff_xdiff.c +0 -12
  73. data/vendor/libgit2/src/features.h.in +0 -2
  74. data/vendor/libgit2/src/fetch.c +2 -2
  75. data/vendor/libgit2/src/fetchhead.c +5 -5
  76. data/vendor/libgit2/src/filebuf.c +4 -4
  77. data/vendor/libgit2/src/fileops.c +10 -10
  78. data/vendor/libgit2/src/filter.c +9 -3
  79. data/vendor/libgit2/src/global.c +12 -17
  80. data/vendor/libgit2/src/hash.h +0 -2
  81. data/vendor/libgit2/src/ignore.c +5 -5
  82. data/vendor/libgit2/src/index.c +40 -80
  83. data/vendor/libgit2/src/index.h +0 -10
  84. data/vendor/libgit2/src/indexer.c +9 -9
  85. data/vendor/libgit2/src/iterator.c +8 -8
  86. data/vendor/libgit2/src/khash.h +1 -3
  87. data/vendor/libgit2/src/merge.c +7 -7
  88. data/vendor/libgit2/src/netops.c +5 -5
  89. data/vendor/libgit2/src/notes.c +2 -2
  90. data/vendor/libgit2/src/odb.c +9 -9
  91. data/vendor/libgit2/src/odb_loose.c +22 -18
  92. data/vendor/libgit2/src/odb_pack.c +3 -3
  93. data/vendor/libgit2/src/pack-objects.c +3 -3
  94. data/vendor/libgit2/src/pack.c +5 -5
  95. data/vendor/libgit2/src/pack.h +1 -1
  96. data/vendor/libgit2/src/parse.c +7 -4
  97. data/vendor/libgit2/src/patch.c +1 -1
  98. data/vendor/libgit2/src/patch_generate.c +2 -2
  99. data/vendor/libgit2/src/patch_parse.c +4 -24
  100. data/vendor/libgit2/src/path.c +140 -39
  101. data/vendor/libgit2/src/path.h +84 -2
  102. data/vendor/libgit2/src/pathspec.c +1 -1
  103. data/vendor/libgit2/src/push.c +2 -2
  104. data/vendor/libgit2/src/rebase.c +23 -20
  105. data/vendor/libgit2/src/refdb_fs.c +34 -65
  106. data/vendor/libgit2/src/refs.c +16 -13
  107. data/vendor/libgit2/src/refspec.c +5 -30
  108. data/vendor/libgit2/src/refspec.h +1 -1
  109. data/vendor/libgit2/src/remote.c +43 -43
  110. data/vendor/libgit2/src/repository.c +56 -56
  111. data/vendor/libgit2/src/reset.c +1 -1
  112. data/vendor/libgit2/src/revert.c +3 -3
  113. data/vendor/libgit2/src/revparse.c +7 -6
  114. data/vendor/libgit2/src/revwalk.c +20 -48
  115. data/vendor/libgit2/src/revwalk.h +1 -2
  116. data/vendor/libgit2/src/settings.c +1 -25
  117. data/vendor/libgit2/src/signature.c +4 -2
  118. data/vendor/libgit2/src/stash.c +34 -80
  119. data/vendor/libgit2/src/status.c +1 -1
  120. data/vendor/libgit2/src/streams/curl.c +1 -1
  121. data/vendor/libgit2/src/streams/openssl.c +34 -132
  122. data/vendor/libgit2/src/streams/openssl.h +107 -0
  123. data/vendor/libgit2/src/streams/tls.c +0 -3
  124. data/vendor/libgit2/src/submodule.c +83 -118
  125. data/vendor/libgit2/src/sysdir.c +4 -4
  126. data/vendor/libgit2/src/tag.c +12 -12
  127. data/vendor/libgit2/src/trace.h +1 -1
  128. data/vendor/libgit2/src/trailer.c +6 -6
  129. data/vendor/libgit2/src/transport.c +2 -2
  130. data/vendor/libgit2/src/transports/auth.c +1 -1
  131. data/vendor/libgit2/src/transports/auth_negotiate.c +2 -2
  132. data/vendor/libgit2/src/transports/git.c +1 -1
  133. data/vendor/libgit2/src/transports/http.c +15 -12
  134. data/vendor/libgit2/src/transports/local.c +7 -7
  135. data/vendor/libgit2/src/transports/smart.c +15 -20
  136. data/vendor/libgit2/src/transports/smart.h +5 -5
  137. data/vendor/libgit2/src/transports/smart_pkt.c +131 -123
  138. data/vendor/libgit2/src/transports/smart_protocol.c +38 -48
  139. data/vendor/libgit2/src/transports/ssh.c +1 -1
  140. data/vendor/libgit2/src/transports/winhttp.c +26 -21
  141. data/vendor/libgit2/src/tree-cache.c +2 -2
  142. data/vendor/libgit2/src/tree.c +69 -23
  143. data/vendor/libgit2/src/tree.h +12 -0
  144. data/vendor/libgit2/src/util.c +99 -52
  145. data/vendor/libgit2/src/util.h +138 -14
  146. data/vendor/libgit2/src/vector.c +13 -8
  147. data/vendor/libgit2/src/win32/findfile.c +2 -2
  148. data/vendor/libgit2/src/win32/posix_w32.c +1 -1
  149. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.c +0 -94
  150. data/vendor/libgit2/src/win32/w32_crtdbg_stacktrace.h +75 -28
  151. data/vendor/libgit2/src/worktree.c +44 -65
  152. data/vendor/libgit2/src/worktree.h +0 -2
  153. data/vendor/libgit2/src/xdiff/xdiffi.c +1 -3
  154. metadata +5 -17
  155. data/vendor/libgit2/cmake/Modules/FindmbedTLS.cmake +0 -93
  156. data/vendor/libgit2/include/git2/mailmap.h +0 -115
  157. data/vendor/libgit2/include/git2/sys/alloc.h +0 -101
  158. data/vendor/libgit2/include/git2/sys/path.h +0 -55
  159. data/vendor/libgit2/src/alloc.c +0 -47
  160. data/vendor/libgit2/src/alloc.h +0 -40
  161. data/vendor/libgit2/src/hash/hash_mbedtls.c +0 -38
  162. data/vendor/libgit2/src/hash/hash_mbedtls.h +0 -20
  163. data/vendor/libgit2/src/mailmap.c +0 -485
  164. data/vendor/libgit2/src/mailmap.h +0 -35
  165. data/vendor/libgit2/src/stdalloc.c +0 -120
  166. data/vendor/libgit2/src/stdalloc.h +0 -17
  167. data/vendor/libgit2/src/streams/mbedtls.c +0 -463
  168. data/vendor/libgit2/src/streams/mbedtls.h +0 -20
@@ -37,13 +37,11 @@ typedef struct {
37
37
  #define GIT_CHERRYPICK_OPTIONS_INIT {GIT_CHERRYPICK_OPTIONS_VERSION, 0, GIT_MERGE_OPTIONS_INIT, GIT_CHECKOUT_OPTIONS_INIT}
38
38
 
39
39
  /**
40
- * Initialize git_cherrypick_options structure
40
+ * Initializes a `git_cherrypick_options` with default values. Equivalent to
41
+ * creating an instance with GIT_CHERRYPICK_OPTIONS_INIT.
41
42
  *
42
- * Initializes a `git_cherrypick_options` with default values. Equivalent to creating
43
- * an instance with GIT_CHERRYPICK_OPTIONS_INIT.
44
- *
45
- * @param opts The `git_cherrypick_options` struct to initialize.
46
- * @param version The struct version; pass `GIT_CHERRYPICK_OPTIONS_VERSION`.
43
+ * @param opts the `git_cherrypick_options` struct to initialize
44
+ * @param version Version of struct; pass `GIT_CHERRYPICK_OPTIONS_VERSION`
47
45
  * @return Zero on success; -1 on failure.
48
46
  */
49
47
  GIT_EXTERN(int) git_cherrypick_init_options(
@@ -96,9 +96,9 @@ typedef int (*git_repository_create_cb)(
96
96
  /**
97
97
  * Clone options structure
98
98
  *
99
- * Initialize with `GIT_CLONE_OPTIONS_INIT`. Alternatively, you can
100
- * use `git_clone_init_options`.
99
+ * Use the GIT_CLONE_OPTIONS_INIT to get the default settings, like this:
101
100
  *
101
+ * git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
102
102
  */
103
103
  typedef struct git_clone_options {
104
104
  unsigned int version;
@@ -169,13 +169,11 @@ typedef struct git_clone_options {
169
169
  GIT_FETCH_OPTIONS_INIT }
170
170
 
171
171
  /**
172
- * Initialize git_clone_options structure
172
+ * Initializes a `git_clone_options` with default values. Equivalent to
173
+ * creating an instance with GIT_CLONE_OPTIONS_INIT.
173
174
  *
174
- * Initializes a `git_clone_options` with default values. Equivalent to creating
175
- * an instance with GIT_CLONE_OPTIONS_INIT.
176
- *
177
- * @param opts The `git_clone_options` struct to initialize.
178
- * @param version The struct version; pass `GIT_CLONE_OPTIONS_VERSION`.
175
+ * @param opts The `git_clone_options` struct to initialize
176
+ * @param version Version of struct; pass `GIT_CLONE_OPTIONS_VERSION`
179
177
  * @return Zero on success; -1 on failure.
180
178
  */
181
179
  GIT_EXTERN(int) git_clone_init_options(
@@ -172,34 +172,6 @@ GIT_EXTERN(const git_signature *) git_commit_committer(const git_commit *commit)
172
172
  */
173
173
  GIT_EXTERN(const git_signature *) git_commit_author(const git_commit *commit);
174
174
 
175
- /**
176
- * Get the committer of a commit, using the mailmap to map names and email
177
- * addresses to canonical real names and email addresses.
178
- *
179
- * Call `git_signature_free` to free the signature.
180
- *
181
- * @param out a pointer to store the resolved signature.
182
- * @param commit a previously loaded commit.
183
- * @param mailmap the mailmap to resolve with. (may be NULL)
184
- * @return 0 or an error code
185
- */
186
- GIT_EXTERN(int) git_commit_committer_with_mailmap(
187
- git_signature **out, const git_commit *commit, const git_mailmap *mailmap);
188
-
189
- /**
190
- * Get the author of a commit, using the mailmap to map names and email
191
- * addresses to canonical real names and email addresses.
192
- *
193
- * Call `git_signature_free` to free the signature.
194
- *
195
- * @param out a pointer to store the resolved signature.
196
- * @param commit a previously loaded commit.
197
- * @param mailmap the mailmap to resolve with. (may be NULL)
198
- * @return 0 or an error code
199
- */
200
- GIT_EXTERN(int) git_commit_author_with_mailmap(
201
- git_signature **out, const git_commit *commit, const git_mailmap *mailmap);
202
-
203
175
  /**
204
176
  * Get the full raw text of the commit header.
205
177
  *
@@ -48,17 +48,6 @@ typedef size_t size_t;
48
48
  # define GIT_EXTERN(type) extern type
49
49
  #endif
50
50
 
51
- /** Declare a function as deprecated. */
52
- #if defined(__GNUC__)
53
- # define GIT_DEPRECATED(func) \
54
- __attribute__((deprecated)) \
55
- func
56
- #elif defined(_MSC_VER)
57
- # define GIT_DEPRECATED(func) __declspec(deprecated) func
58
- #else
59
- # define GIT_DEPRECATED(func) func
60
- #endif
61
-
62
51
  /** Declare a function's takes printf style arguments. */
63
52
  #ifdef __GNUC__
64
53
  # define GIT_FORMAT_PRINTF(a,b) __attribute__((format (printf, a, b)))
@@ -194,8 +183,6 @@ typedef enum {
194
183
  GIT_OPT_GET_WINDOWS_SHAREMODE,
195
184
  GIT_OPT_SET_WINDOWS_SHAREMODE,
196
185
  GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION,
197
- GIT_OPT_SET_ALLOCATOR,
198
- GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY
199
186
  } git_libgit2_opt_t;
200
187
 
201
188
  /**
@@ -358,20 +345,6 @@ typedef enum {
358
345
  * > additional checksum calculation on each object. This defaults
359
346
  * > to enabled.
360
347
  *
361
- * opts(GIT_OPT_SET_ALLOCATOR, git_allocator *allocator)
362
- *
363
- * > Set the memory allocator to a different memory allocator. This
364
- * > allocator will then be used to make all memory allocations for
365
- * > libgit2 operations.
366
- *
367
- * opts(GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, int enabled)
368
- *
369
- * > Ensure that there are no unsaved changes in the index before
370
- * > beginning any operation that reloads the index from disk (eg,
371
- * > checkout). If there are unsaved changes, the instruction will
372
- * > fail. (Using the FORCE flag to checkout will still overwrite
373
- * > these changes.)
374
- *
375
348
  * @param option Option key
376
349
  * @param ... value to set the option
377
350
  * @return 0 on success, <0 on failure
@@ -64,7 +64,6 @@ typedef enum {
64
64
  typedef struct git_config_entry {
65
65
  const char *name; /**< Name of the entry (normalised) */
66
66
  const char *value; /**< String value of the entry */
67
- unsigned int include_depth; /**< Depth of includes where this variable was found */
68
67
  git_config_level_t level; /**< Which config file this was found in */
69
68
  void (*free)(struct git_config_entry *entry); /**< Free function for this entry */
70
69
  void *payload; /**< Opaque value for the free function. Do not read or write */
@@ -36,9 +36,10 @@ typedef enum {
36
36
  /**
37
37
  * Describe options structure
38
38
  *
39
- * Initialize with `GIT_DESCRIBE_OPTIONS_INIT`. Alternatively, you can
40
- * use `git_describe_init_options`.
39
+ * Initialize with `GIT_DESCRIBE_OPTIONS_INIT` macro to correctly set
40
+ * the `version` field. E.g.
41
41
  *
42
+ * git_describe_options opts = GIT_DESCRIBE_OPTIONS_INIT;
42
43
  */
43
44
  typedef struct git_describe_options {
44
45
  unsigned int version;
@@ -69,24 +70,10 @@ typedef struct git_describe_options {
69
70
  GIT_DESCRIBE_DEFAULT_MAX_CANDIDATES_TAGS, \
70
71
  }
71
72
 
72
- /**
73
- * Initialize git_describe_options structure
74
- *
75
- * Initializes a `git_describe_options` with default values. Equivalent to creating
76
- * an instance with GIT_DESCRIBE_OPTIONS_INIT.
77
- *
78
- * @param opts The `git_describe_options` struct to initialize.
79
- * @param version The struct version; pass `GIT_DESCRIBE_OPTIONS_VERSION`.
80
- * @return Zero on success; -1 on failure.
81
- */
82
73
  GIT_EXTERN(int) git_describe_init_options(git_describe_options *opts, unsigned int version);
83
74
 
84
75
  /**
85
- * Describe format options structure
86
- *
87
- * Initialize with `GIT_DESCRIBE_FORMAT_OPTIONS_INIT`. Alternatively, you can
88
- * use `git_describe_format_init_options`.
89
- *
76
+ * Options for formatting the describe string
90
77
  */
91
78
  typedef struct {
92
79
  unsigned int version;
@@ -116,16 +103,6 @@ typedef struct {
116
103
  GIT_DESCRIBE_DEFAULT_ABBREVIATED_SIZE, \
117
104
  }
118
105
 
119
- /**
120
- * Initialize git_describe_format_options structure
121
- *
122
- * Initializes a `git_describe_format_options` with default values. Equivalent to creating
123
- * an instance with GIT_DESCRIBE_FORMAT_OPTIONS_INIT.
124
- *
125
- * @param opts The `git_describe_format_options` struct to initialize.
126
- * @param version The struct version; pass `GIT_DESCRIBE_FORMAT_OPTIONS_VERSION`.
127
- * @return Zero on success; -1 on failure.
128
- */
129
106
  GIT_EXTERN(int) git_describe_init_format_options(git_describe_format_options *opts, unsigned int version);
130
107
 
131
108
  /**
@@ -141,7 +118,7 @@ typedef struct git_describe_result git_describe_result;
141
118
  * @param result pointer to store the result. You must free this once
142
119
  * you're done with it.
143
120
  * @param committish a committish to describe
144
- * @param opts the lookup options (or NULL for defaults)
121
+ * @param opts the lookup options
145
122
  */
146
123
  GIT_EXTERN(int) git_describe_commit(
147
124
  git_describe_result **result,
@@ -158,7 +135,7 @@ GIT_EXTERN(int) git_describe_commit(
158
135
  * @param out pointer to store the result. You must free this once
159
136
  * you're done with it.
160
137
  * @param repo the repository in which to perform the describe
161
- * @param opts the lookup options (or NULL for defaults)
138
+ * @param opts the lookup options
162
139
  */
163
140
  GIT_EXTERN(int) git_describe_workdir(
164
141
  git_describe_result **out,
@@ -171,7 +148,7 @@ GIT_EXTERN(int) git_describe_workdir(
171
148
  * @param out The buffer to store the result
172
149
  * @param result the result from `git_describe_commit()` or
173
150
  * `git_describe_workdir()`.
174
- * @param opts the formatting options (or NULL for defaults)
151
+ * @param opts the formatting options
175
152
  */
176
153
  GIT_EXTERN(int) git_describe_format(
177
154
  git_buf *out,
@@ -171,12 +171,6 @@ typedef enum {
171
171
  * Options controlling how output will be generated
172
172
  */
173
173
 
174
- /** Use a heuristic that takes indentation and whitespace into account
175
- * which generally can produce better diffs when dealing with ambiguous
176
- * diff hunks.
177
- */
178
- GIT_DIFF_INDENT_HEURISTIC = (1u << 18),
179
-
180
174
  /** Treat all files as text, disabling binary attributes & detection */
181
175
  GIT_DIFF_FORCE_TEXT = (1u << 20),
182
176
  /** Treat all files as binary, disabling text diffs */
@@ -212,6 +206,12 @@ typedef enum {
212
206
  * can apply given diff information to binary files.
213
207
  */
214
208
  GIT_DIFF_SHOW_BINARY = (1u << 30),
209
+
210
+ /** Use a heuristic that takes indentation and whitespace into account
211
+ * which generally can produce better diffs when dealing with ambiguous
212
+ * diff hunks.
213
+ */
214
+ GIT_DIFF_INDENT_HEURISTIC = (1u << 31),
215
215
  } git_diff_option_t;
216
216
 
217
217
  /**
@@ -437,13 +437,11 @@ typedef struct {
437
437
  {GIT_DIFF_OPTIONS_VERSION, 0, GIT_SUBMODULE_IGNORE_UNSPECIFIED, {NULL,0}, NULL, NULL, NULL, 3}
438
438
 
439
439
  /**
440
- * Initialize git_diff_options structure
440
+ * Initializes a `git_diff_options` with default values. Equivalent to
441
+ * creating an instance with GIT_DIFF_OPTIONS_INIT.
441
442
  *
442
- * Initializes a `git_diff_options` with default values. Equivalent to creating
443
- * an instance with GIT_DIFF_OPTIONS_INIT.
444
- *
445
- * @param opts The `git_diff_options` struct to initialize.
446
- * @param version The struct version; pass `GIT_DIFF_OPTIONS_VERSION`.
443
+ * @param opts The `git_diff_options` struct to initialize
444
+ * @param version Version of struct; pass `GIT_DIFF_OPTIONS_VERSION`
447
445
  * @return Zero on success; -1 on failure.
448
446
  */
449
447
  GIT_EXTERN(int) git_diff_init_options(
@@ -734,13 +732,11 @@ typedef struct {
734
732
  #define GIT_DIFF_FIND_OPTIONS_INIT {GIT_DIFF_FIND_OPTIONS_VERSION}
735
733
 
736
734
  /**
737
- * Initialize git_diff_find_options structure
738
- *
739
- * Initializes a `git_diff_find_options` with default values. Equivalent to creating
740
- * an instance with GIT_DIFF_FIND_OPTIONS_INIT.
735
+ * Initializes a `git_diff_find_options` with default values. Equivalent to
736
+ * creating an instance with GIT_DIFF_FIND_OPTIONS_INIT.
741
737
  *
742
- * @param opts The `git_diff_find_options` struct to initialize.
743
- * @param version The struct version; pass `GIT_DIFF_FIND_OPTIONS_VERSION`.
738
+ * @param opts The `git_diff_find_options` struct to initialize
739
+ * @param version Version of struct; pass `GIT_DIFF_FIND_OPTIONS_VERSION`
744
740
  * @return Zero on success; -1 on failure.
745
741
  */
746
742
  GIT_EXTERN(int) git_diff_find_init_options(
@@ -1398,13 +1394,12 @@ GIT_EXTERN(int) git_diff_commit_as_email(
1398
1394
  const git_diff_options *diff_opts);
1399
1395
 
1400
1396
  /**
1401
- * Initialize git_diff_format_email_options structure
1397
+ * Initializes a `git_diff_format_email_options` with default values.
1402
1398
  *
1403
- * Initializes a `git_diff_format_email_options` with default values. Equivalent
1404
- * to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
1399
+ * Equivalent to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
1405
1400
  *
1406
- * @param opts The `git_blame_options` struct to initialize.
1407
- * @param version The struct version; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`.
1401
+ * @param opts The `git_diff_format_email_options` struct to initialize
1402
+ * @param version Version of struct; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`
1408
1403
  * @return Zero on success; -1 on failure.
1409
1404
  */
1410
1405
  GIT_EXTERN(int) git_diff_format_email_init_options(
@@ -1414,9 +1409,8 @@ GIT_EXTERN(int) git_diff_format_email_init_options(
1414
1409
  /**
1415
1410
  * Patch ID options structure
1416
1411
  *
1417
- * Initialize with `GIT_PATCHID_OPTIONS_INIT`. Alternatively, you can
1418
- * use `git_patchid_init_options`.
1419
- *
1412
+ * Initialize with `GIT_DIFF_PATCHID_OPTIONS_INIT` macro to
1413
+ * correctly set the default values and version.
1420
1414
  */
1421
1415
  typedef struct git_diff_patchid_options {
1422
1416
  unsigned int version;
@@ -1426,14 +1420,10 @@ typedef struct git_diff_patchid_options {
1426
1420
  #define GIT_DIFF_PATCHID_OPTIONS_INIT { GIT_DIFF_PATCHID_OPTIONS_VERSION }
1427
1421
 
1428
1422
  /**
1429
- * Initialize git_diff_patchid_options structure
1423
+ * Initialize `git_diff_patchid_options` structure.
1430
1424
  *
1431
- * Initializes a `git_diff_patchid_options` with default values. Equivalent to
1425
+ * Initializes the structure with default values. Equivalent to
1432
1426
  * creating an instance with `GIT_DIFF_PATCHID_OPTIONS_INIT`.
1433
- *
1434
- * @param opts The `git_diff_patchid_options` struct to initialize.
1435
- * @param version The struct version; pass `GIT_DIFF_PATCHID_OPTIONS_VERSION`.
1436
- * @return Zero on success; -1 on failure.
1437
1427
  */
1438
1428
  GIT_EXTERN(int) git_diff_patchid_init_options(
1439
1429
  git_diff_patchid_options *opts,
@@ -55,7 +55,6 @@ typedef enum {
55
55
  GIT_ITEROVER = -31, /**< Signals end of iteration with iterator */
56
56
  GIT_RETRY = -32, /**< Internal only */
57
57
  GIT_EMISMATCH = -33, /**< Hashsum mismatch in object */
58
- GIT_EINDEXDIRTY = -34, /**< Unsaved changes in the index would be overwritten */
59
58
  } git_error_code;
60
59
 
61
60
  /**
@@ -59,8 +59,8 @@ GIT_EXTERN(int) git_ignore_clear_internal_rules(
59
59
  * given file. This indicates if the file would be ignored regardless of
60
60
  * whether the file is already in the index or committed to the repository.
61
61
  *
62
- * One way to think of this is if you were to do "git check-ignore --no-index"
63
- * on the given file, would it be shown or not?
62
+ * One way to think of this is if you were to do "git add ." on the
63
+ * directory containing the file, would it be added or not?
64
64
  *
65
65
  * @param ignored boolean returning 0 if the file is not ignored, 1 if it is
66
66
  * @param repo a repository object
@@ -203,13 +203,12 @@ typedef struct {
203
203
  #define GIT_MERGE_FILE_OPTIONS_INIT {GIT_MERGE_FILE_OPTIONS_VERSION}
204
204
 
205
205
  /**
206
- * Initialize git_merge_file_options structure
207
- *
208
206
  * Initializes a `git_merge_file_options` with default values. Equivalent to
209
- * creating an instance with `GIT_MERGE_FILE_OPTIONS_INIT`.
207
+ * creating an instance with GIT_MERGE_FILE_OPTIONS_INIT.
210
208
  *
211
- * @param opts The `git_merge_file_options` struct to initialize.
212
- * @param version The struct version; pass `GIT_MERGE_FILE_OPTIONS_VERSION`.
209
+ * @param opts the `git_merge_file_options` instance to initialize.
210
+ * @param version the version of the struct; you should pass
211
+ * `GIT_MERGE_FILE_OPTIONS_VERSION` here.
213
212
  * @return Zero on success; -1 on failure.
214
213
  */
215
214
  GIT_EXTERN(int) git_merge_file_init_options(
@@ -301,13 +300,12 @@ typedef struct {
301
300
  GIT_MERGE_OPTIONS_VERSION, GIT_MERGE_FIND_RENAMES }
302
301
 
303
302
  /**
304
- * Initialize git_merge_options structure
305
- *
306
303
  * Initializes a `git_merge_options` with default values. Equivalent to
307
- * creating an instance with `GIT_MERGE_OPTIONS_INIT`.
304
+ * creating an instance with GIT_MERGE_OPTIONS_INIT.
308
305
  *
309
- * @param opts The `git_merge_options` struct to initialize.
310
- * @param version The struct version; pass `GIT_MERGE_OPTIONS_VERSION`.
306
+ * @param opts the `git_merge_options` instance to initialize.
307
+ * @param version the version of the struct; you should pass
308
+ * `GIT_MERGE_OPTIONS_VERSION` here.
311
309
  * @return Zero on success; -1 on failure.
312
310
  */
313
311
  GIT_EXTERN(int) git_merge_init_options(
@@ -64,8 +64,8 @@ typedef struct {
64
64
  /**
65
65
  * If cert verification fails, this will be called to let the
66
66
  * user make the final decision of whether to allow the
67
- * connection to proceed. Returns 0 to allow the connection
68
- * or a negative value to indicate an error.
67
+ * connection to proceed. Returns 1 to allow the connection, 0
68
+ * to disallow it or a negative value to indicate an error.
69
69
  */
70
70
  git_transport_certificate_check_cb certificate_check;
71
71
 
@@ -80,14 +80,10 @@ typedef struct {
80
80
  #define GIT_PROXY_OPTIONS_INIT {GIT_PROXY_OPTIONS_VERSION}
81
81
 
82
82
  /**
83
- * Initialize git_proxy_options structure
83
+ * Initialize a proxy options structure
84
84
  *
85
- * Initializes a `git_proxy_options` with default values. Equivalent to
86
- * creating an instance with `GIT_PROXY_OPTIONS_INIT`.
87
- *
88
- * @param opts The `git_proxy_options` struct to initialize.
89
- * @param version The struct version; pass `GIT_PROXY_OPTIONS_VERSION`.
90
- * @return Zero on success; -1 on failure.
85
+ * @param opts the options struct to initialize
86
+ * @param version the version of the struct, use `GIT_PROXY_OPTIONS_VERSION`
91
87
  */
92
88
  GIT_EXTERN(int) git_proxy_init_options(git_proxy_options *opts, unsigned int version);
93
89
 
@@ -11,8 +11,6 @@
11
11
  #include "types.h"
12
12
  #include "oid.h"
13
13
  #include "annotated_commit.h"
14
- #include "merge.h"
15
- #include "checkout.h"
16
14
 
17
15
  /**
18
16
  * @file git2/rebase.h
@@ -147,13 +145,12 @@ typedef struct {
147
145
  } git_rebase_operation;
148
146
 
149
147
  /**
150
- * Initialize git_rebase_options structure
151
- *
152
148
  * Initializes a `git_rebase_options` with default values. Equivalent to
153
- * creating an instance with `GIT_REBASE_OPTIONS_INIT`.
149
+ * creating an instance with GIT_REBASE_OPTIONS_INIT.
154
150
  *
155
- * @param opts The `git_rebase_options` struct to initialize.
156
- * @param version The struct version; pass `GIT_REBASE_OPTIONS_VERSION`.
151
+ * @param opts the `git_rebase_options` instance to initialize.
152
+ * @param version the version of the struct; you should pass
153
+ * `GIT_REBASE_OPTIONS_VERSION` here.
157
154
  * @return Zero on success; -1 on failure.
158
155
  */
159
156
  GIT_EXTERN(int) git_rebase_init_options(
@@ -710,7 +710,7 @@ GIT_EXTERN(int) git_reference_normalize_name(
710
710
  */
711
711
  GIT_EXTERN(int) git_reference_peel(
712
712
  git_object **out,
713
- git_reference *ref,
713
+ const git_reference *ref,
714
714
  git_otype type);
715
715
 
716
716
  /**