rugged 0.23.0b2 → 0.23.0b4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/ext/rugged/rugged_blob.c +39 -0
  3. data/ext/rugged/rugged_diff.c +7 -3
  4. data/ext/rugged/rugged_index.c +2 -2
  5. data/ext/rugged/rugged_remote.c +27 -148
  6. data/ext/rugged/rugged_remote_collection.c +134 -12
  7. data/ext/rugged/rugged_repo.c +74 -5
  8. data/ext/rugged/rugged_submodule.c +18 -208
  9. data/ext/rugged/rugged_submodule_collection.c +148 -0
  10. data/lib/rugged/version.rb +1 -1
  11. data/vendor/libgit2/AUTHORS +1 -0
  12. data/vendor/libgit2/CMakeLists.txt +33 -25
  13. data/vendor/libgit2/deps/winhttp/winhttp.def +29 -29
  14. data/vendor/libgit2/include/git2.h +1 -1
  15. data/vendor/libgit2/include/git2/blob.h +4 -6
  16. data/vendor/libgit2/include/git2/checkout.h +10 -1
  17. data/vendor/libgit2/include/git2/clone.h +6 -7
  18. data/vendor/libgit2/include/git2/commit.h +11 -0
  19. data/vendor/libgit2/include/git2/cred_helpers.h +2 -2
  20. data/vendor/libgit2/include/git2/describe.h +1 -1
  21. data/vendor/libgit2/include/git2/diff.h +68 -11
  22. data/vendor/libgit2/include/git2/errors.h +4 -1
  23. data/vendor/libgit2/include/git2/filter.h +16 -0
  24. data/vendor/libgit2/include/git2/index.h +38 -11
  25. data/vendor/libgit2/include/git2/odb.h +1 -1
  26. data/vendor/libgit2/include/git2/odb_backend.h +2 -2
  27. data/vendor/libgit2/include/git2/remote.h +300 -207
  28. data/vendor/libgit2/include/git2/reset.h +1 -0
  29. data/vendor/libgit2/include/git2/stash.h +135 -4
  30. data/vendor/libgit2/include/git2/status.h +1 -0
  31. data/vendor/libgit2/include/git2/submodule.h +46 -75
  32. data/vendor/libgit2/include/git2/sys/odb_backend.h +1 -1
  33. data/vendor/libgit2/include/git2/sys/stream.h +2 -0
  34. data/vendor/libgit2/include/git2/sys/transport.h +1 -21
  35. data/vendor/libgit2/include/git2/transport.h +27 -0
  36. data/vendor/libgit2/include/git2/types.h +20 -10
  37. data/vendor/libgit2/include/git2/version.h +3 -3
  38. data/vendor/libgit2/libgit2.pc.in +4 -2
  39. data/vendor/libgit2/src/attr.c +2 -1
  40. data/vendor/libgit2/src/attr_file.c +18 -37
  41. data/vendor/libgit2/src/blame.c +2 -2
  42. data/vendor/libgit2/src/blob.c +4 -3
  43. data/vendor/libgit2/src/branch.c +6 -3
  44. data/vendor/libgit2/src/buf_text.c +4 -6
  45. data/vendor/libgit2/src/buf_text.h +1 -2
  46. data/vendor/libgit2/src/buffer.c +8 -6
  47. data/vendor/libgit2/src/buffer.h +1 -1
  48. data/vendor/libgit2/src/cache.c +1 -0
  49. data/vendor/libgit2/src/checkout.c +34 -20
  50. data/vendor/libgit2/src/clone.c +29 -29
  51. data/vendor/libgit2/src/commit.c +65 -0
  52. data/vendor/libgit2/src/common.h +5 -0
  53. data/vendor/libgit2/src/config.c +20 -0
  54. data/vendor/libgit2/src/config.h +6 -0
  55. data/vendor/libgit2/src/config_file.c +2 -2
  56. data/vendor/libgit2/src/crlf.c +39 -17
  57. data/vendor/libgit2/src/curl_stream.c +257 -0
  58. data/vendor/libgit2/src/curl_stream.h +14 -0
  59. data/vendor/libgit2/src/diff.c +223 -88
  60. data/vendor/libgit2/src/diff.h +21 -1
  61. data/vendor/libgit2/src/diff_file.c +23 -13
  62. data/vendor/libgit2/src/diff_file.h +4 -2
  63. data/vendor/libgit2/src/diff_patch.c +266 -71
  64. data/vendor/libgit2/src/diff_patch.h +36 -0
  65. data/vendor/libgit2/src/diff_print.c +156 -126
  66. data/vendor/libgit2/src/diff_tform.c +32 -54
  67. data/vendor/libgit2/src/fetch.c +27 -10
  68. data/vendor/libgit2/src/fetch.h +2 -2
  69. data/vendor/libgit2/src/filebuf.c +1 -1
  70. data/vendor/libgit2/src/fileops.c +6 -2
  71. data/vendor/libgit2/src/filter.c +28 -7
  72. data/vendor/libgit2/src/fnmatch.c +5 -5
  73. data/vendor/libgit2/src/global.c +16 -0
  74. data/vendor/libgit2/src/ident.c +2 -2
  75. data/vendor/libgit2/src/ignore.c +1 -0
  76. data/vendor/libgit2/src/index.c +338 -80
  77. data/vendor/libgit2/src/index.h +4 -1
  78. data/vendor/libgit2/src/indexer.c +19 -5
  79. data/vendor/libgit2/src/iterator.c +118 -11
  80. data/vendor/libgit2/src/iterator.h +25 -0
  81. data/vendor/libgit2/src/merge.c +96 -106
  82. data/vendor/libgit2/src/merge.h +14 -4
  83. data/vendor/libgit2/src/netops.c +3 -3
  84. data/vendor/libgit2/src/odb.c +17 -9
  85. data/vendor/libgit2/src/odb.h +1 -1
  86. data/vendor/libgit2/src/odb_loose.c +2 -2
  87. data/vendor/libgit2/src/odb_pack.c +1 -1
  88. data/vendor/libgit2/src/openssl_stream.c +118 -27
  89. data/vendor/libgit2/src/pack-objects.c +28 -0
  90. data/vendor/libgit2/src/pack-objects.h +1 -0
  91. data/vendor/libgit2/src/pack.c +18 -10
  92. data/vendor/libgit2/src/path.c +16 -11
  93. data/vendor/libgit2/src/path.h +1 -1
  94. data/vendor/libgit2/src/push.c +26 -42
  95. data/vendor/libgit2/src/push.h +2 -34
  96. data/vendor/libgit2/src/rebase.c +1 -1
  97. data/vendor/libgit2/src/refs.c +1 -1
  98. data/vendor/libgit2/src/refspec.c +6 -0
  99. data/vendor/libgit2/src/remote.c +381 -274
  100. data/vendor/libgit2/src/remote.h +0 -4
  101. data/vendor/libgit2/src/repository.c +33 -12
  102. data/vendor/libgit2/src/repository.h +0 -1
  103. data/vendor/libgit2/src/reset.c +1 -0
  104. data/vendor/libgit2/src/stash.c +439 -17
  105. data/vendor/libgit2/src/status.c +6 -0
  106. data/vendor/libgit2/src/stransport_stream.c +58 -21
  107. data/vendor/libgit2/src/stream.h +15 -0
  108. data/vendor/libgit2/src/submodule.c +410 -664
  109. data/vendor/libgit2/src/submodule.h +0 -24
  110. data/vendor/libgit2/src/transaction.c +1 -0
  111. data/vendor/libgit2/src/transports/cred.c +55 -1
  112. data/vendor/libgit2/src/transports/http.c +18 -2
  113. data/vendor/libgit2/src/transports/local.c +60 -59
  114. data/vendor/libgit2/src/transports/smart.h +1 -1
  115. data/vendor/libgit2/src/transports/smart_protocol.c +11 -11
  116. data/vendor/libgit2/src/transports/ssh.c +46 -7
  117. data/vendor/libgit2/src/unix/posix.h +4 -0
  118. data/vendor/libgit2/src/util.c +9 -9
  119. data/vendor/libgit2/src/util.h +9 -0
  120. data/vendor/libgit2/src/win32/posix.h +3 -0
  121. data/vendor/libgit2/src/win32/posix_w32.c +38 -0
  122. data/vendor/libgit2/src/win32/w32_util.h +10 -0
  123. metadata +4 -3
  124. data/vendor/libgit2/include/git2/push.h +0 -94
