]> git.proxmox.com Git - libgit2.git/blob - CHANGELOG.md
ba0cb4ea89e869a1dbc7438578b2d05021a3b007
[libgit2.git] / CHANGELOG.md
1 v0.27 + 1
2 ---------
3
4 ### Changes or improvements
5
6 ### API additions
7
8 ### API removals
9
10 ### Breaking API changes
11
12 v0.27
13 ---------
14
15 ### Changes or improvements
16
17 * Improved `p_unlink` in `posix_w32.c` to try and make a file writable
18 before sleeping in the retry loop to prevent unnecessary calls to sleep.
19
20 * The CMake build infrastructure has been improved to speed up building time.
21
22 * A new CMake option "-DUSE_HTTPS=<backend>" makes it possible to explicitly
23 choose an HTTP backend.
24
25 * A new CMake option "-DSHA1_BACKEND=<backend>" makes it possible to explicitly
26 choose an SHA1 backend. The collision-detecting backend is now the default.
27
28 * A new CMake option "-DUSE_BUNDLED_ZLIB" makes it possible to explicitly use
29 the bundled zlib library.
30
31 * A new CMake option "-DENABLE_REPRODUCIBLE_BUILDS" makes it possible to
32 generate a reproducible static archive. This requires support from your
33 toolchain.
34
35 * The minimum required CMake version has been bumped to 2.8.11.
36
37 * Writing to a configuration file now preserves the case of the key given by the
38 caller for the case-insensitive portions of the key (existing sections are
39 used even if they don't match).
40
41 * We now support conditional includes in configuration files.
42
43 * Fix for handling re-reading of configuration files with includes.
44
45 * Fix for reading patches which contain exact renames only.
46
47 * Fix for reading patches with whitespace in the compared files' paths.
48
49 * We will now fill `FETCH_HEAD` from all passed refspecs instead of overwriting
50 with the last one.
51
52 * There is a new diff option, `GIT_DIFF_INDENT_HEURISTIC` which activates a
53 heuristic which takes into account whitespace and indentation in order to
54 produce better diffs when dealing with ambiguous diff hunks.
55
56 * Fix for pattern-based ignore rules where files ignored by a rule cannot be
57 un-ignored by another rule.
58
59 * Sockets opened by libgit2 are now being closed on exec(3) if the platform
60 supports it.
61
62 * Fix for peeling annotated tags from packed-refs files.
63
64 * Fix reading huge loose objects from the object database.
65
66 * Fix files not being treated as modified when only the file mode has changed.
67
68 * We now explicitly reject adding submodules to the index via
69 `git_index_add_frombuffer`.
70
71 * Fix handling of `GIT_DIFF_FIND_RENAMES_FROM_REWRITES` raising `SIGABRT` when
72 one file has been deleted and another file has been rewritten.
73
74 * Fix for WinHTTP not properly handling NTLM and Negotiate challenges.
75
76 * When using SSH-based transports, we now repeatedly ask for the passphrase to
77 decrypt the private key in case a wrong passphrase is being provided.
78
79 * When generating conflict markers, they will now use the same line endings as
80 the rest of the file.
81
82 ### API additions
83
84 * The `git_merge_file_options` structure now contains a new setting,
85 `marker_size`. This allows users to set the size of markers that
86 delineate the sides of merged files in the output conflict file.
87 By default this is 7 (`GIT_MERGE_CONFLICT_MARKER_SIZE`), which
88 produces output markers like `<<<<<<<` and `>>>>>>>`.
89
90 * `git_remote_create_detached()` creates a remote that is not associated
91 to any repository (and does not apply configuration like 'insteadof' rules).
92 This is mostly useful for e.g. emulating `git ls-remote` behavior.
93
94 * `git_diff_patchid()` lets you generate patch IDs for diffs.
95
96 * `git_status_options` now has an additional field `baseline` to allow creating
97 status lists against different trees.
98
99 * New family of functions to allow creating notes for a specific notes commit
100 instead of for a notes reference.
101
102 * New family of functions to allow parsing message trailers. This API is still
103 experimental and may change in future releases.
104
105 ### API removals
106
107 ### Breaking API changes
108
109 * Signatures now distinguish between +0000 and -0000 UTC offsets.
110
111 * The certificate check callback in the WinHTTP transport will now receive the
112 `message_cb_payload` instead of the `cred_acquire_payload`.
113
114 * We are now reading symlinked directories under .git/refs.
115
116 * We now refuse creating branches named "HEAD".
117
118 * We now refuse reading and writing all-zero object IDs into the
119 object database.
120
121 * We now read the effective user's configuration file instead of the real user's
122 configuration in case libgit2 runs as part of a setuid binary.
123
124 * The `git_odb_open_rstream` function and its `readstream` callback in the
125 `git_odb_backend` interface have changed their signatures to allow providing
126 the object's size and type to the caller.
127
128 v0.26
129 -----
130
131 ### Changes or improvements
132
133 * Support for opening, creating and modifying worktrees.
134
135 * We can now detect SHA1 collisions resulting from the SHAttered attack. These
136 checks can be enabled at build time via `-DUSE_SHA1DC`.
137
138 * Fix for missing implementation of `git_merge_driver_source` getters.
139
140 * Fix for installed pkg-config file being broken when the prefix contains
141 spaces.
142
143 * We now detect when the hashsum of on-disk objects does not match their
144 expected hashsum.
145
146 * We now support open-ended ranges (e.g. "master..", "...master") in our
147 revision range parsing code.
148
149 * We now correctly compute ignores with leading "/" in subdirectories.
150
151 * We now optionally call `fsync` on loose objects, packfiles and their indexes,
152 loose references and packed reference files.
153
154 * We can now build against OpenSSL v1.1 and against LibreSSL.
155
156 * `GIT_MERGE_OPTIONS_INIT` now includes a setting to perform rename detection.
157 This aligns this structure with the default by `git_merge` and
158 `git_merge_trees` when `NULL` was provided for the options.
159
160 * Improvements for reading index v4 files.
161
162 * Perform additional retries for filesystem operations on Windows when files
163 are temporarily locked by other processes.
164
165 ### API additions
166
167 * New family of functions to handle worktrees:
168
169 * `git_worktree_list()` lets you look up worktrees for a repository.
170 * `git_worktree_lookup()` lets you get a specific worktree.
171 * `git_worktree_open_from_repository()` lets you get the associated worktree
172 of a repository.
173 a worktree.
174 * `git_worktree_add` lets you create new worktrees.
175 * `git_worktree_prune` lets you remove worktrees from disk.
176 * `git_worktree_lock()` and `git_worktree_unlock()` let you lock
177 respectively unlock a worktree.
178 * `git_repository_open_from_worktree()` lets you open a repository via
179 * `git_repository_head_for_worktree()` lets you get the current `HEAD` for a
180 linked worktree.
181 * `git_repository_head_detached_for_worktree()` lets you check whether a
182 linked worktree is in detached HEAD mode.
183
184 * `git_repository_item_path()` lets you retrieve paths for various repository
185 files.
186
187 * `git_repository_commondir()` lets you retrieve the common directory of a
188 repository.
189
190 * `git_branch_is_checked_out()` allows you to check whether a branch is checked
191 out in a repository or any of its worktrees.
192
193 * `git_repository_submodule_cache_all()` and
194 `git_repository_submodule_cache_clear()` functions allow you to prime or clear
195 the submodule cache of a repository.
196
197 * You can disable strict hash verifications via the
198 `GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION` option with `git_libgit2_opts()`.
199
200 * You can enable us calling `fsync` for various files inside the ".git"
201 directory by setting the `GIT_OPT_ENABLE_FSYNC_GITDIR` option with
202 `git_libgit2_opts()`.
203
204 * You can now enable "offset deltas" when creating packfiles and negotiating
205 packfiles with a remote server by setting `GIT_OPT_ENABLE_OFS_DELTA` option
206 with `GIT_libgit2_opts()`.
207
208 * You can now set the default share mode on Windows for opening files using
209 `GIT_OPT_SET_WINDOWS_SHAREMODE` option with `git_libgit2_opts()`.
210 You can query the current share mode with `GIT_OPT_GET_WINDOWS_SHAREMODE`.
211
212 * `git_transport_smart_proxy_options()' enables you to get the proxy options for
213 smart transports.
214
215 * The `GIT_FILTER_INIT` macro and the `git_filter_init` function are provided
216 to initialize a `git_filter` structure.
217
218 ### Breaking API changes
219
220 * `clone_checkout_strategy` has been removed from
221 `git_submodule_update_option`. The checkout strategy used to clone will
222 be the same strategy specified in `checkout_opts`.
223
224 v0.25
225 -------
226
227 ### Changes or improvements
228
229 * Fix repository discovery with `git_repository_discover` and
230 `git_repository_open_ext` to match git's handling of a ceiling
231 directory at the current directory. git only checks ceiling
232 directories when its search ascends to a parent directory. A ceiling
233 directory matching the starting directory will not prevent git from
234 finding a repository in the starting directory or a parent directory.
235
236 * Do not fail when deleting remotes in the presence of broken
237 global configs which contain branches.
238
239 * Support for reading and writing git index v4 files
240
241 * Improve the performance of the revwalk and bring us closer to git's code.
242
243 * The reference db has improved support for concurrency and returns `GIT_ELOCKED`
244 when an operation could not be performed due to locking.
245
246 * Nanosecond resolution is now activated by default, following git's change to
247 do this.
248
249 * We now restrict the set of ciphers we let OpenSSL use by default.
250
251 * Users can now register their own merge drivers for use with `.gitattributes`.
252 The library also gained built-in support for the union merge driver.
253
254 * The default for creating references is now to validate that the object does
255 exist.
256
257 * Add `git_proxy_options` which is used by the different networking
258 implementations to let the caller specify the proxy settings instead of
259 relying on the environment variables.
260
261 ### API additions
262
263 * You can now get the user-agent used by libgit2 using the
264 `GIT_OPT_GET_USER_AGENT` option with `git_libgit2_opts()`.
265 It is the counterpart to `GIT_OPT_SET_USER_AGENT`.
266
267 * The `GIT_OPT_SET_SSL_CIPHERS` option for `git_libgit2_opts()` lets you specify
268 a custom list of ciphers to use for OpenSSL.
269
270 * `git_commit_create_buffer()` creates a commit and writes it into a
271 user-provided buffer instead of writing it into the object db. Combine it with
272 `git_commit_create_with_signature()` in order to create a commit with a
273 cryptographic signature.
274
275 * `git_blob_create_fromstream()` and
276 `git_blob_create_fromstream_commit()` allow you to create a blob by
277 writing into a stream. Useful when you do not know the final size or
278 want to copy the contents from another stream.
279
280 * New flags for `git_repository_open_ext`:
281
282 * `GIT_REPOSITORY_OPEN_NO_DOTGIT` - Do not check for a repository by
283 appending `/.git` to the `start_path`; only open the repository if
284 `start_path` itself points to the git directory.
285 * `GIT_REPOSITORY_OPEN_FROM_ENV` - Find and open a git repository,
286 respecting the environment variables used by the git command-line
287 tools. If set, `git_repository_open_ext` will ignore the other
288 flags and the `ceiling_dirs` argument, and will allow a NULL
289 `path` to use `GIT_DIR` or search from the current directory. The
290 search for a repository will respect `$GIT_CEILING_DIRECTORIES`
291 and `$GIT_DISCOVERY_ACROSS_FILESYSTEM`. The opened repository
292 will respect `$GIT_INDEX_FILE`, `$GIT_NAMESPACE`,
293 `$GIT_OBJECT_DIRECTORY`, and `$GIT_ALTERNATE_OBJECT_DIRECTORIES`.
294 In the future, this flag will also cause `git_repository_open_ext`
295 to respect `$GIT_WORK_TREE` and `$GIT_COMMON_DIR`; currently,
296 `git_repository_open_ext` with this flag will error out if either
297 `$GIT_WORK_TREE` or `$GIT_COMMON_DIR` is set.
298
299 * `git_diff_from_buffer()` can create a `git_diff` object from the contents
300 of a git-style patch file.
301
302 * `git_index_version()` and `git_index_set_version()` to get and set
303 the index version
304
305 * `git_odb_expand_ids()` lets you check for the existence of multiple
306 objects at once.
307
308 * The new `git_blob_dup()`, `git_commit_dup()`, `git_tag_dup()` and
309 `git_tree_dup()` functions provide type-specific wrappers for
310 `git_object_dup()` to reduce noise and increase type safety for callers.
311
312 * `git_reference_dup()` lets you duplicate a reference to aid in ownership
313 management and cleanup.
314
315 * `git_signature_from_buffer()` lets you create a signature from a string in the
316 format that appear in objects.
317
318 * `git_tree_create_updated()` lets you create a tree based on another one
319 together with a list of updates. For the covered update cases, it's more
320 efficient than the `git_index` route.
321
322 * `git_apply_patch()` applies hunks from a `git_patch` to a buffer.
323
324 * `git_diff_to_buf()` lets you print an entire diff directory to a buffer,
325 similar to how `git_patch_to_buf()` works.
326
327 * `git_proxy_init_options()` is added to initialize a `git_proxy_options`
328 structure at run-time.
329
330 * `git_merge_driver_register()`, `git_merge_driver_unregister()` let you
331 register and unregister a custom merge driver to be used when `.gitattributes`
332 specifies it.
333
334 * `git_merge_driver_lookup()` can be used to look up a merge driver by name.
335
336 * `git_merge_driver_source_repo()`, `git_merge_driver_source_ancestor()`,
337 `git_merge_driver_source_ours()`, `git_merge_driver_source_theirs()`,
338 `git_merge_driver_source_file_options()` added as accessors to
339 `git_merge_driver_source`.
340
341 ### API removals
342
343 * `git_blob_create_fromchunks()` has been removed in favour of
344 `git_blob_create_fromstream()`.
345
346 ### Breaking API changes
347
348 * `git_packbuilder_object_count` and `git_packbuilder_written` now
349 return a `size_t` instead of a `uint32_t` for more thorough
350 compatibility with the rest of the library.
351
352 * `git_packbuiler_progress` now provides explicitly sized `uint32_t`
353 values instead of `unsigned int`.
354
355 * `git_diff_file` now includes an `id_abbrev` field that reflects the
356 number of nibbles set in the `id` field.
357
358 * `git_odb_backend` now has a `freshen` function pointer. This optional
359 function pointer is similar to the `exists` function, but it will update
360 a last-used marker. For filesystem-based object databases, this updates
361 the timestamp of the file containing the object, to indicate "freshness".
362 If this is `NULL`, then it will not be called and the `exists` function
363 will be used instead.
364
365 * `git_remote_connect()` now accepts `git_proxy_options` argument, and
366 `git_fetch_options` and `git_push_options` each have a `proxy_opts` field.
367
368 * `git_merge_options` now provides a `default_driver` that can be used
369 to provide the name of a merge driver to be used to handle files changed
370 during a merge.
371
372 v0.24
373 -------
374
375 ### Changes or improvements
376
377 * Custom merge drivers can now be registered, which allows callers to
378 configure callbacks to honor `merge=driver` configuration in
379 `.gitattributes`.
380
381 * Custom filters can now be registered with wildcard attributes, for
382 example `filter=*`. Consumers should examine the attributes parameter
383 of the `check` function for details.
384
385 * Symlinks are now followed when locking a file, which can be
386 necessary when multiple worktrees share a base repository.
387
388 * You can now set your own user-agent to be sent for HTTP requests by
389 using the `GIT_OPT_SET_USER_AGENT` with `git_libgit2_opts()`.
390
391 * You can set custom HTTP header fields to be sent along with requests
392 by passing them in the fetch and push options.
393
394 * Tree objects are now assumed to be sorted. If a tree is not
395 correctly formed, it will give bad results. This is the git approach
396 and cuts a significant amount of time when reading the trees.
397
398 * Filter registration is now protected against concurrent
399 registration.
400
401 * Filenames which are not valid on Windows in an index no longer cause
402 to fail to parse it on that OS.
403
404 * Rebases can now be performed purely in-memory, without touching the
405 repository's workdir.
406
407 * When adding objects to the index, or when creating new tree or commit
408 objects, the inputs are validated to ensure that the dependent objects
409 exist and are of the correct type. This object validation can be
410 disabled with the GIT_OPT_ENABLE_STRICT_OBJECT_CREATION option.
411
412 * The WinHTTP transport's handling of bad credentials now behaves like
413 the others, asking for credentials again.
414
415 ### API additions
416
417 * `git_config_lock()` has been added, which allow for
418 transactional/atomic complex updates to the configuration, removing
419 the opportunity for concurrent operations and not committing any
420 changes until the unlock.
421
422 * `git_diff_options` added a new callback `progress_cb` to report on the
423 progress of the diff as files are being compared. The documentation of
424 the existing callback `notify_cb` was updated to reflect that it only
425 gets called when new deltas are added to the diff.
426
427 * `git_fetch_options` and `git_push_options` have gained a `custom_headers`
428 field to set the extra HTTP header fields to send.
429
430 * `git_stream_register_tls()` lets you register a callback to be used
431 as the constructor for a TLS stream instead of the libgit2 built-in
432 one.
433
434 * `git_commit_header_field()` allows you to look up a specific header
435 field in a commit.
436
437 * `git_commit_extract_signature()` extracts the signature from a
438 commit and gives you both the signature and the signed data so you
439 can verify it.
440
441 ### API removals
442
443 * No APIs were removed in this version.
444
445 ### Breaking API changes
446
447 * The `git_merge_tree_flag_t` is now `git_merge_flag_t`. Subsequently,
448 its members are no longer prefixed with `GIT_MERGE_TREE_FLAG` but are
449 now prefixed with `GIT_MERGE_FLAG`, and the `tree_flags` field of the
450 `git_merge_options` structure is now named `flags`.
451
452 * The `git_merge_file_flags_t` enum is now `git_merge_file_flag_t` for
453 consistency with other enum type names.
454
455 * `git_cert` descendent types now have a proper `parent` member
456
457 * It is the responsibility of the refdb backend to decide what to do
458 with the reflog on ref deletion. The file-based backend must delete
459 it, a database-backed one may wish to archive it.
460
461 * `git_config_backend` has gained two entries. `lock` and `unlock`
462 with which to implement the transactional/atomic semantics for the
463 configuration backend.
464
465 * `git_index_add` and `git_index_conflict_add()` will now use the case
466 as provided by the caller on case insensitive systems. Previous
467 versions would keep the case as it existed in the index. This does
468 not affect the higher-level `git_index_add_bypath` or
469 `git_index_add_frombuffer` functions.
470
471 * The `notify_payload` field of `git_diff_options` was renamed to `payload`
472 to reflect that it's also the payload for the new progress callback.
473
474 * The `git_config_level_t` enum has gained a higher-priority value
475 `GIT_CONFIG_LEVEL_PROGRAMDATA` which represent a rough Windows equivalent
476 to the system level configuration.
477
478 * `git_rebase_options` now has a `merge_options` field.
479
480 * The index no longer performs locking itself. This is not something
481 users of the library should have been relying on as it's not part of
482 the concurrency guarantees.
483
484 * `git_remote_connect()` now takes a `custom_headers` argument to set
485 the extra HTTP header fields to send.
486
487 v0.23
488 ------
489
490 ### Changes or improvements
491
492 * Patience and minimal diff drivers can now be used for merges.
493
494 * Merges can now ignore whitespace changes.
495
496 * Updated binary identification in CRLF filtering to avoid false positives in
497 UTF-8 files.
498
499 * Rename and copy detection is enabled for small files.
500
501 * Checkout can now handle an initial checkout of a repository, making
502 `GIT_CHECKOUT_SAFE_CREATE` unnecessary for users of clone.
503
504 * The signature parameter in the ref-modifying functions has been
505 removed. Use `git_repository_set_ident()` and
506 `git_repository_ident()` to override the signature to be used.
507
508 * The local transport now auto-scales the number of threads to use
509 when creating the packfile instead of sticking to one.
510
511 * Reference renaming now uses the right id for the old value.
512
513 * The annotated version of branch creation, HEAD detaching and reset
514 allow for specifying the expression from the user to be put into the
515 reflog.
516
517 * `git_rebase_commit` now returns `GIT_EUNMERGED` when you attempt to
518 commit with unstaged changes.
519
520 * On Mac OS X, we now use SecureTransport to provide the cryptographic
521 support for HTTPS connections insead of OpenSSL.
522
523 * Checkout can now accept an index for the baseline computations via the
524 `baseline_index` member.
525
526 * The configuration for fetching is no longer stored inside the
527 `git_remote` struct but has been moved to a `git_fetch_options`. The
528 remote functions now take these options or the callbacks instead of
529 setting them beforehand.
530
531 * `git_submodule` instances are no longer cached or shared across
532 lookup. Each submodule represents the configuration at the time of
533 loading.
534
535 * The index now uses diffs for `add_all()` and `update_all()` which
536 gives it a speed boost and closer semantics to git.
537
538 * The ssh transport now reports the stderr output from the server as
539 the error message, which allows you to get the "repository not
540 found" messages.
541
542 * `git_index_conflict_add()` will remove staged entries that exist for
543 conflicted paths.
544
545 * The flags for a `git_diff_file` will now have the `GIT_DIFF_FLAG_EXISTS`
546 bit set when a file exists on that side of the diff. This is useful
547 for understanding whether a side of the diff exists in the presence of
548 a conflict.
549
550 * The constructor for a write-stream into the odb now takes
551 `git_off_t` instead of `size_t` for the size of the blob, which
552 allows putting large files into the odb on 32-bit systems.
553
554 * The remote's push and pull URLs now honor the url.$URL.insteadOf
555 configuration. This allows modifying URL prefixes to a custom
556 value via gitconfig.
557
558 * `git_diff_foreach`, `git_diff_blobs`, `git_diff_blob_to_buffer`,
559 and `git_diff_buffers` now accept a new binary callback of type
560 `git_diff_binary_cb` that includes the binary diff information.
561
562 * The race condition mitigations described in `racy-git.txt` have been
563 implemented.
564
565 * If libcurl is installed, we will use it to connect to HTTP(S)
566 servers.
567
568 ### API additions
569
570 * The `git_merge_options` gained a `file_flags` member.
571
572 * Parsing and retrieving a configuration value as a path is exposed
573 via `git_config_parse_path()` and `git_config_get_path()`
574 respectively.
575
576 * `git_repository_set_ident()` and `git_repository_ident()` serve to
577 set and query which identity will be used when writing to the
578 reflog.
579
580 * `git_config_entry_free()` frees a config entry.
581
582 * `git_config_get_string_buf()` provides a way to safely retrieve a
583 string from a non-snapshot configuration.
584
585 * `git_annotated_commit_from_revspec()` allows to get an annotated
586 commit from an extended sha synatx string.
587
588 * `git_repository_set_head_detached_from_annotated()`,
589 `git_branch_create_from_annotated()` and
590 `git_reset_from_annotated()` allow for the caller to provide an
591 annotated commit through which they can control what expression is
592 put into the reflog as the source/target.
593
594 * `git_index_add_frombuffer()` can now create a blob from memory
595 buffer and add it to the index which is attached to a repository.
596
597 * The structure `git_fetch_options` has been added to determine the
598 runtime configuration for fetching, such as callbacks, pruning and
599 autotag behaviour. It has the runtime initializer
600 `git_fetch_init_options()`.
601
602 * The enum `git_fetch_prune_t` has been added, letting you specify the
603 pruning behaviour for a fetch.
604
605 * A push operation will notify the caller of what updates it indends
606 to perform on the remote, which provides similar information to
607 git's pre-push hook.
608
609 * `git_stash_apply()` can now apply a stashed state from the stash list,
610 placing the data into the working directory and index.
611
612 * `git_stash_pop()` will apply a stashed state (like `git_stash_apply()`)
613 but will remove the stashed state after a successful application.
614
615 * A new error code `GIT_EEOF` indicates an early EOF from the
616 server. This typically indicates an error with the URL or
617 configuration of the server, and tools can use this to show messages
618 about failing to communicate with the server.
619
620 * A new error code `GIT_EINVALID` indicates that an argument to a
621 function is invalid, or an invalid operation was requested.
622
623 * `git_diff_index_to_workdir()` and `git_diff_tree_to_index()` will now
624 produce deltas of type `GIT_DELTA_CONFLICTED` to indicate that the index
625 side of the delta is a conflict.
626
627 * The `git_status` family of functions will now produce status of type
628 `GIT_STATUS_CONFLICTED` to indicate that a conflict exists for that file
629 in the index.
630
631 * `git_index_entry_is_conflict()` is a utility function to determine if
632 a given index entry has a non-zero stage entry, indicating that it is
633 one side of a conflict.
634
635 * It is now possible to pass a keypair via a buffer instead of a
636 path. For this, `GIT_CREDTYPE_SSH_MEMORY` and
637 `git_cred_ssh_key_memory_new()` have been added.
638
639 * `git_filter_list_contains` will indicate whether a particular
640 filter will be run in the given filter list.
641
642 * `git_commit_header_field()` has been added, which allows retrieving
643 the contents of an arbitrary header field.
644
645 * `git_submodule_set_branch()` allows to set the configured branch for
646 a submodule.
647
648 ### API removals
649
650 * `git_remote_save()` and `git_remote_clear_refspecs()` have been
651 removed. Remote's configuration is changed via the configuration
652 directly or through a convenience function which performs changes to
653 the configuration directly.
654
655 * `git_remote_set_callbacks()`, `git_remote_get_callbacks()` and
656 `git_remote_set_transport()` have been removed and the remote no
657 longer stores this configuration.
658
659 * `git_remote_set_fetch_refpecs()` and
660 `git_remote_set_push_refspecs()` have been removed. There is no
661 longer a way to set the base refspecs at run-time.
662
663 * `git_submodule_save()` has been removed. The submodules are no
664 longer configured via the objects.
665
666 * `git_submodule_reload_all()` has been removed as we no longer cache
667 submodules.
668
669 ### Breaking API changes
670
671 * `git_smart_subtransport_cb` now has a `param` parameter.
672
673 * The `git_merge_options` structure member `flags` has been renamed
674 to `tree_flags`.
675
676 * The `git_merge_file_options` structure member `flags` is now
677 an unsigned int. It was previously a `git_merge_file_flags_t`.
678
679 * `GIT_CHECKOUT_SAFE_CREATE` has been removed. Most users will generally
680 be able to switch to `GIT_CHECKOUT_SAFE`, but if you require missing
681 file handling during checkout, you may now use `GIT_CHECKOUT_SAFE |
682 GIT_CHECKOUT_RECREATE_MISSING`.
683
684 * The `git_clone_options` and `git_submodule_update_options`
685 structures no longer have a `signature` field.
686
687 * The following functions have removed the signature and/or log message
688 parameters in favour of git-emulating ones.
689
690 * `git_branch_create()`, `git_branch_move()`
691 * `git_rebase_init()`, `git_rebase_abort()`
692 * `git_reference_symbolic_create_matching()`,
693 `git_reference_symbolic_create()`, `git_reference_create()`,
694 `git_reference_create_matching()`,
695 `git_reference_symbolic_set_target()`,
696 `git_reference_set_target()`, `git_reference_rename()`
697 * `git_remote_update_tips()`, `git_remote_fetch()`, `git_remote_push()`
698 * `git_repository_set_head()`,
699 `git_repository_set_head_detached()`,
700 `git_repository_detach_head()`
701 * `git_reset()`
702
703 * `git_config_get_entry()` now gives back a ref-counted
704 `git_config_entry`. You must free it when you no longer need it.
705
706 * `git_config_get_string()` will return an error if used on a
707 non-snapshot configuration, as there can be no guarantee that the
708 returned pointer is valid.
709
710 * `git_note_default_ref()` now uses a `git_buf` to return the string,
711 as the string is otherwise not guaranteed to stay allocated.
712
713 * `git_rebase_operation_current()` will return `GIT_REBASE_NO_OPERATION`
714 if it is called immediately after creating a rebase session but before
715 you have applied the first patch.
716
717 * `git_rebase_options` now contains a `git_checkout_options` struct
718 that will be used for functions that modify the working directory,
719 namely `git_rebase_init`, `git_rebase_next` and
720 `git_rebase_abort`. As a result, `git_rebase_open` now also takes
721 a `git_rebase_options` and only the `git_rebase_init` and
722 `git_rebase_open` functions take a `git_rebase_options`, where they
723 will persist the options to subsequent `git_rebase` calls.
724
725 * The `git_clone_options` struct now has fetch options in a
726 `fetch_opts` field instead of remote callbacks in
727 `remote_callbacks`.
728
729 * The remote callbacks has gained a new member `push_negotiation`
730 which gets called before sending the update commands to the server.
731
732 * The following functions no longer act on a remote instance but
733 change the repository's configuration. Their signatures have changed
734 accordingly:
735
736 * `git_remote_set_url()`, `git_remote_seturl()`
737 * `git_remote_add_fetch()`, `git_remote_add_push()` and
738 * `git_remote_set_autotag()`
739
740 * `git_remote_connect()` and `git_remote_prune()` now take a pointer
741 to the callbacks.
742
743 * `git_remote_fetch()` and `git_remote_download()` now take a pointer
744 to fetch options which determine the runtime configuration.
745
746 * The `git_remote_autotag_option_t` values have been changed. It has
747 gained a `_UNSPECIFIED` default value to specify no override for the
748 configured setting.
749
750 * `git_remote_update_tips()` now takes a pointer to the callbacks as
751 well as a boolean whether to write `FETCH_HEAD` and the autotag
752 setting.
753
754 * `git_remote_create_anonymous()` no longer takes a fetch refspec as
755 url-only remotes cannot have configured refspecs.
756
757 * The `git_submodule_update_options` struct now has fetch options in
758 the `fetch_opts` field instead of callbacks in the
759 `remote_callbacks` field.
760
761 * The following functions no longer act on a submodule instance but
762 change the repository's configuration. Their signatures have changed
763 accordingly:
764
765 * `git_submodule_set_url()`, `git_submodule_set_ignore()`,
766 `git_submodule_set_update()`,
767 `git_submodule_set_fetch_recurse_submodules()`.
768
769 * `git_submodule_status()` no longer takes a submodule instance but a
770 repsitory, a submodule name and an ignore setting.
771
772 * The `push` function in the `git_transport` interface now takes a
773 pointer to the remote callbacks.
774
775 * The `git_index_entry` struct's fields' types have been changed to
776 more accurately reflect what is in fact stored in the
777 index. Specifically, time and file size are 32 bits intead of 64, as
778 these values are truncated.
779
780 * `GIT_EMERGECONFLICT` is now `GIT_ECONFLICT`, which more accurately
781 describes the nature of the error.
782
783 * It is no longer allowed to call `git_buf_grow()` on buffers
784 borrowing the memory they point to.
785
786 v0.22
787 ------
788
789 ### Changes or improvements
790
791 * `git_signature_new()` now requires a non-empty email address.
792
793 * Use CommonCrypto libraries for SHA-1 calculation on Mac OS X.
794
795 * Disable SSL compression and SSLv2 and SSLv3 ciphers in favor of TLSv1
796 in OpenSSL.
797
798 * The fetch behavior of remotes with autotag set to `GIT_REMOTE_DOWNLOAD_TAGS_ALL`
799 has been changed to match git 1.9.0 and later. In this mode, libgit2 now
800 fetches all tags in addition to whatever else needs to be fetched.
801
802 * `git_checkout()` now handles case-changing renames correctly on
803 case-insensitive filesystems; for example renaming "readme" to "README".
804
805 * The search for libssh2 is now done via pkg-config instead of a
806 custom search of a few directories.
807
808 * Add support for core.protectHFS and core.protectNTFS. Add more
809 validation for filenames which we write such as references.
810
811 * The local transport now generates textual progress output like
812 git-upload-pack does ("counting objects").
813
814 * `git_checkout_index()` can now check out an in-memory index that is not
815 necessarily the repository's index, so you may check out an index
816 that was produced by git_merge and friends while retaining the cached
817 information.
818
819 * Remove the default timeout for receiving / sending data over HTTP using
820 the WinHTTP transport layer.
821
822 * Add SPNEGO (Kerberos) authentication using GSSAPI on Unix systems.
823
824 * Provide built-in objects for the empty blob (e69de29) and empty
825 tree (4b825dc) objects.
826
827 * The index' tree cache is now filled upon read-tree and write-tree
828 and the cache is written to disk.
829
830 * LF -> CRLF filter refuses to handle mixed-EOL files
831
832 * LF -> CRLF filter now runs when * text = auto (with Git for Windows 1.9.4)
833
834 * File unlocks are atomic again via rename. Read-only files on Windows are
835 made read-write if necessary.
836
837 * Share open packfiles across repositories to share descriptors and mmaps.
838
839 * Use a map for the treebuilder, making insertion O(1)
840
841 * The build system now accepts an option EMBED_SSH_PATH which when set
842 tells it to include a copy of libssh2 at the given location. This is
843 enabled for MSVC.
844
845 * Add support for refspecs with the asterisk in the middle of a
846 pattern.
847
848 * Fetching now performs opportunistic updates. To achieve this, we
849 introduce a difference between active and passive refspecs, which
850 make `git_remote_download()` and `git_remote_fetch()` to take a list of
851 resfpecs to be the active list, similarly to how git fetch accepts a
852 list on the command-line.
853
854 * The THREADSAFE option to build libgit2 with threading support has
855 been flipped to be on by default.
856
857 * The remote object has learnt to prune remote-tracking branches. If
858 the remote is configured to do so, this will happen via
859 `git_remote_fetch()`. You can also call `git_remote_prune()` after
860 connecting or fetching to perform the prune.
861
862
863 ### API additions
864
865 * Introduce `git_buf_text_is_binary()` and `git_buf_text_contains_nul()` for
866 consumers to perform binary detection on a git_buf.
867
868 * `git_branch_upstream_remote()` has been introduced to provide the
869 branch.<name>.remote configuration value.
870
871 * Introduce `git_describe_commit()` and `git_describe_workdir()` to provide
872 a description of the current commit (and working tree, respectively)
873 based on the nearest tag or reference
874
875 * Introduce `git_merge_bases()` and the `git_oidarray` type to expose all
876 merge bases between two commits.
877
878 * Introduce `git_merge_bases_many()` to expose all merge bases between
879 multiple commits.
880
881 * Introduce rebase functionality (using the merge algorithm only).
882 Introduce `git_rebase_init()` to begin a new rebase session,
883 `git_rebase_open()` to open an in-progress rebase session,
884 `git_rebase_commit()` to commit the current rebase operation,
885 `git_rebase_next()` to apply the next rebase operation,
886 `git_rebase_abort()` to abort an in-progress rebase and `git_rebase_finish()`
887 to complete a rebase operation.
888
889 * Introduce `git_note_author()` and `git_note_committer()` to get the author
890 and committer information on a `git_note`, respectively.
891
892 * A factory function for ssh has been added which allows to change the
893 path of the programs to execute for receive-pack and upload-pack on
894 the server, `git_transport_ssh_with_paths()`.
895
896 * The ssh transport supports asking the remote host for accepted
897 credential types as well as multiple challeges using a single
898 connection. This requires to know which username you want to connect
899 as, so this introduces the USERNAME credential type which the ssh
900 transport will use to ask for the username.
901
902 * The `GIT_EPEEL` error code has been introduced when we cannot peel a tag
903 to the requested object type; if the given object otherwise cannot be
904 peeled, `GIT_EINVALIDSPEC` is returned.
905
906 * Introduce `GIT_REPOSITORY_INIT_RELATIVE_GITLINK` to use relative paths
907 when writing gitlinks, as is used by git core for submodules.
908
909 * `git_remote_prune()` has been added. See above for description.
910
911
912 * Introduce reference transactions, which allow multiple references to
913 be locked at the same time and updates be queued. This also allows
914 us to safely update a reflog with arbitrary contents, as we need to
915 do for stash.
916
917 ### API removals
918
919 * `git_remote_supported_url()` and `git_remote_is_valid_url()` have been
920 removed as they have become essentially useless with rsync-style ssh paths.
921
922 * `git_clone_into()` and `git_clone_local_into()` have been removed from the
923 public API in favour of `git_clone callbacks`.
924
925 * The option to ignore certificate errors via `git_remote_cert_check()`
926 is no longer present. Instead, `git_remote_callbacks` has gained a new
927 entry which lets the user perform their own certificate checks.
928
929 ### Breaking API changes
930
931 * `git_cherry_pick()` is now `git_cherrypick()`.
932
933 * The `git_submodule_update()` function was renamed to
934 `git_submodule_update_strategy()`. `git_submodule_update()` is now used to
935 provide functionalty similar to "git submodule update".
936
937 * `git_treebuilder_create()` was renamed to `git_treebuilder_new()` to better
938 reflect it being a constructor rather than something which writes to
939 disk.
940
941 * `git_treebuilder_new()` (was `git_treebuilder_create()`) now takes a
942 repository so that it can query repository configuration.
943 Subsequently, `git_treebuilder_write()` no longer takes a repository.
944
945 * `git_threads_init()` and `git_threads_shutdown()` have been renamed to
946 `git_libgit2_init()` and `git_libgit2_shutdown()` to better explain what
947 their purpose is, as it's grown to be more than just about threads.
948
949 * `git_libgit2_init()` and `git_libgit2_shutdown()` now return the number of
950 initializations of the library, so consumers may schedule work on the
951 first initialization.
952
953 * The `git_transport_register()` function no longer takes a priority and takes
954 a URL scheme name (eg "http") instead of a prefix like "http://"
955
956 * `git_index_name_entrycount()` and `git_index_reuc_entrycount()` now
957 return size_t instead of unsigned int.
958
959 * The `context_lines` and `interhunk_lines` fields in `git_diff`_options are
960 now `uint32_t` instead of `uint16_t`. This allows to set them to `UINT_MAX`,
961 in effect asking for "infinite" context e.g. to iterate over all the
962 unmodified lines of a diff.
963
964 * `git_status_file()` now takes an exact path. Use `git_status_list_new()` if
965 pathspec searching is needed.
966
967 * `git_note_create()` has changed the position of the notes reference
968 name to match `git_note_remove()`.
969
970 * Rename `git_remote_load()` to `git_remote_lookup()` to bring it in line
971 with the rest of the lookup functions.
972
973 * `git_remote_rename()` now takes the repository and the remote's
974 current name. Accepting a remote indicates we want to change it,
975 which we only did partially. It is much clearer if we accept a name
976 and no loaded objects are changed.
977
978 * `git_remote_delete()` now accepts the repository and the remote's name
979 instead of a loaded remote.
980
981 * `git_merge_head` is now `git_annotated_commit`, to better reflect its usage
982 for multiple functions (including rebase)
983
984 * The `git_clone_options` struct no longer provides the `ignore_cert_errors` or
985 `remote_name` members for remote customization.
986
987 Instead, the `git_clone_options` struct has two new members, `remote_cb` and
988 `remote_cb_payload`, which allow the caller to completely override the remote
989 creation process. If needed, the caller can use this callback to give their
990 remote a name other than the default (origin) or disable cert checking.
991
992 The `remote_callbacks` member has been preserved for convenience, although it
993 is not used when a remote creation callback is supplied.
994
995 * The `git_clone`_options struct now provides `repository_cb` and
996 `repository_cb_payload` to allow the user to create a repository with
997 custom options.
998
999 * The `git_push` struct to perform a push has been replaced with
1000 `git_remote_upload()`. The refspecs and options are passed as a
1001 function argument. `git_push_update_tips()` is now also
1002 `git_remote_update_tips()` and the callbacks are in the same struct as
1003 the rest.
1004
1005 * The `git_remote_set_transport()` function now sets a transport factory function,
1006 rather than a pre-existing transport instance.
1007
1008 * The `git_transport` structure definition has moved into the sys/transport.h
1009 file.
1010
1011 * libgit2 no longer automatically sets the OpenSSL locking
1012 functions. This is not something which we can know to do. A
1013 last-resort convenience function is provided in sys/openssl.h,
1014 `git_openssl_set_locking()` which can be used to set the locking.