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
@@ -21,23 +21,6 @@
21
21
  */
22
22
  GIT_BEGIN_DECL
23
23
 
24
- /**
25
- * Parse a given refspec string
26
- *
27
- * @param refspec a pointer to hold the refspec handle
28
- * @param input the refspec string
29
- * @param is_fetch is this a refspec for a fetch
30
- * @return 0 if the refspec string could be parsed, -1 otherwise
31
- */
32
- GIT_EXTERN(int) git_refspec_parse(git_refspec **refspec, const char *input, int is_fetch);
33
-
34
- /**
35
- * Free a refspec object which has been created by git_refspec_parse
36
- *
37
- * @param refspec the refspec object
38
- */
39
- GIT_EXTERN(void) git_refspec_free(git_refspec *refspec);
40
-
41
24
  /**
42
25
  * Get the source specifier
43
26
  *
@@ -432,8 +432,8 @@ struct git_remote_callbacks {
432
432
  /**
433
433
  * If cert verification fails, this will be called to let the
434
434
  * user make the final decision of whether to allow the
435
- * connection to proceed. Returns 0 to allow the connection
436
- * or a negative value to indicate an error.
435
+ * connection to proceed. Returns 1 to allow the connection, 0
436
+ * to disallow it or a negative value to indicate an error.
437
437
  */
438
438
  git_transport_certificate_check_cb certificate_check;
439
439
 
@@ -596,13 +596,12 @@ typedef struct {
596
596
  GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, GIT_PROXY_OPTIONS_INIT }
597
597
 
598
598
  /**
599
- * Initialize git_fetch_options structure
600
- *
601
599
  * Initializes a `git_fetch_options` with default values. Equivalent to
602
- * creating an instance with `GIT_FETCH_OPTIONS_INIT`.
600
+ * creating an instance with GIT_FETCH_OPTIONS_INIT.
603
601
  *
604
- * @param opts The `git_fetch_options` struct to initialize.
605
- * @param version The struct version; pass `GIT_FETCH_OPTIONS_VERSION`.
602
+ * @param opts the `git_fetch_options` instance to initialize.
603
+ * @param version the version of the struct; you should pass
604
+ * `GIT_FETCH_OPTIONS_VERSION` here.
606
605
  * @return Zero on success; -1 on failure.
607
606
  */