@@ -10,6 +10,7 @@
10
10
  #include "common.h"
11
11
  #include "types.h"
12
12
  #include "strarray.h"
13
+ #include "checkout.h"
13
14
 
14
15
  /**
15
16
  * @file git2/reset.h
@@ -70,6 +70,120 @@ GIT_EXTERN(int) git_stash_save(
70
70
  const char *message,
71
71
  unsigned int flags);
72
72
 
73
+ /** Stash application flags. */
74
+ typedef enum {
75
+ GIT_STASH_APPLY_DEFAULT = 0,
76
+
77
+ /* Try to reinstate not only the working tree's changes,
78
+ * but also the index's changes.
79
+ */
80
+ GIT_STASH_APPLY_REINSTATE_INDEX = (1 << 0),
81
+ } git_stash_apply_flags;
82
+
83
+ typedef enum {
84
+ GIT_STASH_APPLY_PROGRESS_NONE = 0,
85
+
86
+ /** Loading the stashed data from the object database. */
87
+ GIT_STASH_APPLY_PROGRESS_LOADING_STASH,
88
+
89
+ /** The stored index is being analyzed. */
90
+ GIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX,
91
+
92
+ /** The modified files are being analyzed. */
93
+ GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED,
94
+
95
+ /** The untracked and ignored files are being analyzed. */
96
+ GIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED,
97
+
98
+ /** The untracked files are being written to disk. */
99
+ GIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED,
100
+
101
+ /** The modified files are being written to disk. */
102
+ GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED,
103
+
104
+ /** The stash was applied successfully. */
105
+ GIT_STASH_APPLY_PROGRESS_DONE,
106
+ } git_stash_apply_progress_t;
107
+
108
+ /**
109
+ * Stash application progress notification function.
110
+ * Return 0 to continue processing, or a negative value to
111
+ * abort the stash application.
112
+ */
113
+ typedef int (*git_stash_apply_progress_cb)(
114
+ git_stash_apply_progress_t progress,
115
+ void *payload);
116
+
117
+ /** Stash application options structure.
118
+ *
119
+ * Initialize with the `GIT_STASH_APPLY_OPTIONS_INIT` macro to set
120
+ * sensible defaults; for example:
121
+ *
122
+ * git_stash_apply_options opts = GIT_STASH_APPLY_OPTIONS_INIT;
123
+ */
124
+ typedef struct git_stash_apply_options {
125
+ unsigned int version;
126
+
127
+ /** See `git_stash_apply_flags_t`, above. */
128
+ git_stash_apply_flags flags;
129
+
130
+ /** Options to use when writing files to the working directory. */
131
+ git_checkout_options checkout_options;
132
+
133
+ /** Optional callback to notify the consumer of application progress. */
134
+ git_stash_apply_progress_cb progress_cb;
135
+ void *progress_payload;
136
+ } git_stash_apply_options;
137
+
138
+ #define GIT_STASH_APPLY_OPTIONS_VERSION 1
139
+ #define GIT_STASH_APPLY_OPTIONS_INIT { \
140
+ GIT_STASH_APPLY_OPTIONS_VERSION, \
141
+ GIT_STASH_APPLY_DEFAULT, \
142
+ GIT_CHECKOUT_OPTIONS_INIT }
143
+
144
+ /**
145
+ * Initializes a `git_stash_apply_options` with default values. Equivalent to
146
+ * creating an instance with GIT_STASH_APPLY_OPTIONS_INIT.
147
+ *
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.
151
+ * @return Zero on success; -1 on failure.
152
+ */
153
+ int git_stash_apply_init_options(
154
+ git_stash_apply_options *opts, unsigned int version);
155
+
156
+ /**
157
+ * Apply a single stashed state from the stash list.
158
+ *
159
+ * If local changes in the working directory conflict with changes in the
160
+ * stash then GIT_EMERGECONFLICT will be returned. In this case, the index
161
+ * will always remain unmodified and all files in the working directory will
162
+ * remain unmodified. However, if you are restoring untracked files or
163
+ * ignored files and there is a conflict when applying the modified files,
164
+ * then those files will remain in the working directory.
165
+ *
166
+ * If passing the GIT_STASH_APPLY_REINSTATE_INDEX flag and there would be
167
+ * conflicts when reinstating the index, the function will return
168
+ * GIT_EMERGECONFLICT and both the working directory and index will be left
169
+ * unmodified.
170
+ *
171
+ * Note that a minimum checkout strategy of `GIT_CHECKOUT_SAFE` is implied.
172
+ *
173
+ * @param repo The owning repository.
174
+ * @param index The position within the stash list. 0 points to the
175
+ * most recent stashed state.
176
+ * @param options Options to control how stashes are applied.
177
+ *
178
+ * @return 0 on success, GIT_ENOTFOUND if there's no stashed state for the
179
+ * given index, GIT_EMERGECONFLICT if changes exist in the working
180
+ * directory, or an error code
181
+ */
182
+ GIT_EXTERN(int) git_stash_apply(
183
+ git_repository *repo,
184
+ size_t index,
185
+ const git_stash_apply_options *options);
186
+
73
187
  /**
74
188
  * This is a callback function you can provide to iterate over all the
75
189
  * stashed states that will be invoked per entry.
@@ -79,7 +193,7 @@ GIT_EXTERN(int) git_stash_save(
79
193
  * @param message The stash message.
80
194
  * @param stash_id The commit oid of the stashed state.
81
195
  * @param payload Extra parameter to callback function.
82
- * @return 0 to continue iterating or non-zero to stop
196
+ * @return 0 to continue iterating or non-zero to stop.
83
197
  */
