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