608
607
  GIT_EXTERN(int) git_fetch_init_options(
@@ -646,13 +645,12 @@ typedef struct {
646
645
  #define GIT_PUSH_OPTIONS_INIT { GIT_PUSH_OPTIONS_VERSION, 0, GIT_REMOTE_CALLBACKS_INIT, GIT_PROXY_OPTIONS_INIT }
647
646
 
648
647
  /**
649
- * Initialize git_push_options structure
650
- *
651
648
  * Initializes a `git_push_options` with default values. Equivalent to
652
- * creating an instance with `GIT_PUSH_OPTIONS_INIT`.
649
+ * creating an instance with GIT_PUSH_OPTIONS_INIT.
653
650
  *
654
- * @param opts The `git_push_options` struct to initialize.
655
- * @param version The struct version; pass `GIT_PUSH_OPTIONS_VERSION`.
651
+ * @param opts the `git_push_options` instance to initialize.
652
+ * @param version the version of the struct; you should pass
653
+ * `GIT_PUSH_OPTIONS_VERSION` here.
656
654
  * @return Zero on success; -1 on failure.
657
655
  */
658
656
  GIT_EXTERN(int) git_push_init_options(
@@ -301,13 +301,11 @@ typedef struct {
301
301
  #define GIT_REPOSITORY_INIT_OPTIONS_INIT {GIT_REPOSITORY_INIT_OPTIONS_VERSION}
302
302
 
303
303
  /**
304
- * Initialize git_repository_init_options structure
304
+ * Initializes a `git_repository_init_options` with default values. Equivalent
305
+ * to creating an instance with GIT_REPOSITORY_INIT_OPTIONS_INIT.
305
306
  *
306
- * Initializes a `git_repository_init_options` with default values. Equivalent to
307
- * creating an instance with `GIT_REPOSITORY_INIT_OPTIONS_INIT`.
308
- *
309
- * @param opts The `git_repository_init_options` struct to initialize.
310
- * @param version The struct version; pass `GIT_REPOSITORY_INIT_OPTIONS_VERSION`.
307
+ * @param opts the `git_repository_init_options` struct to initialize
308
+ * @param version Version of struct; pass `GIT_REPOSITORY_INIT_OPTIONS_VERSION`
311
309
  * @return Zero on success; -1 on failure.
312
310
  */
313
311
  GIT_EXTERN(int) git_repository_init_init_options(
@@ -370,7 +368,7 @@ GIT_EXTERN(int) git_repository_head_for_worktree(git_reference **out, git_reposi
370
368
  */
371
369
  GIT_EXTERN(int) git_repository_head_detached(git_repository *repo);
372
370
 
373
- /**
371
+ /*
374
372
  * Check if a worktree's HEAD is detached
375
373
  *
376
374
  * A worktree's HEAD is detached when it points directly to a
@@ -37,13 +37,11 @@ typedef struct {
37
37
  #define GIT_REVERT_OPTIONS_INIT {GIT_REVERT_OPTIONS_VERSION, 0, GIT_MERGE_OPTIONS_INIT, GIT_CHECKOUT_OPTIONS_INIT}
38
38
 
39
39
  /**
40
- * Initialize git_revert_options structure
41
- *
42
40
  * Initializes a `git_revert_options` with default values. Equivalent to
43
- * creating an instance with `GIT_REVERT_OPTIONS_INIT`.
41
+ * creating an instance with GIT_REVERT_OPTIONS_INIT.
44
42
  *
45
- * @param opts The `git_revert_options` struct to initialize.
46
- * @param version The struct version; pass `GIT_REVERT_OPTIONS_VERSION`.
43
+ * @param opts the `git_revert_options` struct to initialize
44
+ * @param version Version of struct; pass `GIT_REVERT_OPTIONS_VERSION`
47
45
  * @return Zero on success; -1 on failure.
48
46
  */
49
47
  GIT_EXTERN(int) git_revert_init_options(
@@ -9,7 +9,6 @@
9
9
 
10
10
  #include "common.h"
11
11
  #include "types.h"
12
- #include "checkout.h"
13
12
 
14
13
  /**
15
14
  * @file git2/stash.h
@@ -81,7 +80,6 @@ typedef enum {
81
80
  GIT_STASH_APPLY_REINSTATE_INDEX = (1 << 0),
82
81
  } git_stash_apply_flags;
83
82
 
84
- /** Stash apply progression states */
85
83
  typedef enum {
86
84
  GIT_STASH_APPLY_PROGRESS_NONE = 0,
87
85
 
@@ -116,12 +114,12 @@ typedef int (*git_stash_apply_progress_cb)(
116
114
  git_stash_apply_progress_t progress,
117
115
  void *payload);
118
116
 
119
- /**
120
- * Stash application options structure
117
+ /** Stash application options structure.
121
118
  *
122
- * Initialize with `GIT_STASH_APPLY_OPTIONS_INIT`. Alternatively, you can
123
- * use `git_stash_apply_init_options`.
119
+ * Initialize with the `GIT_STASH_APPLY_OPTIONS_INIT` macro to set
120
+ * sensible defaults; for example:
124
121
  *
122
+ * git_stash_apply_options opts = GIT_STASH_APPLY_OPTIONS_INIT;
125
123
  */
126
124
  typedef struct git_stash_apply_options {
127
125
  unsigned int version;
@@ -144,13 +142,12 @@ typedef struct git_stash_apply_options {
144
142
  GIT_CHECKOUT_OPTIONS_INIT }
145
143
 
146
144
  /**
147
- * Initialize git_stash_apply_options structure
148
- *
149
145
  * Initializes a `git_stash_apply_options` with default values. Equivalent to
150
- * creating an instance with `GIT_STASH_APPLY_OPTIONS_INIT`.
146
+ * creating an instance with GIT_STASH_APPLY_OPTIONS_INIT.
151
147
  *
152
- * @param opts The `git_stash_apply_options` struct to initialize.
153
- * @param version The struct version; pass `GIT_STASH_APPLY_OPTIONS_VERSION`.
148
+ * @param opts the `git_stash_apply_options` instance to initialize.
149
+ * @param version the version of the struct; you should pass
150
+ * `GIT_STASH_APPLY_OPTIONS_INIT` here.
154
151
  * @return Zero on success; -1 on failure.
155
152
  */
156
153
  GIT_EXTERN(int) git_stash_apply_init_options(
@@ -9,8 +9,6 @@
9
9
 
10
10
  #include "common.h"
11
11
  #include "types.h"
12
- #include "strarray.h"
13
- #include "diff.h"
14
12
 
15
13
  /**
16
14
  * @file git2/status.h
@@ -191,13 +189,11 @@ typedef struct {
191
189
  #define GIT_STATUS_OPTIONS_INIT {GIT_STATUS_OPTIONS_VERSION}
192
190
 
193
191
  /**
194
- * Initialize git_status_options structure
195
- *
196
192
  * Initializes a `git_status_options` with default values. Equivalent to
197
- * creating an instance with `GIT_STATUS_OPTIONS_INIT`.
193
+ * creating an instance with GIT_STATUS_OPTIONS_INIT.
198
194
  *
199
- * @param opts The `git_status_options` struct to initialize.
200
- * @param version The struct version; pass `GIT_STATUS_OPTIONS_VERSION`.
195
+ * @param opts The `git_status_options` instance to initialize.
196
+ * @param version Version of struct; pass `GIT_STATUS_OPTIONS_VERSION`
201
197
  * @return Zero on success; -1 on failure.
202
198
  */
203
199
  GIT_EXTERN(int) git_status_init_options(
@@ -121,9 +121,10 @@ typedef int (*git_submodule_cb)(
121
121
  /**
122
122
  * Submodule update options structure
123
123
  *
124
- * Initialize with `GIT_SUBMODULE_UPDATE_OPTIONS_INIT`. Alternatively, you can
125
- * use `git_submodule_update_init_options`.
124
+ * Use the GIT_SUBMODULE_UPDATE_OPTIONS_INIT to get the default settings,
125
+ * like this:
126
126
  *
127
+ * git_submodule_update_options opts = GIT_SUBMODULE_UPDATE_OPTIONS_INIT;
127
128
  */
128
129
  typedef struct git_submodule_update_options {
129
130
  unsigned int version;
@@ -159,13 +160,11 @@ typedef struct git_submodule_update_options {
159
160
  GIT_FETCH_OPTIONS_INIT, 1 }
160
161
 
161
162
  /**
162
- * Initialize git_submodule_update_options structure
163
+ * Initializes a `git_submodule_update_options` with default values.
164
+ * Equivalent to creating an instance with GIT_SUBMODULE_UPDATE_OPTIONS_INIT.
163
165
  *
164
- * Initializes a `git_submodule_update_options` with default values. Equivalent to
165
- * creating an instance with `GIT_SUBMODULE_UPDATE_OPTIONS_INIT`.
166
- *
167
- * @param opts The `git_submodule_update_options` struct to initialize.
168
- * @param version The struct version; pass `GIT_SUBMODULE_UPDATE_OPTIONS_VERSION`.
166
+ * @param opts The `git_submodule_update_options` instance to initialize.
167
+ * @param version Version of struct; pass `GIT_SUBMODULE_UPDATE_OPTIONS_VERSION`
169
168
  * @return Zero on success; -1 on failure.
170
169
  */
171
170
  GIT_EXTERN(int) git_submodule_update_init_options(
@@ -7,9 +7,6 @@
7
7
  #ifndef INCLUDE_sys_git_index_h__
8
8
  #define INCLUDE_sys_git_index_h__
9
9
 
10
- #include "git2/common.h"
11
- #include "git2/types.h"
12
-
13
10
  /**
14
11
  * @file git2/sys/index.h
15
12
  * @brief Low-level Git index manipulation routines
@@ -23,61 +23,61 @@
23
23
  GIT_BEGIN_DECL
24
24
 
25
25
  /**
26
- * Instantiate a new mempack backend.
26
+ * Instantiate a new mempack backend.
27
27
  *
28
- * The backend must be added to an existing ODB with the highest
29
- * priority.
28
+ * The backend must be added to an existing ODB with the highest
29
+ * priority.
30
30
  *
31
- * git_mempack_new(&mempacker);
32
- * git_repository_odb(&odb, repository);
33
- * git_odb_add_backend(odb, mempacker, 999);
31
+ * git_mempack_new(&mempacker);
32
+ * git_repository_odb(&odb, repository);
33
+ * git_odb_add_backend(odb, mempacker, 999);
34
34
  *
35
- * Once the backend has been loaded, all writes to the ODB will
36
- * instead be queued in memory, and can be finalized with
37
- * `git_mempack_dump`.
35
+ * Once the backend has been loaded, all writes to the ODB will
36
+ * instead be queued in memory, and can be finalized with
37
+ * `git_mempack_dump`.
38
38
  *
39
- * Subsequent reads will also be served from the in-memory store
40
- * to ensure consistency, until the memory store is dumped.
39
+ * Subsequent reads will also be served from the in-memory store
40
+ * to ensure consistency, until the memory store is dumped.
41
41
  *
42
- * @param out Pointer where to store the ODB backend
43
- * @return 0 on success; error code otherwise
42
+ * @param out Pointer where to store the ODB backend
43
+ * @return 0 on success; error code otherwise
44
44
  */
45
45
  GIT_EXTERN(int) git_mempack_new(git_odb_backend **out);
46
46
 
47
47
  /**
48
- * Dump all the queued in-memory writes to a packfile.
48
+ * Dump all the queued in-memory writes to a packfile.
49
49
  *
50
- * The contents of the packfile will be stored in the given buffer.
51
- * It is the caller's responsibility to ensure that the generated
52
- * packfile is available to the repository (e.g. by writing it
53
- * to disk, or doing something crazy like distributing it across
54
- * several copies of the repository over a network).
50
+ * The contents of the packfile will be stored in the given buffer.
51
+ * It is the caller's responsibility to ensure that the generated
52
+ * packfile is available to the repository (e.g. by writing it
53
+ * to disk, or doing something crazy like distributing it across
54
+ * several copies of the repository over a network).
55
55
  *
56
- * Once the generated packfile is available to the repository,
57
- * call `git_mempack_reset` to cleanup the memory store.
56
+ * Once the generated packfile is available to the repository,
57
+ * call `git_mempack_reset` to cleanup the memory store.
58
58
  *
59
- * Calling `git_mempack_reset` before the packfile has been
60
- * written to disk will result in an inconsistent repository
61
- * (the objects in the memory store won't be accessible).
59
+ * Calling `git_mempack_reset` before the packfile has been
60
+ * written to disk will result in an inconsistent repository
61
+ * (the objects in the memory store won't be accessible).
62
62
  *
63
- * @param pack Buffer where to store the raw packfile
64
- * @param repo The active repository where the backend is loaded
65
- * @param backend The mempack backend
66
- * @return 0 on success; error code otherwise
63
+ * @param pack Buffer where to store the raw packfile
64
+ * @param repo The active repository where the backend is loaded
65
+ * @param backend The mempack backend
66
+ * @return 0 on success; error code otherwise
67
67
  */
68
68
  GIT_EXTERN(int) git_mempack_dump(git_buf *pack, git_repository *repo, git_odb_backend *backend);
69
69
 
70
70
  /**
71
- * Reset the memory packer by clearing all the queued objects.
71
+ * Reset the memory packer by clearing all the queued objects.
72
72
  *
73
- * This assumes that `git_mempack_dump` has been called before to
74
- * store all the queued objects into a single packfile.
73
+ * This assumes that `git_mempack_dump` has been called before to
74
+ * store all the queued objects into a single packfile.
75
75
  *
76
- * Alternatively, call `reset` without a previous dump to "undo"
77
- * all the recently written objects, giving transaction-like
78
- * semantics to the Git repository.
76
+ * Alternatively, call `reset` without a previous dump to "undo"
77
+ * all the recently written objects, giving transaction-like
78
+ * semantics to the Git repository.
79
79
  *
80
- * @param backend The mempack backend
80
+ * @param backend The mempack backend
81
81
  */
82
82
  GIT_EXTERN(void) git_mempack_reset(git_odb_backend *backend);
83
83
 
@@ -7,15 +7,10 @@
7
7
  #ifndef INCLUDE_sys_git_merge_h__
8
8
  #define INCLUDE_sys_git_merge_h__
9
9
 
10
- #include "git2/common.h"
11
- #include "git2/types.h"
12
- #include "git2/index.h"
13
- #include "git2/merge.h"
14
-
15
10
  /**
16
11
  * @file git2/sys/merge.h
17
12
  * @brief Git merge driver backend and plugin routines
18
- * @defgroup git_merge Git merge driver APIs
13
+ * @defgroup git_backend Git custom backend APIs
19
14
  * @ingroup Git
20
15
  * @{
21
16
  */
@@ -8,7 +8,6 @@
8
8
  #define INCLUDE_git_transaction_h__
9
9
 
10
10
  #include "common.h"
11
- #include "types.h"
12
11
 
13
12
  /**
14
13
  * @file git2/transaction.h
@@ -63,9 +63,6 @@ typedef int64_t git_time_t;
63
63
 
64
64
  #endif
65
65
 
66
- #include "buffer.h"
67
- #include "oid.h"
68
-
69
66
  /** Basic type (loose or packed) of any Git object. */
70
67
  typedef enum {
71
68
  GIT_OBJ_ANY = -2, /**< Object can be any of the following */
@@ -184,6 +181,9 @@ typedef struct git_transaction git_transaction;
184
181
  /** Annotated commits, the input to merge and rebase. */
185
182
  typedef struct git_annotated_commit git_annotated_commit;
186
183
 
184
+ /** Merge result */
185
+ typedef struct git_merge_result git_merge_result;
186
+
187
187
  /** Representation of a status collection */
188
188
  typedef struct git_status_list git_status_list;
189
189
 
@@ -215,7 +215,7 @@ typedef enum {
215
215
  GIT_FILEMODE_COMMIT = 0160000,
216
216
  } git_filemode_t;
217
217
 
218
- /**
218
+ /*
219
219
  * A refspec specifies the mapping between remote and local reference
220
220
  * names when fetch or pushing.
221
221
  */
@@ -425,18 +425,15 @@ typedef enum {
425
425
  GIT_SUBMODULE_RECURSE_ONDEMAND = 2,
426
426
  } git_submodule_recurse_t;
427
427
 
428
+ /** A type to write in a streaming fashion, for example, for filters. */
428
429
  typedef struct git_writestream git_writestream;
429
430
 
430
- /** A type to write in a streaming fashion, for example, for filters. */
431
431
  struct git_writestream {
432
432
  int (*write)(git_writestream *stream, const char *buffer, size_t len);
433
433
  int (*close)(git_writestream *stream);
434
434
  void (*free)(git_writestream *stream);
435
435
  };
436
436
 
437
- /** Representation of .mailmap file state. */
438
- typedef struct git_mailmap git_mailmap;
439
-
440
437
  /** @} */
441
438
  GIT_END_DECL
442
439
 
@@ -7,10 +7,10 @@
7
7
  #ifndef INCLUDE_git_version_h__
8
8
  #define INCLUDE_git_version_h__
9
9
 
10
- #define LIBGIT2_VERSION "0.27.0"
10
+ #define LIBGIT2_VERSION "0.27.9"
11
11
  #define LIBGIT2_VER_MAJOR 0
12
12
  #define LIBGIT2_VER_MINOR 27
13
- #define LIBGIT2_VER_REVISION 0
13
+ #define LIBGIT2_VER_REVISION 9
14
14
  #define LIBGIT2_VER_PATCH 0
15
15
 
16
16
  #define LIBGIT2_SOVERSION 27
@@ -74,31 +74,22 @@ GIT_EXTERN(void) git_worktree_free(git_worktree *wt);
74
74
  */
75
75
  GIT_EXTERN(int) git_worktree_validate(const git_worktree *wt);
76
76
 
77
- /**
78
- * Worktree add options structure
79
- *
80
- * Initialize with `GIT_WORKTREE_ADD_OPTIONS_INIT`. Alternatively, you can
81
- * use `git_worktree_add_init_options`.
82
- *
83
- */
84
77
  typedef struct git_worktree_add_options {
85
78
  unsigned int version;
86
79
 
87
80
  int lock; /**< lock newly created worktree */
88
- git_reference *ref; /**< reference to use for the new worktree HEAD */
89
81
  } git_worktree_add_options;
90
82
 
91
83
  #define GIT_WORKTREE_ADD_OPTIONS_VERSION 1
92
- #define GIT_WORKTREE_ADD_OPTIONS_INIT {GIT_WORKTREE_ADD_OPTIONS_VERSION,0,NULL}
84
+ #define GIT_WORKTREE_ADD_OPTIONS_INIT {GIT_WORKTREE_ADD_OPTIONS_VERSION,0}
93
85
 
94
86
  /**
95
- * Initialize git_worktree_add_options structure
96
- *
97
- * Initializes a `git_worktree_add_options` with default values. Equivalent to
98
- * creating an instance with `GIT_WORKTREE_ADD_OPTIONS_INIT`.
87
+ * Initializes a `git_worktree_add_options` with default vaules.
88
+ * Equivalent to creating an instance with
89
+ * GIT_WORKTREE_ADD_OPTIONS_INIT.
99
90
  *
100
- * @param opts The `git_worktree_add_options` struct to initialize.
101
- * @param version The struct version; pass `GIT_WORKTREE_ADD_OPTIONS_VERSION`.
91
+ * @param opts the struct to initialize
92
+ * @param version Verison of struct; pass `GIT_WORKTREE_ADD_OPTIONS_VERSION`
102
93
  * @return Zero on success; -1 on failure.
103
94
  */
104
95
  int git_worktree_add_init_options(git_worktree_add_options *opts,
@@ -157,24 +148,6 @@ GIT_EXTERN(int) git_worktree_unlock(git_worktree *wt);
157
148
  */
158
149
  GIT_EXTERN(int) git_worktree_is_locked(git_buf *reason, const git_worktree *wt);
159
150
 
160
- /**
161
- * Retrieve the name of the worktree
162
- *
163
- * @param wt Worktree to get the name for
164
- * @return The worktree's name. The pointer returned is valid for the
165
- * lifetime of the git_worktree
166
- */
167
- GIT_EXTERN(const char *) git_worktree_name(const git_worktree *wt);
168
-
169
- /**
170
- * Retrieve the filesystem path for the worktree
171
- *
172
- * @param wt Worktree to get the path for
173
- * @return The worktree's filesystem path. The pointer returned
174
- * is valid for the lifetime of the git_worktree.
175
- */
176
- GIT_EXTERN(const char *) git_worktree_path(const git_worktree *wt);
177
-
178
151
  /**
179
152
  * Flags which can be passed to git_worktree_prune to alter its
180
153
  * behavior.
@@ -188,13 +161,6 @@ typedef enum {
188
161
  GIT_WORKTREE_PRUNE_WORKING_TREE = 1u << 2,
189
162
  } git_worktree_prune_t;
190
163
 
191
- /**
192
- * Worktree prune options structure
193
- *
194
- * Initialize with `GIT_WORKTREE_PRUNE_OPTIONS_INIT`. Alternatively, you can
195
- * use `git_worktree_prune_init_options`.
196
- *
197
- */
198
164
  typedef struct git_worktree_prune_options {
199
165
  unsigned int version;
200
166
 
@@ -205,13 +171,12 @@ typedef struct git_worktree_prune_options {
205
171
  #define GIT_WORKTREE_PRUNE_OPTIONS_INIT {GIT_WORKTREE_PRUNE_OPTIONS_VERSION,0}
206
172
 
207
173
  /**
208
- * Initialize git_worktree_prune_options structure
209
- *
210
- * Initializes a `git_worktree_prune_options` with default values. Equivalent to
211
- * creating an instance with `GIT_WORKTREE_PRUNE_OPTIONS_INIT`.
174
+ * Initializes a `git_worktree_prune_options` with default vaules.
175
+ * Equivalent to creating an instance with
176
+ * GIT_WORKTREE_PRUNE_OPTIONS_INIT.
212
177
  *
213
- * @param opts The `git_worktree_prune_options` struct to initialize.
214
- * @param version The struct version; pass `GIT_WORKTREE_PRUNE_OPTIONS_VERSION`.
178
+ * @param opts the struct to initialize
179
+ * @param version Verison of struct; pass `GIT_WORKTREE_PRUNE_OPTIONS_VERSION`
215
180
  * @return Zero on success; -1 on failure.
216
181
  */
217
182
  GIT_EXTERN(int) git_worktree_prune_init_options(