84
198
  typedef int (*git_stash_cb)(
85
199
  size_t index,
@@ -99,7 +213,7 @@ typedef int (*git_stash_cb)(
99
213
  *
100
214
  * @param payload Extra parameter to callback function.
101
215
  *
102
- * @return 0 on success, non-zero callback return value, or error code
216
+ * @return 0 on success, non-zero callback return value, or error code.
103
217
  */
104
218
  GIT_EXTERN(int) git_stash_foreach(
105
219
  git_repository *repo,
@@ -114,13 +228,30 @@ GIT_EXTERN(int) git_stash_foreach(
114
228
  * @param index The position within the stash list. 0 points to the
115
229
  * most recent stashed state.
116
230
  *
117
- * @return 0 on success, or error code
231
+ * @return 0 on success, GIT_ENOTFOUND if there's no stashed state for the given
232
+ * index, or error code.
118
233
  */
119
-
120
234
  GIT_EXTERN(int) git_stash_drop(
121
235
  git_repository *repo,
122
236
  size_t index);
123
237
 
238
+ /**
239
+ * Apply a single stashed state from the stash list and remove it from the list
240
+ * if successful.
241
+ *
242
+ * @param repo The owning repository.
243
+ * @param index The position within the stash list. 0 points to the
244
+ * most recent stashed state.
245
+ * @param options Options to control how stashes are applied.
246
+ *
247
+ * @return 0 on success, GIT_ENOTFOUND if there's no stashed state for the given
248
+ * index, or error code. (see git_stash_apply() above for details)
249
+ */
250
+ GIT_EXTERN(int) git_stash_pop(
251
+ git_repository *repo,
252
+ size_t index,
253
+ const git_stash_apply_options *options);
254
+
124
255
  /** @} */
125
256
  GIT_END_DECL
126
257
  #endif
@@ -46,6 +46,7 @@ typedef enum {
46
46
  GIT_STATUS_WT_UNREADABLE = (1u << 12),
47
47
 
48
48
  GIT_STATUS_IGNORED = (1u << 14),
49
+ GIT_STATUS_CONFLICTED = (1u << 15),
49
50
  } git_status_t;
50
51
 
51
52
  /**
@@ -130,10 +130,12 @@ typedef struct git_submodule_update_options {
130
130
  git_checkout_options checkout_opts;
131
131
 
132
132
  /**
133
- * Callbacks to use for reporting fetch progress, and for acquiring
133
+ * Options which control the fetch, including callbacks.
134
+ *
135
+ * The callbacks to use for reporting fetch progress, and for acquiring
134
136
  * credentials in the event they are needed.
135
137
  */
136
- git_remote_callbacks remote_callbacks;
138
+ git_fetch_options fetch_opts;
137
139
 
138
140
  /**
139
141
  * The checkout strategy to use when the sub repository needs to
@@ -147,7 +149,7 @@ typedef struct git_submodule_update_options {
147
149
  #define GIT_SUBMODULE_UPDATE_OPTIONS_INIT \
148
150
  { GIT_CHECKOUT_OPTIONS_VERSION, \
149
151
  { GIT_CHECKOUT_OPTIONS_VERSION, GIT_CHECKOUT_SAFE }, \
150
- GIT_REMOTE_CALLBACKS_INIT, GIT_CHECKOUT_SAFE }
152
+ GIT_FETCH_OPTIONS_INIT, GIT_CHECKOUT_SAFE }
151
153
 
152
154
  /**
153
155
  * Initializes a `git_submodule_update_options` with default values.
@@ -298,20 +300,6 @@ GIT_EXTERN(int) git_submodule_add_to_index(
298
300
  git_submodule *submodule,
299
301
  int write_index);
300
302
 
301
- /**
302
- * Write submodule settings to .gitmodules file.
303
- *
304
- * This commits any in-memory changes to the submodule to the gitmodules
305
- * file on disk. You may also be interested in `git_submodule_init()` which
306
- * writes submodule info to ".git/config" (which is better for local changes
307
- * to submodule settings) and/or `git_submodule_sync()` which writes
308
- * settings about remotes to the actual submodule repository.
309
- *
310
- * @param submodule The submodule to write.
311
- * @return 0 on success, <0 on failure.
312
- */
313
- GIT_EXTERN(int) git_submodule_save(git_submodule *submodule);
314
-
315
303
  /**
316
304
  * Get the containing repository for a submodule.
317
305
  *
@@ -371,36 +359,31 @@ GIT_EXTERN(int) git_submodule_resolve_url(git_buf *out, git_repository *repo, co
371
359
  GIT_EXTERN(const char *) git_submodule_branch(git_submodule *submodule);
372
360
 
373
361
  /**
374
- * Set the branch for the submodule.
362
+ * Set the branch for the submodule in the configuration
375
363
  *
376
- * This sets the branch in memory for the submodule. This will be used for
377
- * any following submodule actions while this submodule data is in memory.
378
- *
379
- * After calling this, you may wish to call `git_submodule_save()` to write
380
- * the changes back to the ".gitmodules" file and `git_submodule_sync()` to
364
+ * After calling this, you may wish to call `git_submodule_sync()` to
381
365
  * write the changes to the checked out submodule repository.
382
366
  *
383
- * @param submodule Pointer to the submodule object
367
+ * @param repo the repository to affect
368
+ * @param name the name of the submodule to configure
384
369
  * @param branch Branch that should be used for the submodule
385
370
  * @return 0 on success, <0 on failure
386
371
  */
387
- GIT_EXTERN(int) git_submodule_set_branch(git_submodule *submodule, const char *branch);
372
+ GIT_EXTERN(int) git_submodule_set_branch(git_repository *repo, const char *name, const char *branch);
388
373
 
389
374
  /**
390
- * Set the URL for the submodule.
375
+ * Set the URL for the submodule in the configuration
391
376
  *
392
- * This sets the URL in memory for the submodule. This will be used for
393
- * any following submodule actions while this submodule data is in memory.
394
377
  *
395
- * After calling this, you may wish to call `git_submodule_save()` to write
396
- * the changes back to the ".gitmodules" file and `git_submodule_sync()` to
378
+ * After calling this, you may wish to call `git_submodule_sync()` to
397
379
  * write the changes to the checked out submodule repository.
398
380
  *
399
- * @param submodule Pointer to the submodule object
381
+ * @param repo the repository to affect
382
+ * @param name the name of the submodule to configure
400
383
  * @param url URL that should be used for the submodule
401
384
  * @return 0 on success, <0 on failure
402
385
  */
403
- GIT_EXTERN(int) git_submodule_set_url(git_submodule *submodule, const char *url);
386
+ GIT_EXTERN(int) git_submodule_set_url(git_repository *repo, const char *name, const char *url);
404
387
 
405
388
  /**
406
389
  * Get the OID for the submodule in the index.
@@ -450,9 +433,6 @@ GIT_EXTERN(const git_oid *) git_submodule_wd_id(git_submodule *submodule);
450
433
  * The working directory will be consider clean so long as there is a
451
434
  * checked out version present.
452
435
  *
453
- * plus the special **GIT_SUBMODULE_IGNORE_RESET** which can be used with
454
- * `git_submodule_set_ignore()` to revert to the on-disk setting.
455
- *
456
436
  * @param submodule The submodule to check
457
437
  * @return The current git_submodule_ignore_t valyue what will be used for
458
438
  * this submodule.
@@ -461,32 +441,25 @@ GIT_EXTERN(git_submodule_ignore_t) git_submodule_ignore(
461
441
  git_submodule *submodule);
462
442
 
463
443
  /**
464
- * Set the ignore rule for the submodule.
465
- *
466
- * This sets the in-memory ignore rule for the submodule which will
467
- * control the behavior of `git_submodule_status()`.
444
+ * Set the ignore rule for the submodule in the configuration
468
445
  *
469
- * To make changes persistent, call `git_submodule_save()` to write the
470
- * value to disk (in the ".gitmodules" and ".git/config" files).
446
+ * This does not affect any currently-loaded instances.
471
447
  *
472
- * Call with `GIT_SUBMODULE_IGNORE_RESET` or call `git_submodule_reload()`
473
- * to revert the in-memory rule to the value that is on disk.
474
- *
475
- * @param submodule The submodule to update
448
+ * @param repo the repository to affect
449
+ * @param name the name of the submdule
476
450
  * @param ignore The new value for the ignore rule
477
- * @return old value for ignore
451
+ * @return 0 or an error code
478
452
  */
479
- GIT_EXTERN(git_submodule_ignore_t) git_submodule_set_ignore(
480
- git_submodule *submodule,
453
+ GIT_EXTERN(int) git_submodule_set_ignore(
454
+ git_repository *repo,
455
+ const char *name,
481
456
  git_submodule_ignore_t ignore);
482
457
 
483
458
  /**
484
459
  * Get the update rule that will be used for the submodule.
485
460
  *
486
461
  * This value controls the behavior of the `git submodule update` command.
487
- * There are four useful values documented with `git_submodule_update_t`
488
- * plus the `GIT_SUBMODULE_UPDATE_RESET` which can be used to revert to
489
- * the on-disk setting.
462
+ * There are four useful values documented with `git_submodule_update_t`.
490
463
  *
491
464
  * @param submodule The submodule to check
492
465
  * @return The current git_submodule_update_t value that will be used
@@ -496,23 +469,18 @@ GIT_EXTERN(git_submodule_update_t) git_submodule_update_strategy(
496
469
  git_submodule *submodule);
497
470
 
498
471
  /**
499
- * Set the update rule for the submodule.
500
- *
501
- * The initial value comes from the ".git/config" setting of
502
- * `submodule.$name.update` for this submodule (which is initialized from
503
- * the ".gitmodules" file). Using this function sets the update rule in
504
- * memory for the submodule. Call `git_submodule_save()` to write out the
505
- * new update rule.
472
+ * Set the update rule for the submodule in the configuration
506
473
  *
507
- * Calling this again with GIT_SUBMODULE_UPDATE_RESET or calling
508
- * `git_submodule_reload()` will revert the rule to the on disk value.
474
+ * This setting won't affect any existing instances.
509
475
  *
510
- * @param submodule The submodule to update
476
+ * @param repo the repository to affect
477
+ * @param name the name of the submodule to configure
511
478
  * @param update The new value to use
512
- * @return old value for update
479
+ * @return 0 or an error code
513
480
  */
514
- GIT_EXTERN(git_submodule_update_t) git_submodule_set_update(
515
- git_submodule *submodule,
481
+ GIT_EXTERN(int) git_submodule_set_update(
482
+ git_repository *repo,
483
+ const char *name,
516
484
  git_submodule_update_t update);
517
485
 
518
486
  /**
@@ -530,18 +498,18 @@ GIT_EXTERN(git_submodule_recurse_t) git_submodule_fetch_recurse_submodules(
530
498
  git_submodule *submodule);
531
499
 
532
500
  /**
533
- * Set the fetchRecurseSubmodules rule for a submodule.
501
+ * Set the fetchRecurseSubmodules rule for a submodule in the configuration
534
502
  *
535
- * This sets the submodule.<name>.fetchRecurseSubmodules value for
536
- * the submodule. You should call `git_submodule_save()` if you want
537
- * to persist the new value.
503
+ * This setting won't affect any existing instances.
538
504
  *
539
- * @param submodule The submodule to modify
505
+ * @param repo the repository to affect
506
+ * @param name the submodule to configure
540
507
  * @param fetch_recurse_submodules Boolean value
541
508
  * @return old value for fetchRecurseSubmodules
542
509
  */
543
- GIT_EXTERN(git_submodule_recurse_t) git_submodule_set_fetch_recurse_submodules(
544
- git_submodule *submodule,
510
+ GIT_EXTERN(int) git_submodule_set_fetch_recurse_submodules(
511
+ git_repository *repo,
512
+ const char *name,
545
513
  git_submodule_recurse_t fetch_recurse_submodules);
546
514
 
547
515
  /**
@@ -632,16 +600,19 @@ GIT_EXTERN(int) git_submodule_reload_all(git_repository *repo, int force);
632
600
  * This looks at a submodule and tries to determine the status. It
633
601
  * will return a combination of the `GIT_SUBMODULE_STATUS` values above.
634
602
  * How deeply it examines the working directory to do this will depend
635
- * on the `git_submodule_ignore_t` value for the submodule - which can be
636
- * set either temporarily or permanently with `git_submodule_set_ignore()`.
603
+ * on the `git_submodule_ignore_t` value for the submodule.
637
604
  *
638
605
  * @param status Combination of `GIT_SUBMODULE_STATUS` flags
639
- * @param submodule Submodule for which to get status
606
+ * @param repo the repository in which to look
607
+ * @param name name of the submodule
608
+ * @param ignore the ignore rules to follow
640
609
  * @return 0 on success, <0 on error
641
610
  */
642
611
  GIT_EXTERN(int) git_submodule_status(
643
612
  unsigned int *status,
644
- git_submodule *submodule);
613
+ git_repository *repo,
614
+ const char *name,
615
+ git_submodule_ignore_t ignore);
645
616
 
646
617
  /**
647
618
  * Get the locations of submodule information.
@@ -53,7 +53,7 @@ struct git_odb_backend {
53
53
  git_odb_backend *, const git_oid *, const void *, size_t, git_otype);
54
54
 
55
55
  int (* writestream)(
56
- git_odb_stream **, git_odb_backend *, size_t, git_otype);
56
+ git_odb_stream **, git_odb_backend *, git_off_t, git_otype);
57
57
 
58
58
  int (* readstream)(
59
59
  git_odb_stream **, git_odb_backend *, const git_oid *);
@@ -29,8 +29,10 @@ typedef struct git_stream {
29
29
  int version;
30
30
 
31
31
  int encrypted;
32
+ int proxy_support;
32
33
  int (*connect)(struct git_stream *);
33
34
  int (*certificate)(git_cert **, struct git_stream *);
35
+ int (*set_proxy)(struct git_stream *, const char *proxy_url);
34
36
  ssize_t (*read)(struct git_stream *, void *, size_t);
35
37
  ssize_t (*write)(struct git_stream *, const char *, size_t, int);
36
38
  int (*close)(struct git_stream *);
@@ -30,8 +30,6 @@ typedef enum {
30
30
  GIT_TRANSPORTFLAGS_NONE = 0,
31
31
  } git_transport_flags_t;
32
32
 
33
- typedef struct git_transport git_transport;
34
-
35
33
  struct git_transport {
36
34
  unsigned int version;
37
35
  /* Set progress and error callbacks */
@@ -61,7 +59,7 @@ struct git_transport {
61
59
  git_transport *transport);
62
60
 
63
61
  /* Executes the push whose context is in the git_push object. */
64
- int (*push)(git_transport *transport, git_push *push);
62
+ int (*push)(git_transport *transport, git_push *push, const git_remote_callbacks *callbacks);
65
63
 
66
64
  /* This function may be called after a successful call to connect(), when
67
65
  * the direction is FETCH. The function performs a negotiation to calculate
@@ -142,9 +140,6 @@ GIT_EXTERN(int) git_transport_new(git_transport **out, git_remote *owner, const
142
140
  */
143
141
  GIT_EXTERN(int) git_transport_ssh_with_paths(git_transport **out, git_remote *owner, void *payload);
144
142
 
145
- /* Signature of a function which creates a transport */
146
- typedef int (*git_transport_cb)(git_transport **out, git_remote *owner, void *param);
147
-
148
143
  /**
149
144
  * Add a custom transport definition, to be used in addition to the built-in
150
145
  * set of transports that come with libgit2.
@@ -353,21 +348,6 @@ GIT_EXTERN(int) git_smart_subtransport_ssh(
353
348
  git_transport* owner,
354
349
  void *param);
355
350
 
356
- /**
357
- * Sets a custom transport factory for the remote. The caller can use this
358
- * function to override the transport used for this remote when performing
359
- * network operations.
360
- *
361
- * @param remote the remote to configure
362
- * @param transport_cb the function to use to create a transport
363
- * @param payload opaque parameter passed to transport_cb
364
- * @return 0 or an error code
365
- */
366
- GIT_EXTERN(int) git_remote_set_transport(
367
- git_remote *remote,
368
- git_transport_cb transport_cb,
369
- void *payload);
370
-
371
351
  /** @} */
372
352
  GIT_END_DECL
373
353
  #endif