]> git.proxmox.com Git - libgit2.git/blob - CHANGELOG.md
Merge commit 'refs/pull/2879/head' of ssh://github.com/libgit2/libgit2
[libgit2.git] / CHANGELOG.md
1 v0.22 + 1
2 ------
3
4 ### Changes or improvements
5
6 * Updated binary identification in CRLF filtering to avoid false positives in
7 UTF-8 files.
8
9 * Rename and copy detection is enabled for small files.
10
11 * Checkout can now handle an initial checkout of a repository, making
12 `GIT_CHECKOUT_SAFE_CREATE` unnecessary for users of clone.
13
14 * The signature parameter in the ref-modifying functions has been
15 removed. Use `git_repository_set_ident()` and
16 `git_repository_ident()` to override the signature to be used.
17
18 ### API additions
19
20 * Parsing and retrieving a configuration value as a path is exposed
21 via `git_config_parse_path()` and `git_config_get_path()`
22 respectively.
23
24 * `git_repository_set_ident()` and `git_repository_ident()` serve to
25 set and query which identity will be used when writing to the
26 reflog.
27
28 * `git_config_entry_free()` frees a config entry.
29
30 * `git_config_get_string_buf()` provides a way to safely retrieve a
31 string from a non-snapshot configuration.
32
33 * Reference renaming now uses the right id for the old value.
34
35 * `git_index_add_frombuffer()` can now create a blob from memory
36 buffer and add it to the index which is attached to a repository.
37
38 ### API removals
39
40 ### Breaking API changes
41
42 * `GIT_CHECKOUT_SAFE_CREATE` has been removed. Most users will generally
43 be able to switch to `GIT_CHECKOUT_SAFE`, but if you require missing
44 file handling during checkout, you may now use `GIT_CHECKOUT_SAFE |
45 GIT_CHECKOUT_RECREATE_MISSING`.
46
47 * The `git_clone_options` and `git_submodule_update_options`
48 structures no longer have a `signature` field.
49
50 * The following functions have removed the signature and/or log message
51 parameters in favour of git-emulating ones.
52
53 * `git_branch_create()`, `git_branch_move()`
54 * `git_rebase_init()`, `git_rebase_abort()`
55 * `git_reference_symbolic_create_matching()`,
56 `git_reference_symbolic_create()`, `git_reference_create()`,
57 `git_reference_create_matching()`,
58 `git_reference_symbolic_set_target()`,
59 `git_reference_set_target()`, `git_reference_rename()`
60 * `git_remote_update_tips()`, `git_remote_fetch()`, `git_remote_push()`
61 * `git_repository_set_head()`,
62 `git_repository_set_head_detached()`,
63 `git_repository_detach_head()`
64 * `git_reset()`
65
66 * `git_config_get_entry()` now gives back a ref-counted
67 `git_config_entry`. You must free it when you no longer need it.
68
69 * `git_config_get_string()` will return an error if used on a
70 non-snapshot configuration, as there can be no guarantee that the
71 returned pointer is valid.
72
73 v0.22
74 ------
75
76 ### Changes or improvements
77
78 * `git_signature_new()` now requires a non-empty email address.
79
80 * Use CommonCrypto libraries for SHA-1 calculation on Mac OS X.
81
82 * Disable SSL compression and SSLv2 and SSLv3 ciphers in favor of TLSv1
83 in OpenSSL.
84
85 * The fetch behavior of remotes with autotag set to `GIT_REMOTE_DOWNLOAD_TAGS_ALL`
86 has been changed to match git 1.9.0 and later. In this mode, libgit2 now
87 fetches all tags in addition to whatever else needs to be fetched.
88
89 * `git_checkout()` now handles case-changing renames correctly on
90 case-insensitive filesystems; for example renaming "readme" to "README".
91
92 * The search for libssh2 is now done via pkg-config instead of a
93 custom search of a few directories.
94
95 * Add support for core.protectHFS and core.protectNTFS. Add more
96 validation for filenames which we write such as references.
97
98 * The local transport now generates textual progress output like
99 git-upload-pack does ("counting objects").
100
101 * `git_checkout_index()` can now check out an in-memory index that is not
102 necessarily the repository's index, so you may check out an index
103 that was produced by git_merge and friends while retaining the cached
104 information.
105
106 * Remove the default timeout for receiving / sending data over HTTP using
107 the WinHTTP transport layer.
108
109 * Add SPNEGO (Kerberos) authentication using GSSAPI on Unix systems.
110
111 * Provide built-in objects for the empty blob (e69de29) and empty
112 tree (4b825dc) objects.
113
114 * The index' tree cache is now filled upon read-tree and write-tree
115 and the cache is written to disk.
116
117 * LF -> CRLF filter refuses to handle mixed-EOL files
118
119 * LF -> CRLF filter now runs when * text = auto (with Git for Windows 1.9.4)
120
121 * File unlocks are atomic again via rename. Read-only files on Windows are
122 made read-write if necessary.
123
124 * Share open packfiles across repositories to share descriptors and mmaps.
125
126 * Use a map for the treebuilder, making insertion O(1)
127
128 * The build system now accepts an option EMBED_SSH_PATH which when set
129 tells it to include a copy of libssh2 at the given location. This is
130 enabled for MSVC.
131
132 * Add support for refspecs with the asterisk in the middle of a
133 pattern.
134
135 * Fetching now performs opportunistic updates. To achieve this, we
136 introduce a difference between active and passive refspecs, which
137 make `git_remote_download()` and `git_remote_fetch()` to take a list of
138 resfpecs to be the active list, similarly to how git fetch accepts a
139 list on the command-line.
140
141 * The THREADSAFE option to build libgit2 with threading support has
142 been flipped to be on by default.
143
144 * The remote object has learnt to prune remote-tracking branches. If
145 the remote is configured to do so, this will happen via
146 `git_remote_fetch()`. You can also call `git_remote_prune()` after
147 connecting or fetching to perform the prune.
148
149
150 ### API additions
151
152 * Introduce `git_buf_text_is_binary()` and `git_buf_text_contains_nul()` for
153 consumers to perform binary detection on a git_buf.
154
155 * `git_branch_upstream_remote()` has been introduced to provide the
156 branch.<name>.remote configuration value.
157
158 * Introduce `git_describe_commit()` and `git_describe_workdir()` to provide
159 a description of the current commit (and working tree, respectively)
160 based on the nearest tag or reference
161
162 * Introduce `git_merge_bases()` and the `git_oidarray` type to expose all
163 merge bases between two commits.
164
165 * Introduce `git_merge_bases_many()` to expose all merge bases between
166 multiple commits.
167
168 * Introduce rebase functionality (using the merge algorithm only).
169 Introduce `git_rebase_init()` to begin a new rebase session,
170 `git_rebase_open()` to open an in-progress rebase session,
171 `git_rebase_commit()` to commit the current rebase operation,
172 `git_rebase_next()` to apply the next rebase operation,
173 `git_rebase_abort()` to abort an in-progress rebase and `git_rebase_finish()`
174 to complete a rebase operation.
175
176 * Introduce `git_note_author()` and `git_note_committer()` to get the author
177 and committer information on a `git_note`, respectively.
178
179 * A factory function for ssh has been added which allows to change the
180 path of the programs to execute for receive-pack and upload-pack on
181 the server, `git_transport_ssh_with_paths()`.
182
183 * The ssh transport supports asking the remote host for accepted
184 credential types as well as multiple challeges using a single
185 connection. This requires to know which username you want to connect
186 as, so this introduces the USERNAME credential type which the ssh
187 transport will use to ask for the username.
188
189 * The `GIT_EPEEL` error code has been introduced when we cannot peel a tag
190 to the requested object type; if the given object otherwise cannot be
191 peeled, `GIT_EINVALIDSPEC` is returned.
192
193 * Introduce `GIT_REPOSITORY_INIT_RELATIVE_GITLINK` to use relative paths
194 when writing gitlinks, as is used by git core for submodules.
195
196 * `git_remote_prune()` has been added. See above for description.
197
198
199 * Introduce reference transactions, which allow multiple references to
200 be locked at the same time and updates be queued. This also allows
201 us to safely update a reflog with arbitrary contents, as we need to
202 do for stash.
203
204 ### API removals
205
206 * `git_remote_supported_url()` and `git_remote_is_valid_url()` have been
207 removed as they have become essentially useless with rsync-style ssh paths.
208
209 * `git_clone_into()` and `git_clone_local_into()` have been removed from the
210 public API in favour of `git_clone callbacks`.
211
212 * The option to ignore certificate errors via `git_remote_cert_check()`
213 is no longer present. Instead, `git_remote_callbacks` has gained a new
214 entry which lets the user perform their own certificate checks.
215
216 ### Breaking API changes
217
218 * `git_cherry_pick()` is now `git_cherrypick()`.
219
220 * The `git_submodule_update()` function was renamed to
221 `git_submodule_update_strategy()`. `git_submodule_update()` is now used to
222 provide functionalty similar to "git submodule update".
223
224 * `git_treebuilder_create()` was renamed to `git_treebuilder_new()` to better
225 reflect it being a constructor rather than something which writes to
226 disk.
227
228 * `git_treebuilder_new()` (was `git_treebuilder_create()`) now takes a
229 repository so that it can query repository configuration.
230 Subsequently, `git_treebuilder_write()` no longer takes a repository.
231
232 * `git_threads_init()` and `git_threads_shutdown()` have been renamed to
233 `git_libgit2_init()` and `git_libgit2_shutdown()` to better explain what
234 their purpose is, as it's grown to be more than just about threads.
235
236 * `git_libgit2_init()` and `git_libgit2_shutdown()` now return the number of
237 initializations of the library, so consumers may schedule work on the
238 first initialization.
239
240 * The `git_transport_register()` function no longer takes a priority and takes
241 a URL scheme name (eg "http") instead of a prefix like "http://"
242
243 * `git_index_name_entrycount()` and `git_index_reuc_entrycount()` now
244 return size_t instead of unsigned int.
245
246 * The `context_lines` and `interhunk_lines` fields in `git_diff`_options are
247 now `uint32_t` instead of `uint16_t`. This allows to set them to `UINT_MAX`,
248 in effect asking for "infinite" context e.g. to iterate over all the
249 unmodified lines of a diff.
250
251 * `git_status_file()` now takes an exact path. Use `git_status_list_new()` if
252 pathspec searching is needed.
253
254 * `git_note_create()` has changed the position of the notes reference
255 name to match `git_note_remove()`.
256
257 * Rename `git_remote_load()` to `git_remote_lookup()` to bring it in line
258 with the rest of the lookup functions.
259
260 * `git_remote_rename()` now takes the repository and the remote's
261 current name. Accepting a remote indicates we want to change it,
262 which we only did partially. It is much clearer if we accept a name
263 and no loaded objects are changed.
264
265 * `git_remote_delete()` now accepts the repository and the remote's name
266 instead of a loaded remote.
267
268 * `git_merge_head` is now `git_annotated_commit`, to better reflect its usage
269 for multiple functions (including rebase)
270
271 * The `git_clone_options` struct no longer provides the `ignore_cert_errors` or
272 `remote_name` members for remote customization.
273
274 Instead, the `git_clone_options` struct has two new members, `remote_cb` and
275 `remote_cb_payload`, which allow the caller to completely override the remote
276 creation process. If needed, the caller can use this callback to give their
277 remote a name other than the default (origin) or disable cert checking.
278
279 The `remote_callbacks` member has been preserved for convenience, although it
280 is not used when a remote creation callback is supplied.
281
282 * The `git_clone`_options struct now provides `repository_cb` and
283 `repository_cb_payload` to allow the user to create a repository with
284 custom options.
285
286 * The `git_push` struct to perform a push has been replaced with
287 `git_remote_upload()`. The refspecs and options are passed as a
288 function argument. `git_push_update_tips()` is now also
289 `git_remote_update_tips()` and the callbacks are in the same struct as
290 the rest.
291
292 * The `git_remote_set_transport()` function now sets a transport factory function,
293 rather than a pre-existing transport instance.
294
295 * The `git_transport` structure definition has moved into the sys/transport.h
296 file.
297
298 * libgit2 no longer automatically sets the OpenSSL locking
299 functions. This is not something which we can know to do. A
300 last-resort convenience function is provided in sys/openssl.h,
301 `git_openssl_set_locking()` which can be used to set the locking.