]>
Commit | Line | Data |
---|---|---|
c21c8f67 CMN |
1 | v0.24 + 1 |
2 | ------- | |
3 | ||
4 | ### Changes or improvements | |
5 | ||
6 | ### API additions | |
7 | ||
47cb42da CMN |
8 | * `git_commit_create_buffer()` creates a commit and writes it into a |
9 | user-provided buffer instead of writing it into the object db. | |
10 | ||
e2bb9ed3 CMN |
11 | * `git_blob_create_fromstream()` and |
12 | `git_blob_create_fromstream_commit()` allow you to create a blob by | |
13 | writing into a stream. Useful when you do not know the final size or | |
14 | want to copy the contents from another stream. | |
15 | ||
c21c8f67 CMN |
16 | ### API removals |
17 | ||
6669e3e8 CMN |
18 | * `git_blob_create_fromchunks()` has been removed in favour of |
19 | `git_blob_create_fromstream()`. | |
20 | ||
21 | ||
c21c8f67 CMN |
22 | ### Breaking API changes |
23 | ||
24 | v0.24 | |
159061a8 CMN |
25 | ------- |
26 | ||
27 | ### Changes or improvements | |
28 | ||
30a94ab7 ET |
29 | * Custom merge drivers can now be registered, which allows callers to |
30 | configure callbacks to honor `merge=driver` configuration in | |
31 | `.gitattributes`. | |
32 | ||
9a99ca7b ET |
33 | * Custom filters can now be registered with wildcard attributes, for |
34 | example `filter=*`. Consumers should examine the attributes parameter | |
35 | of the `check` function for details. | |
36 | ||
d83b2e9f CMN |
37 | * Symlinks are now followed when locking a file, which can be |
38 | necessary when multiple worktrees share a base repository. | |
39 | ||
027bbaa7 CMN |
40 | * You can now set your own user-agent to be sent for HTTP requests by |
41 | using the `GIT_OPT_SET_USER_AGENT` with `git_libgit2_opts()`. | |
42 | ||
82885255 CMN |
43 | * You can set custom HTTP header fields to be sent along with requests |
44 | by passing them in the fetch and push options. | |
45 | ||
fc436469 CMN |
46 | * Tree objects are now assumed to be sorted. If a tree is not |
47 | correctly formed, it will give bad results. This is the git approach | |
48 | and cuts a significant amount of time when reading the trees. | |
49 | ||
f596946f CMN |
50 | * Filter registration is now protected against concurrent |
51 | registration. | |
52 | ||
53 | * Filenames which are not valid on Windows in an index no longer cause | |
54 | to fail to parse it on that OS. | |
55 | ||
56 | * Rebases can now be performed purely in-memory, without touching the | |
57 | repository's workdir. | |
58 | ||
f2dddf52 ET |
59 | * When adding objects to the index, or when creating new tree or commit |
60 | objects, the inputs are validated to ensure that the dependent objects | |
61 | exist and are of the correct type. This object validation can be | |
62 | disabled with the GIT_OPT_ENABLE_STRICT_OBJECT_CREATION option. | |
63 | ||
a7ef27af CMN |
64 | * The WinHTTP transport's handling of bad credentials now behaves like |
65 | the others, asking for credentials again. | |
66 | ||
159061a8 CMN |
67 | ### API additions |
68 | ||
5340d63d CMN |
69 | * `git_config_lock()` has been added, which allow for |
70 | transactional/atomic complex updates to the configuration, removing | |
71 | the opportunity for concurrent operations and not committing any | |
72 | changes until the unlock. | |
36f784b5 | 73 | |
3138ad93 JH |
74 | * `git_diff_options` added a new callback `progress_cb` to report on the |
75 | progress of the diff as files are being compared. The documentation of | |
76 | the existing callback `notify_cb` was updated to reflect that it only | |
77 | gets called when new deltas are added to the diff. | |
78 | ||
82885255 CMN |
79 | * `git_fetch_options` and `git_push_options` have gained a `custom_headers` |
80 | field to set the extra HTTP header fields to send. | |
81 | ||
7fafde63 CMN |
82 | * `git_stream_register_tls()` lets you register a callback to be used |
83 | as the constructor for a TLS stream instead of the libgit2 built-in | |
84 | one. | |
85 | ||
f596946f CMN |
86 | * `git_commit_header_field()` allows you to look up a specific header |
87 | field in a commit. | |
88 | ||
89 | * `git_commit_extract_signature()` extracts the signature from a | |
90 | commit and gives you both the signature and the signed data so you | |
91 | can verify it. | |
92 | ||
159061a8 CMN |
93 | ### API removals |
94 | ||
c21c8f67 CMN |
95 | * No APIs were removed in this version. |
96 | ||
79698030 ET |
97 | ### Breaking API changes |
98 | ||
30a94ab7 ET |
99 | * `git_merge_options` now provides a `default_driver` that can be used |
100 | to provide the name of a merge driver to be used to handle files changed | |
101 | during a merge. | |
102 | ||
fa78782f ET |
103 | * The `git_merge_tree_flag_t` is now `git_merge_flag_t`. Subsequently, |
104 | its members are no longer prefixed with `GIT_MERGE_TREE_FLAG` but are | |
105 | now prefixed with `GIT_MERGE_FLAG`, and the `tree_flags` field of the | |
106 | `git_merge_options` structure is now named `flags`. | |
107 | ||
108 | * The `git_merge_file_flags_t` enum is now `git_merge_file_flag_t` for | |
109 | consistency with other enum type names. | |
110 | ||
79698030 ET |
111 | * `git_cert` descendent types now have a proper `parent` member |
112 | ||
fec4a68c | 113 | * It is the responsibility of the refdb backend to decide what to do |
01d0c02d CMN |
114 | with the reflog on ref deletion. The file-based backend must delete |
115 | it, a database-backed one may wish to archive it. | |
116 | ||
36f784b5 CMN |
117 | * `git_config_backend` has gained two entries. `lock` and `unlock` |
118 | with which to implement the transactional/atomic semantics for the | |
119 | configuration backend. | |
120 | ||
ad8509ef CMN |
121 | * `git_index_add` and `git_index_conflict_add()` will now use the case |
122 | as provided by the caller on case insensitive systems. Previous | |
123 | versions would keep the case as it existed in the index. This does | |
124 | not affect the higher-level `git_index_add_bypath` or | |
125 | `git_index_add_frombuffer` functions. | |
a32bc85e | 126 | |
3138ad93 JH |
127 | * The `notify_payload` field of `git_diff_options` was renamed to `payload` |
128 | to reflect that it's also the payload for the new progress callback. | |
129 | ||
82885255 CMN |
130 | * The `git_config_level_t` enum has gained a higher-priority value |
131 | `GIT_CONFIG_LEVEL_PROGRAMDATA` which represent a rough Windows equivalent | |
132 | to the system level configuration. | |
133 | ||
0b24855e | 134 | * `git_rebase_options` now has a `merge_options` field. |
f596946f CMN |
135 | |
136 | * The index no longer performs locking itself. This is not something | |
137 | users of the library should have been relying on as it's not part of | |
138 | the concurrency guarantees. | |
139 | ||
0b24855e JF |
140 | * `git_remote_connect()` now takes a `custom_headers` argument to set |
141 | the extra HTTP header fields to send. | |
142 | ||
159061a8 | 143 | v0.23 |
c8b64f70 CMN |
144 | ------ |
145 | ||
16bcf0c7 CMN |
146 | ### Changes or improvements |
147 | ||
70b0f128 JG |
148 | * Patience and minimal diff drivers can now be used for merges. |
149 | ||
150 | * Merges can now ignore whitespace changes. | |
151 | ||
0161e096 SS |
152 | * Updated binary identification in CRLF filtering to avoid false positives in |
153 | UTF-8 files. | |
154 | ||
4d6f55ac ET |
155 | * Rename and copy detection is enabled for small files. |
156 | ||
96b82b11 ET |
157 | * Checkout can now handle an initial checkout of a repository, making |
158 | `GIT_CHECKOUT_SAFE_CREATE` unnecessary for users of clone. | |
159 | ||
659cf202 CMN |
160 | * The signature parameter in the ref-modifying functions has been |
161 | removed. Use `git_repository_set_ident()` and | |
162 | `git_repository_ident()` to override the signature to be used. | |
163 | ||
0ef54a63 CMN |
164 | * The local transport now auto-scales the number of threads to use |
165 | when creating the packfile instead of sticking to one. | |
166 | ||
8acf058f CMN |
167 | * Reference renaming now uses the right id for the old value. |
168 | ||
169 | * The annotated version of branch creation, HEAD detaching and reset | |
170 | allow for specifying the expression from the user to be put into the | |
171 | reflog. | |
172 | ||
aa9bb425 | 173 | * `git_rebase_commit` now returns `GIT_EUNMERGED` when you attempt to |
eaf0d688 ET |
174 | commit with unstaged changes. |
175 | ||
85247df0 | 176 | * On Mac OS X, we now use SecureTransport to provide the cryptographic |
ca2466ff | 177 | support for HTTPS connections insead of OpenSSL. |
85247df0 | 178 | |
1f1f5c63 ET |
179 | * Checkout can now accept an index for the baseline computations via the |
180 | `baseline_index` member. | |
181 | ||
b1ae3e53 CMN |
182 | * The configuration for fetching is no longer stored inside the |
183 | `git_remote` struct but has been moved to a `git_fetch_options`. The | |
184 | remote functions now take these options or the callbacks instead of | |
185 | setting them beforehand. | |
186 | ||
ca2466ff CMN |
187 | * `git_submodule` instances are no longer cached or shared across |
188 | lookup. Each submodule represents the configuration at the time of | |
189 | loading. | |
190 | ||
874cc35a CMN |
191 | * The index now uses diffs for `add_all()` and `update_all()` which |
192 | gives it a speed boost and closer semantics to git. | |
193 | ||
e3435673 CMN |
194 | * The ssh transport now reports the stderr output from the server as |
195 | the error message, which allows you to get the "repository not | |
196 | found" messages. | |
197 | ||
ecd60a56 ET |
198 | * `git_index_conflict_add()` will remove staged entries that exist for |
199 | conflicted paths. | |
b1ae3e53 | 200 | |
10549a2d ET |
201 | * The flags for a `git_diff_file` will now have the `GIT_DIFF_FLAG_EXISTS` |
202 | bit set when a file exists on that side of the diff. This is useful | |
203 | for understanding whether a side of the diff exists in the presence of | |
204 | a conflict. | |
b1ae3e53 | 205 | |
a5670d4f CMN |
206 | * The constructor for a write-stream into the odb now takes |
207 | `git_off_t` instead of `size_t` for the size of the blob, which | |
208 | allows putting large files into the odb on 32-bit systems. | |
209 | ||
771069e1 PS |
210 | * The remote's push and pull URLs now honor the url.$URL.insteadOf |
211 | configuration. This allows modifying URL prefixes to a custom | |
212 | value via gitconfig. | |
213 | ||
0e522f6e ET |
214 | * `git_diff_foreach`, `git_diff_blobs`, `git_diff_blob_to_buffer`, |
215 | and `git_diff_buffers` now accept a new binary callback of type | |
216 | `git_diff_binary_cb` that includes the binary diff information. | |
217 | ||
bb4896f2 CMN |
218 | * The race condition mitigations described in `racy-git.txt` have been |
219 | implemented. | |
220 | ||
ede517bc CMN |
221 | * If libcurl is installed, we will use it to connect to HTTP(S) |
222 | servers. | |
223 | ||
16bcf0c7 CMN |
224 | ### API additions |
225 | ||
70b0f128 JG |
226 | * The `git_merge_options` gained a `file_flags` member. |
227 | ||
eac773d9 CMN |
228 | * Parsing and retrieving a configuration value as a path is exposed |
229 | via `git_config_parse_path()` and `git_config_get_path()` | |
230 | respectively. | |
231 | ||
659cf202 CMN |
232 | * `git_repository_set_ident()` and `git_repository_ident()` serve to |
233 | set and query which identity will be used when writing to the | |
234 | reflog. | |
235 | ||
9a97f49e CMN |
236 | * `git_config_entry_free()` frees a config entry. |
237 | ||
238 | * `git_config_get_string_buf()` provides a way to safely retrieve a | |
239 | string from a non-snapshot configuration. | |
240 | ||
8acf058f CMN |
241 | * `git_annotated_commit_from_revspec()` allows to get an annotated |
242 | commit from an extended sha synatx string. | |
243 | ||
244 | * `git_repository_set_head_detached_from_annotated()`, | |
245 | `git_branch_create_from_annotated()` and | |
246 | `git_reset_from_annotated()` allow for the caller to provide an | |
247 | annotated commit through which they can control what expression is | |
248 | put into the reflog as the source/target. | |
d578b45f | 249 | |
a275fbc0 | 250 | * `git_index_add_frombuffer()` can now create a blob from memory |
b1ae3e53 CMN |
251 | buffer and add it to the index which is attached to a repository. |
252 | ||
253 | * The structure `git_fetch_options` has been added to determine the | |
254 | runtime configuration for fetching, such as callbacks, pruning and | |
255 | autotag behaviour. It has the runtime initializer | |
256 | `git_fetch_init_options()`. | |
257 | ||
258 | * The enum `git_fetch_prune_t` has been added, letting you specify the | |
259 | pruning behaviour for a fetch. | |
a275fbc0 | 260 | |
a5670d4f CMN |
261 | * A push operation will notify the caller of what updates it indends |
262 | to perform on the remote, which provides similar information to | |
263 | git's pre-push hook. | |
264 | ||
15fdf054 ET |
265 | * `git_stash_apply()` can now apply a stashed state from the stash list, |
266 | placing the data into the working directory and index. | |
267 | ||
268 | * `git_stash_pop()` will apply a stashed state (like `git_stash_apply()`) | |
269 | but will remove the stashed state after a successful application. | |
270 | ||
1396c381 CMN |
271 | * A new error code `GIT_EEOF` indicates an early EOF from the |
272 | server. This typically indicates an error with the URL or | |
273 | configuration of the server, and tools can use this to show messages | |
274 | about failing to communicate with the server. | |
275 | ||
3cf91d98 CMN |
276 | * A new error code `GIT_EINVALID` indicates that an argument to a |
277 | function is invalid, or an invalid operation was requested. | |
278 | ||
7c948014 ET |
279 | * `git_diff_index_to_workdir()` and `git_diff_tree_to_index()` will now |
280 | produce deltas of type `GIT_DELTA_CONFLICTED` to indicate that the index | |
281 | side of the delta is a conflict. | |
282 | ||
283 | * The `git_status` family of functions will now produce status of type | |
284 | `GIT_STATUS_CONFLICTED` to indicate that a conflict exists for that file | |
285 | in the index. | |
286 | ||
9f545b9d ET |
287 | * `git_index_entry_is_conflict()` is a utility function to determine if |
288 | a given index entry has a non-zero stage entry, indicating that it is | |
289 | one side of a conflict. | |
290 | ||
a5670d4f CMN |
291 | * It is now possible to pass a keypair via a buffer instead of a |
292 | path. For this, `GIT_CREDTYPE_SSH_MEMORY` and | |
293 | `git_cred_ssh_key_memory_new()` have been added. | |
294 | ||
2eecc288 ET |
295 | * `git_filter_list_contains` will indicate whether a particular |
296 | filter will be run in the given filter list. | |
297 | ||
a3f42fe8 CMN |
298 | * `git_commit_header_field()` has been added, which allows retrieving |
299 | the contents of an arbitrary header field. | |
300 | ||
ca2466ff CMN |
301 | * `git_submodule_set_branch()` allows to set the configured branch for |
302 | a submodule. | |
303 | ||
16bcf0c7 CMN |
304 | ### API removals |
305 | ||
9663d1bd | 306 | * `git_remote_save()` and `git_remote_clear_refspecs()` have been |
b1ae3e53 CMN |
307 | removed. Remote's configuration is changed via the configuration |
308 | directly or through a convenience function which performs changes to | |
309 | the configuration directly. | |
310 | ||
311 | * `git_remote_set_callbacks()`, `git_remote_get_callbacks()` and | |
9663d1bd | 312 | `git_remote_set_transport()` have been removed and the remote no |
b1ae3e53 CMN |
313 | longer stores this configuration. |
314 | ||
70f7484d CMN |
315 | * `git_remote_set_fetch_refpecs()` and |
316 | `git_remote_set_push_refspecs()` have been removed. There is no | |
317 | longer a way to set the base refspecs at run-time. | |
318 | ||
ca2466ff CMN |
319 | * `git_submodule_save()` has been removed. The submodules are no |
320 | longer configured via the objects. | |
321 | ||
34065968 CMN |
322 | * `git_submodule_reload_all()` has been removed as we no longer cache |
323 | submodules. | |
324 | ||
16bcf0c7 CMN |
325 | ### Breaking API changes |
326 | ||
bf2ba529 JM |
327 | * `git_smart_subtransport_cb` now has a `param` parameter. |
328 | ||
70b0f128 JG |
329 | * The `git_merge_options` structure member `flags` has been renamed |
330 | to `tree_flags`. | |
331 | ||
b8c50808 | 332 | * The `git_merge_file_options` structure member `flags` is now |
70b0f128 JG |
333 | an unsigned int. It was previously a `git_merge_file_flags_t`. |
334 | ||
96b82b11 ET |
335 | * `GIT_CHECKOUT_SAFE_CREATE` has been removed. Most users will generally |
336 | be able to switch to `GIT_CHECKOUT_SAFE`, but if you require missing | |
337 | file handling during checkout, you may now use `GIT_CHECKOUT_SAFE | | |
338 | GIT_CHECKOUT_RECREATE_MISSING`. | |
339 | ||
41513659 CMN |
340 | * The `git_clone_options` and `git_submodule_update_options` |
341 | structures no longer have a `signature` field. | |
342 | ||
343 | * The following functions have removed the signature and/or log message | |
344 | parameters in favour of git-emulating ones. | |
345 | ||
346 | * `git_branch_create()`, `git_branch_move()` | |
347 | * `git_rebase_init()`, `git_rebase_abort()` | |
348 | * `git_reference_symbolic_create_matching()`, | |
349 | `git_reference_symbolic_create()`, `git_reference_create()`, | |
350 | `git_reference_create_matching()`, | |
351 | `git_reference_symbolic_set_target()`, | |
352 | `git_reference_set_target()`, `git_reference_rename()` | |
353 | * `git_remote_update_tips()`, `git_remote_fetch()`, `git_remote_push()` | |
354 | * `git_repository_set_head()`, | |
355 | `git_repository_set_head_detached()`, | |
356 | `git_repository_detach_head()` | |
357 | * `git_reset()` | |
358 | ||
9a97f49e CMN |
359 | * `git_config_get_entry()` now gives back a ref-counted |
360 | `git_config_entry`. You must free it when you no longer need it. | |
361 | ||
362 | * `git_config_get_string()` will return an error if used on a | |
363 | non-snapshot configuration, as there can be no guarantee that the | |
364 | returned pointer is valid. | |
365 | ||
385449b1 CMN |
366 | * `git_note_default_ref()` now uses a `git_buf` to return the string, |
367 | as the string is otherwise not guaranteed to stay allocated. | |
368 | ||
30640aa9 ET |
369 | * `git_rebase_operation_current()` will return `GIT_REBASE_NO_OPERATION` |
370 | if it is called immediately after creating a rebase session but before | |
371 | you have applied the first patch. | |
372 | ||
a5670d4f CMN |
373 | * `git_rebase_options` now contains a `git_checkout_options` struct |
374 | that will be used for functions that modify the working directory, | |
88ab3be6 CMN |
375 | namely `git_rebase_init`, `git_rebase_next` and |
376 | `git_rebase_abort`. As a result, `git_rebase_open` now also takes | |
a5670d4f | 377 | a `git_rebase_options` and only the `git_rebase_init` and |
f3a199dd ET |
378 | `git_rebase_open` functions take a `git_rebase_options`, where they |
379 | will persist the options to subsequent `git_rebase` calls. | |
380 | ||
b1ae3e53 CMN |
381 | * The `git_clone_options` struct now has fetch options in a |
382 | `fetch_opts` field instead of remote callbacks in | |
383 | `remote_callbacks`. | |
384 | ||
a5670d4f CMN |
385 | * The remote callbacks has gained a new member `push_negotiation` |
386 | which gets called before sending the update commands to the server. | |
387 | ||
ca2466ff | 388 | * The following functions no longer act on a remote instance but |
b1ae3e53 CMN |
389 | change the repository's configuration. Their signatures have changed |
390 | accordingly: | |
391 | ||
392 | * `git_remote_set_url()`, `git_remote_seturl()` | |
393 | * `git_remote_add_fetch()`, `git_remote_add_push()` and | |
394 | * `git_remote_set_autotag()` | |
395 | ||
396 | * `git_remote_connect()` and `git_remote_prune()` now take a pointer | |
397 | to the callbacks. | |
398 | ||
9663d1bd | 399 | * `git_remote_fetch()` and `git_remote_download()` now take a pointer |
b1ae3e53 CMN |
400 | to fetch options which determine the runtime configuration. |
401 | ||
402 | * The `git_remote_autotag_option_t` values have been changed. It has | |
c2418f46 | 403 | gained a `_UNSPECIFIED` default value to specify no override for the |
b1ae3e53 CMN |
404 | configured setting. |
405 | ||
406 | * `git_remote_update_tips()` now takes a pointer to the callbacks as | |
407 | well as a boolean whether to write `FETCH_HEAD` and the autotag | |
408 | setting. | |
409 | ||
ae5b9362 CMN |
410 | * `git_remote_create_anonymous()` no longer takes a fetch refspec as |
411 | url-only remotes cannot have configured refspecs. | |
412 | ||
b1ae3e53 CMN |
413 | * The `git_submodule_update_options` struct now has fetch options in |
414 | the `fetch_opts` field instead of callbacks in the | |
415 | `remote_callbacks` field. | |
416 | ||
ca2466ff CMN |
417 | * The following functions no longer act on a submodule instance but |
418 | change the repository's configuration. Their signatures have changed | |
419 | accordingly: | |
420 | ||
421 | * `git_submodule_set_url()`, `git_submodule_set_ignore()`, | |
422 | `git_submodule_set_update()`, | |
423 | `git_submodule_set_fetch_recurse_submodules()`. | |
424 | ||
425 | * `git_submodule_status()` no longer takes a submodule instance but a | |
426 | repsitory, a submodule name and an ignore setting. | |
427 | ||
b1ae3e53 CMN |
428 | * The `push` function in the `git_transport` interface now takes a |
429 | pointer to the remote callbacks. | |
430 | ||
98270f56 CMN |
431 | * The `git_index_entry` struct's fields' types have been changed to |
432 | more accurately reflect what is in fact stored in the | |
433 | index. Specifically, time and file size are 32 bits intead of 64, as | |
434 | these values are truncated. | |
435 | ||
885b94aa ET |
436 | * `GIT_EMERGECONFLICT` is now `GIT_ECONFLICT`, which more accurately |
437 | describes the nature of the error. | |
438 | ||
3cf91d98 CMN |
439 | * It is no longer allowed to call `git_buf_grow()` on buffers |
440 | borrowing the memory they point to. | |
441 | ||
c8b64f70 | 442 | v0.22 |
d30447cb CMN |
443 | ------ |
444 | ||
b91f28be | 445 | ### Changes or improvements |
e1fc03c9 | 446 | |
b91f28be | 447 | * `git_signature_new()` now requires a non-empty email address. |
274c3fa6 | 448 | |
b91f28be | 449 | * Use CommonCrypto libraries for SHA-1 calculation on Mac OS X. |
d412165f | 450 | |
b91f28be CMN |
451 | * Disable SSL compression and SSLv2 and SSLv3 ciphers in favor of TLSv1 |
452 | in OpenSSL. | |
d412165f | 453 | |
b91f28be CMN |
454 | * The fetch behavior of remotes with autotag set to `GIT_REMOTE_DOWNLOAD_TAGS_ALL` |
455 | has been changed to match git 1.9.0 and later. In this mode, libgit2 now | |
456 | fetches all tags in addition to whatever else needs to be fetched. | |
c180c065 | 457 | |
b91f28be CMN |
458 | * `git_checkout()` now handles case-changing renames correctly on |
459 | case-insensitive filesystems; for example renaming "readme" to "README". | |
7449c82e | 460 | |
b91f28be CMN |
461 | * The search for libssh2 is now done via pkg-config instead of a |
462 | custom search of a few directories. | |
3753110a | 463 | |
b91f28be CMN |
464 | * Add support for core.protectHFS and core.protectNTFS. Add more |
465 | validation for filenames which we write such as references. | |
5192bcc5 | 466 | |
b91f28be CMN |
467 | * The local transport now generates textual progress output like |
468 | git-upload-pack does ("counting objects"). | |
c180c065 | 469 | |
b91f28be CMN |
470 | * `git_checkout_index()` can now check out an in-memory index that is not |
471 | necessarily the repository's index, so you may check out an index | |
472 | that was produced by git_merge and friends while retaining the cached | |
473 | information. | |
1697cd6f | 474 | |
b91f28be CMN |
475 | * Remove the default timeout for receiving / sending data over HTTP using |
476 | the WinHTTP transport layer. | |
d4256ed5 | 477 | |
b91f28be | 478 | * Add SPNEGO (Kerberos) authentication using GSSAPI on Unix systems. |
46c8f7f8 | 479 | |
b91f28be CMN |
480 | * Provide built-in objects for the empty blob (e69de29) and empty |
481 | tree (4b825dc) objects. | |
262eec23 | 482 | |
b91f28be CMN |
483 | * The index' tree cache is now filled upon read-tree and write-tree |
484 | and the cache is written to disk. | |
0862f617 | 485 | |
b91f28be | 486 | * LF -> CRLF filter refuses to handle mixed-EOL files |
1697cd6f | 487 | |
b91f28be | 488 | * LF -> CRLF filter now runs when * text = auto (with Git for Windows 1.9.4) |
1697cd6f | 489 | |
b91f28be CMN |
490 | * File unlocks are atomic again via rename. Read-only files on Windows are |
491 | made read-write if necessary. | |
d58a64e9 | 492 | |
b91f28be | 493 | * Share open packfiles across repositories to share descriptors and mmaps. |
6812afaf | 494 | |
b91f28be | 495 | * Use a map for the treebuilder, making insertion O(1) |
2cd3cb8e | 496 | |
b91f28be CMN |
497 | * The build system now accepts an option EMBED_SSH_PATH which when set |
498 | tells it to include a copy of libssh2 at the given location. This is | |
499 | enabled for MSVC. | |
9fef46de CMN |
500 | |
501 | * Add support for refspecs with the asterisk in the middle of a | |
502 | pattern. | |
7db0e6ee | 503 | |
c5837cad CMN |
504 | * Fetching now performs opportunistic updates. To achieve this, we |
505 | introduce a difference between active and passive refspecs, which | |
b91f28be | 506 | make `git_remote_download()` and `git_remote_fetch()` to take a list of |
c5837cad CMN |
507 | resfpecs to be the active list, similarly to how git fetch accepts a |
508 | list on the command-line. | |
509 | ||
b91f28be CMN |
510 | * The THREADSAFE option to build libgit2 with threading support has |
511 | been flipped to be on by default. | |
209425ce | 512 | |
b91f28be CMN |
513 | * The remote object has learnt to prune remote-tracking branches. If |
514 | the remote is configured to do so, this will happen via | |
515 | `git_remote_fetch()`. You can also call `git_remote_prune()` after | |
516 | connecting or fetching to perform the prune. | |
517 | ||
518 | ||
519 | ### API additions | |
d524b2d3 | 520 | |
b91f28be CMN |
521 | * Introduce `git_buf_text_is_binary()` and `git_buf_text_contains_nul()` for |
522 | consumers to perform binary detection on a git_buf. | |
523 | ||
524 | * `git_branch_upstream_remote()` has been introduced to provide the | |
525 | branch.<name>.remote configuration value. | |
526 | ||
527 | * Introduce `git_describe_commit()` and `git_describe_workdir()` to provide | |
528 | a description of the current commit (and working tree, respectively) | |
529 | based on the nearest tag or reference | |
530 | ||
531 | * Introduce `git_merge_bases()` and the `git_oidarray` type to expose all | |
7db0e6ee | 532 | merge bases between two commits. |
eca07bcd | 533 | |
b91f28be | 534 | * Introduce `git_merge_bases_many()` to expose all merge bases between |
eca07bcd | 535 | multiple commits. |
67917281 | 536 | |
67917281 | 537 | * Introduce rebase functionality (using the merge algorithm only). |
b91f28be CMN |
538 | Introduce `git_rebase_init()` to begin a new rebase session, |
539 | `git_rebase_open()` to open an in-progress rebase session, | |
540 | `git_rebase_commit()` to commit the current rebase operation, | |
541 | `git_rebase_next()` to apply the next rebase operation, | |
542 | `git_rebase_abort()` to abort an in-progress rebase and `git_rebase_finish()` | |
67917281 ET |
543 | to complete a rebase operation. |
544 | ||
b91f28be CMN |
545 | * Introduce `git_note_author()` and `git_note_committer()` to get the author |
546 | and committer information on a `git_note`, respectively. | |
79b0ae4e | 547 | |
b91f28be CMN |
548 | * A factory function for ssh has been added which allows to change the |
549 | path of the programs to execute for receive-pack and upload-pack on | |
550 | the server, `git_transport_ssh_with_paths()`. | |
21083a71 | 551 | |
b91f28be CMN |
552 | * The ssh transport supports asking the remote host for accepted |
553 | credential types as well as multiple challeges using a single | |
554 | connection. This requires to know which username you want to connect | |
555 | as, so this introduces the USERNAME credential type which the ssh | |
556 | transport will use to ask for the username. | |
d88766c4 | 557 | |
b91f28be CMN |
558 | * The `GIT_EPEEL` error code has been introduced when we cannot peel a tag |
559 | to the requested object type; if the given object otherwise cannot be | |
560 | peeled, `GIT_EINVALIDSPEC` is returned. | |
68182085 | 561 | |
b91f28be CMN |
562 | * Introduce `GIT_REPOSITORY_INIT_RELATIVE_GITLINK` to use relative paths |
563 | when writing gitlinks, as is used by git core for submodules. | |
e284c451 | 564 | |
b91f28be | 565 | * `git_remote_prune()` has been added. See above for description. |
799e22ea | 566 | |
8aba3d47 | 567 | |
b91f28be CMN |
568 | * Introduce reference transactions, which allow multiple references to |
569 | be locked at the same time and updates be queued. This also allows | |
570 | us to safely update a reflog with arbitrary contents, as we need to | |
571 | do for stash. | |
6d91dc53 | 572 | |
b91f28be | 573 | ### API removals |
dce7b1a4 | 574 | |
b91f28be CMN |
575 | * `git_remote_supported_url()` and `git_remote_is_valid_url()` have been |
576 | removed as they have become essentially useless with rsync-style ssh paths. | |
577 | ||
578 | * `git_clone_into()` and `git_clone_local_into()` have been removed from the | |
579 | public API in favour of `git_clone callbacks`. | |
580 | ||
581 | * The option to ignore certificate errors via `git_remote_cert_check()` | |
582 | is no longer present. Instead, `git_remote_callbacks` has gained a new | |
583 | entry which lets the user perform their own certificate checks. | |
584 | ||
585 | ### Breaking API changes | |
208a2c8a | 586 | |
b91f28be CMN |
587 | * `git_cherry_pick()` is now `git_cherrypick()`. |
588 | ||
589 | * The `git_submodule_update()` function was renamed to | |
590 | `git_submodule_update_strategy()`. `git_submodule_update()` is now used to | |
591 | provide functionalty similar to "git submodule update". | |
592 | ||
593 | * `git_treebuilder_create()` was renamed to `git_treebuilder_new()` to better | |
208a2c8a CMN |
594 | reflect it being a constructor rather than something which writes to |
595 | disk. | |
40d79154 | 596 | |
b91f28be CMN |
597 | * `git_treebuilder_new()` (was `git_treebuilder_create()`) now takes a |
598 | repository so that it can query repository configuration. | |
599 | Subsequently, `git_treebuilder_write()` no longer takes a repository. | |
aad27e6e | 600 | |
b91f28be CMN |
601 | * `git_threads_init()` and `git_threads_shutdown()` have been renamed to |
602 | `git_libgit2_init()` and `git_libgit2_shutdown()` to better explain what | |
603 | their purpose is, as it's grown to be more than just about threads. | |
aad27e6e | 604 | |
b91f28be CMN |
605 | * `git_libgit2_init()` and `git_libgit2_shutdown()` now return the number of |
606 | initializations of the library, so consumers may schedule work on the | |
607 | first initialization. | |
aad27e6e | 608 | |
b91f28be CMN |
609 | * The `git_transport_register()` function no longer takes a priority and takes |
610 | a URL scheme name (eg "http") instead of a prefix like "http://" | |
aad27e6e | 611 | |
b91f28be CMN |
612 | * `git_index_name_entrycount()` and `git_index_reuc_entrycount()` now |
613 | return size_t instead of unsigned int. | |
9d1f97df | 614 | |
b91f28be CMN |
615 | * The `context_lines` and `interhunk_lines` fields in `git_diff`_options are |
616 | now `uint32_t` instead of `uint16_t`. This allows to set them to `UINT_MAX`, | |
617 | in effect asking for "infinite" context e.g. to iterate over all the | |
618 | unmodified lines of a diff. | |
974d21c8 | 619 | |
b91f28be CMN |
620 | * `git_status_file()` now takes an exact path. Use `git_status_list_new()` if |
621 | pathspec searching is needed. | |
974d21c8 | 622 | |
b91f28be CMN |
623 | * `git_note_create()` has changed the position of the notes reference |
624 | name to match `git_note_remove()`. | |
974d21c8 | 625 | |
b91f28be CMN |
626 | * Rename `git_remote_load()` to `git_remote_lookup()` to bring it in line |
627 | with the rest of the lookup functions. | |
974d21c8 | 628 | |
b91f28be CMN |
629 | * `git_remote_rename()` now takes the repository and the remote's |
630 | current name. Accepting a remote indicates we want to change it, | |
631 | which we only did partially. It is much clearer if we accept a name | |
632 | and no loaded objects are changed. | |
974d21c8 | 633 | |
b91f28be CMN |
634 | * `git_remote_delete()` now accepts the repository and the remote's name |
635 | instead of a loaded remote. | |
974d21c8 | 636 | |
b91f28be CMN |
637 | * `git_merge_head` is now `git_annotated_commit`, to better reflect its usage |
638 | for multiple functions (including rebase) | |
974d21c8 | 639 | |
b91f28be CMN |
640 | * The `git_clone_options` struct no longer provides the `ignore_cert_errors` or |
641 | `remote_name` members for remote customization. | |
974d21c8 | 642 | |
b91f28be CMN |
643 | Instead, the `git_clone_options` struct has two new members, `remote_cb` and |
644 | `remote_cb_payload`, which allow the caller to completely override the remote | |
645 | creation process. If needed, the caller can use this callback to give their | |
646 | remote a name other than the default (origin) or disable cert checking. | |
974d21c8 | 647 | |
b91f28be CMN |
648 | The `remote_callbacks` member has been preserved for convenience, although it |
649 | is not used when a remote creation callback is supplied. | |
974d21c8 | 650 | |
b91f28be CMN |
651 | * The `git_clone`_options struct now provides `repository_cb` and |
652 | `repository_cb_payload` to allow the user to create a repository with | |
653 | custom options. | |
974d21c8 | 654 | |
b91f28be CMN |
655 | * The `git_push` struct to perform a push has been replaced with |
656 | `git_remote_upload()`. The refspecs and options are passed as a | |
657 | function argument. `git_push_update_tips()` is now also | |
658 | `git_remote_update_tips()` and the callbacks are in the same struct as | |
659 | the rest. | |
974d21c8 | 660 | |
b91f28be CMN |
661 | * The `git_remote_set_transport()` function now sets a transport factory function, |
662 | rather than a pre-existing transport instance. | |
61cd037e | 663 | |
b91f28be CMN |
664 | * The `git_transport` structure definition has moved into the sys/transport.h |
665 | file. | |
666 | ||
667 | * libgit2 no longer automatically sets the OpenSSL locking | |
668 | functions. This is not something which we can know to do. A | |
669 | last-resort convenience function is provided in sys/openssl.h, | |
670 | `git_openssl_set_locking()` which can be used to set the locking. |