]> git.proxmox.com Git - libgit2.git/blob - docs/changelog.md
Refresh patches
[libgit2.git] / docs / changelog.md
1 v1.3
2 ----
3
4 This is release v1.3.0, "Zugunruhe". This release includes only minor new features that will be helpful for users to have an orderly transition to the v2.0 lineage.
5
6 ## New Features
7 * Support custom git extensions by @ethomson in https://github.com/libgit2/libgit2/pull/6031
8 * Introduce `git_email_create`; deprecate `git_diff_format_email` by @ethomson in https://github.com/libgit2/libgit2/pull/6061
9
10 ## Deprecated APIs
11 * `git_oidarray_free` is deprecated; callers should use `git_oidarray_dispose`
12
13 ## Bug fixes
14 * #6028: Check if `threadstate->error_t.message` is not `git_buf__initbuf` before freeing. by @arroz in https://github.com/libgit2/libgit2/pull/6029
15 * remote: Mark `git_remote_name_is_valid` as `GIT_EXTERN` by @lhchavez in https://github.com/libgit2/libgit2/pull/6032
16 * Fix config parsing for multiline with multiple quoted comment chars by @basile-henry in https://github.com/libgit2/libgit2/pull/6043
17 * indexer: Avoid one `mmap(2)`/`munmap(2)` pair per `git_indexer_append` call by @lhchavez in https://github.com/libgit2/libgit2/pull/6039
18 * merge: Check file mode when resolving renames by @ccstolley in https://github.com/libgit2/libgit2/pull/6060
19 * Allow proxy options when connecting with a detached remote. by @lrm29 in https://github.com/libgit2/libgit2/pull/6058
20 * win32: allow empty environment variables by @ethomson in https://github.com/libgit2/libgit2/pull/6063
21 * Fixes for deprecated APIs by @ethomson in https://github.com/libgit2/libgit2/pull/6066
22 * filter: use a `git_oid` in filter options, not a pointer by @ethomson in https://github.com/libgit2/libgit2/pull/6067
23 * diff: update `GIT_DIFF_IGNORE_BLANK_LINES` by @ethomson in https://github.com/libgit2/libgit2/pull/6068
24 * Attribute lookups are always on relative paths by @ethomson in https://github.com/libgit2/libgit2/pull/6073
25 * Handle long paths when querying attributes by @ethomson in https://github.com/libgit2/libgit2/pull/6075
26
27 ## Code cleanups
28 * notes: use a buffer internally by @ethomson in https://github.com/libgit2/libgit2/pull/6047
29 * Fix coding style for pointer by @punkymaniac in https://github.com/libgit2/libgit2/pull/6045
30 * Use __typeof__ GNUC keyword for ISO C compatibility by @duncanthomson in https://github.com/libgit2/libgit2/pull/6041
31 * Discover libssh2 without pkg-config by @stac47 in https://github.com/libgit2/libgit2/pull/6053
32 * Longpath filter bug by @lrm29 in https://github.com/libgit2/libgit2/pull/6055
33 * Add test to ensure empty proxy env behaves like unset env by @sathieu in https://github.com/libgit2/libgit2/pull/6052
34 * Stdint header condition has been reverted. by @lolgear in https://github.com/libgit2/libgit2/pull/6020
35 * buf: `common_prefix` takes a string array by @ethomson in https://github.com/libgit2/libgit2/pull/6077
36 * oidarray: introduce `git_oidarray_dispose` by @ethomson in https://github.com/libgit2/libgit2/pull/6076
37 * examples: Free the git_config and git_config_entry after use by @257 in https://github.com/libgit2/libgit2/pull/6071
38
39 ## CI Improvements
40 * ci: pull libssh2 from www.libssh2.org by @ethomson in https://github.com/libgit2/libgit2/pull/6064
41
42 ## Documentation changes
43 * Update README.md by @shijinglu in https://github.com/libgit2/libgit2/pull/6050
44
45 ## New Contributors
46 * @basile-henry made their first contribution in https://github.com/libgit2/libgit2/pull/6043
47 * @duncanthomson made their first contribution in https://github.com/libgit2/libgit2/pull/6041
48 * @stac47 made their first contribution in https://github.com/libgit2/libgit2/pull/6053
49 * @shijinglu made their first contribution in https://github.com/libgit2/libgit2/pull/6050
50 * @ccstolley made their first contribution in https://github.com/libgit2/libgit2/pull/6060
51 * @sathieu made their first contribution in https://github.com/libgit2/libgit2/pull/6052
52 * @257 made their first contribution in https://github.com/libgit2/libgit2/pull/6071
53
54 **Full Changelog**: https://github.com/libgit2/libgit2/compare/v1.2.0...v1.3.0
55
56 ---------------------------------------------------------------------
57
58 v1.2
59 -----
60
61 This is release v1.2.0, "Absacker". This release includes many new features: in particular, support for commit graphs, multi-pack indexes, and `core.longpaths` support.
62
63 This is meant to be the final minor release in the v1 lineage. v2.0 will be the next major release and will remove deprecated APIs and may include breaking changes.
64
65 ## Deprecated APIs
66
67 * revspec: rename git_revparse_mode_t to git_revspec_t by @ethomson in https://github.com/libgit2/libgit2/pull/5786
68 * tree: deprecate `git_treebuilder_write_with_buffer` by @ethomson in https://github.com/libgit2/libgit2/pull/5815
69 * Deprecate `is_valid_name` functions; replace with `name_is_valid` functions by @ethomson in https://github.com/libgit2/libgit2/pull/5659
70 * filter: stop taking git_buf as user input by @ethomson in https://github.com/libgit2/libgit2/pull/5859
71 * remote: introduce remote_ready_cb, deprecate resolve_url callback by @ethomson in https://github.com/libgit2/libgit2/pull/6012
72 * Introduce `create_commit_cb`, deprecate `signing_cb` by @ethomson in https://github.com/libgit2/libgit2/pull/6016
73 * filter: filter drivers stop taking git_buf as user input by @ethomson in https://github.com/libgit2/libgit2/pull/6011
74 * buf: deprecate public git_buf writing functions by @ethomson in https://github.com/libgit2/libgit2/pull/6017
75
76 ## New features
77
78 * winhttp: support optional client cert by @ianhattendorf in https://github.com/libgit2/libgit2/pull/5384
79 * Add support for additional SSH hostkey types. by @arroz in https://github.com/libgit2/libgit2/pull/5750
80 * Handle ipv6 addresses by @ethomson in https://github.com/libgit2/libgit2/pull/5741
81 * zlib: Add support for building with Chromium's zlib implementation by @lhchavez in https://github.com/libgit2/libgit2/pull/5748
82 * commit-graph: Introduce a parser for commit-graph files by @lhchavez in https://github.com/libgit2/libgit2/pull/5762
83 * patch: add owner accessor by @KOLANICH in https://github.com/libgit2/libgit2/pull/5731
84 * commit-graph: Support lookups of entries in a commit-graph by @lhchavez in https://github.com/libgit2/libgit2/pull/5763
85 * commit-graph: Introduce `git_commit_graph_needs_refresh()` by @lhchavez in https://github.com/libgit2/libgit2/pull/5764
86 * Working directory path validation by @ethomson in https://github.com/libgit2/libgit2/pull/5823
87 * Support `core.longpaths` on Windows by @ethomson in https://github.com/libgit2/libgit2/pull/5857
88 * git_reference_create_matching: Treat all-zero OID as "must be absent" by @novalis in https://github.com/libgit2/libgit2/pull/5842
89 * diff:add option to ignore blank line changes by @yuuri in https://github.com/libgit2/libgit2/pull/5853
90 * [Submodule] Git submodule dup by @lolgear in https://github.com/libgit2/libgit2/pull/5890
91 * commit-graph: Use the commit-graph in revwalks by @lhchavez in https://github.com/libgit2/libgit2/pull/5765
92 * commit-graph: Introduce `git_commit_list_generation_cmp` by @lhchavez in https://github.com/libgit2/libgit2/pull/5766
93 * graph: Create `git_graph_reachable_from_any()` by @lhchavez in https://github.com/libgit2/libgit2/pull/5767
94 * Support reading attributes from a specific commit by @ethomson in https://github.com/libgit2/libgit2/pull/5952
95 * [Branch] Branch upstream with format by @lolgear in https://github.com/libgit2/libgit2/pull/5861
96 * Dynamically load OpenSSL (optionally) by @ethomson in https://github.com/libgit2/libgit2/pull/5974
97 * Set refs/remotes/origin/HEAD to default branch when branch is specified by @A-Ovchinnikov-mx in https://github.com/libgit2/libgit2/pull/6010
98 * midx: Add a way to write multi-pack-index files by @lhchavez in https://github.com/libgit2/libgit2/pull/5404
99 * Use error code GIT_EAUTH for authentication failures by @josharian in https://github.com/libgit2/libgit2/pull/5395
100 * midx: Introduce git_odb_write_multi_pack_index() by @lhchavez in https://github.com/libgit2/libgit2/pull/5405
101 * Checkout dry-run by @J0Nes90 in https://github.com/libgit2/libgit2/pull/5841
102 * mbedTLS: Fix setting certificate directory by @mikezackles in https://github.com/libgit2/libgit2/pull/6004
103 * remote: introduce remote_ready_cb, deprecate resolve_url callback by @ethomson in https://github.com/libgit2/libgit2/pull/6012
104 * Introduce `create_commit_cb`, deprecate `signing_cb` by @ethomson in https://github.com/libgit2/libgit2/pull/6016
105 * commit-graph: Add a way to write commit-graph files by @lhchavez in https://github.com/libgit2/libgit2/pull/5778
106
107 ## Bug fixes
108
109 * Define `git___load` when building with `-DTHREADSAFE=OFF` by @lhchavez in https://github.com/libgit2/libgit2/pull/5664
110 * Make the Windows leak detection more robust by @lhchavez in https://github.com/libgit2/libgit2/pull/5661
111 * Refactor "global" state by @ethomson in https://github.com/libgit2/libgit2/pull/5546
112 * threadstate: rename tlsdata when building w/o threads by @ethomson in https://github.com/libgit2/libgit2/pull/5668
113 * Include `${MBEDTLS_INCLUDE_DIR}` when compiling `crypt_mbedtls.c` by @staticfloat in https://github.com/libgit2/libgit2/pull/5685
114 * Fix the `-DTHREADSAFE=OFF` build by @lhchavez in https://github.com/libgit2/libgit2/pull/5690
115 * Add missing worktree_dir check and test case by @rbmclean in https://github.com/libgit2/libgit2/pull/5692
116 * msvc crtdbg -> win32 leakcheck by @ethomson in https://github.com/libgit2/libgit2/pull/5580
117 * Introduce GIT_ASSERT macros by @ethomson in https://github.com/libgit2/libgit2/pull/5327
118 * Also add the raw hostkey to `git_cert_hostkey` by @lhchavez in https://github.com/libgit2/libgit2/pull/5704
119 * Make the odb race-free by @lhchavez in https://github.com/libgit2/libgit2/pull/5595
120 * Make the pack and mwindow implementations data-race-free by @lhchavez in https://github.com/libgit2/libgit2/pull/5593
121 * Thread-free implementation by @ethomson in https://github.com/libgit2/libgit2/pull/5719
122 * Thread-local storage: a generic internal library (with no allocations) by @ethomson in https://github.com/libgit2/libgit2/pull/5720
123 * Friendlier getting started in the lack of git_libgit2_init by @ethomson in https://github.com/libgit2/libgit2/pull/5578
124 * Make git__strntol64() ~70%* faster by @lhchavez in https://github.com/libgit2/libgit2/pull/5735
125 * Cache the parsed submodule config when diffing by @lhchavez in https://github.com/libgit2/libgit2/pull/5727
126 * pack: continue zlib while we can make progress by @ethomson in https://github.com/libgit2/libgit2/pull/5740
127 * Avoid using `__builtin_mul_overflow` with the clang+32-bit combo by @lhchavez in https://github.com/libgit2/libgit2/pull/5742
128 * repository: use intptr_t's in the config map cache by @ethomson in https://github.com/libgit2/libgit2/pull/5746
129 * Build with NO_MMAP by @0xdky in https://github.com/libgit2/libgit2/pull/5583
130 * Add documentation for git_blob_filter_options.version by @JoshuaS3 in https://github.com/libgit2/libgit2/pull/5759
131 * blob: fix name of `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD` by @ethomson in https://github.com/libgit2/libgit2/pull/5760
132 * Cope with empty default branch by @ethomson in https://github.com/libgit2/libgit2/pull/5770
133 * README: instructions for using libgit2 without compiling by @ethomson in https://github.com/libgit2/libgit2/pull/5772
134 * Use `p_pwrite`/`p_pread` consistently throughout the codebase by @lhchavez in https://github.com/libgit2/libgit2/pull/5769
135 * midx: Fix a bug in `git_midx_needs_refresh()` by @lhchavez in https://github.com/libgit2/libgit2/pull/5768
136 * mwindow: Fix a bug in the LRU window finding code by @lhchavez in https://github.com/libgit2/libgit2/pull/5783
137 * refdb_fs: Check git_sortedcache wlock/rlock errors by @mamapanda in https://github.com/libgit2/libgit2/pull/5800
138 * index: Check git_vector_dup error in write_entries by @mamapanda in https://github.com/libgit2/libgit2/pull/5801
139 * Fix documentation formating on repository.h by @punkymaniac in https://github.com/libgit2/libgit2/pull/5806
140 * include: fix typos in comments by @tniessen in https://github.com/libgit2/libgit2/pull/5805
141 * Fix some typos by @aaronfranke in https://github.com/libgit2/libgit2/pull/5797
142 * Check git_signature_dup failure by @mamapanda in https://github.com/libgit2/libgit2/pull/5817
143 * merge: Check insert_head_ids error in create_virtual_base by @mamapanda in https://github.com/libgit2/libgit2/pull/5818
144 * winhttp: skip certificate check if unable to send request by @ianhattendorf in https://github.com/libgit2/libgit2/pull/5814
145 * Default to GIT_BRANCH_DEFAULT if init.defaultBranch is empty string by @ianhattendorf in https://github.com/libgit2/libgit2/pull/5832
146 * Fix diff_entrycount -> diff_num_deltas doc typo by @mjsir911 in https://github.com/libgit2/libgit2/pull/5838
147 * repo: specify init.defaultbranch is meant to be a branch name by @carlosmn in https://github.com/libgit2/libgit2/pull/5835
148 * repo: remove an inappropriate use of PASSTHROUGH by @carlosmn in https://github.com/libgit2/libgit2/pull/5834
149 * src: fix typos in header files by @tniessen in https://github.com/libgit2/libgit2/pull/5843
150 * test: clean up memory leaks by @ethomson in https://github.com/libgit2/libgit2/pull/5858
151 * buf: remove unnecessary buf_text namespace by @ethomson in https://github.com/libgit2/libgit2/pull/5860
152 * Fix bug in git_diff_find_similar. by @staktrace in https://github.com/libgit2/libgit2/pull/5839
153 * Fix issues with Proxy Authentication after httpclient refactor by @implausible in https://github.com/libgit2/libgit2/pull/5852
154 * tests: clean up memory leak, fail on leak for win32 by @ethomson in https://github.com/libgit2/libgit2/pull/5892
155 * Tolerate readlink size less than st_size by @dtolnay in https://github.com/libgit2/libgit2/pull/5900
156 * Define WINHTTP_NO_CLIENT_CERT_CONTEXT if needed by @jacquesg in https://github.com/libgit2/libgit2/pull/5929
157 * Update from regex to pcre licensing information in docs/contributing.md by @boretrk in https://github.com/libgit2/libgit2/pull/5916
158 * Consider files executable only if the user can execute them by @novalis in https://github.com/libgit2/libgit2/pull/5915
159 * git__timer: Limit ITimer usage to AmigaOS4 by @boretrk in https://github.com/libgit2/libgit2/pull/5936
160 * Fix memory leak in git_smart__connect by @punkymaniac in https://github.com/libgit2/libgit2/pull/5908
161 * config: fix included configs not refreshed more than once by @Batchyx in https://github.com/libgit2/libgit2/pull/5926
162 * Fix wrong time_t used in function by @NattyNarwhal in https://github.com/libgit2/libgit2/pull/5938
163 * fix check for ignoring of negate rules by @palmin in https://github.com/libgit2/libgit2/pull/5824
164 * Make `FIND_PACKAGE(PythonInterp)` prefer `python3` by @lhchavez in https://github.com/libgit2/libgit2/pull/5913
165 * git__timer: Allow compilation on systems without CLOCK_MONOTONIC by @boretrk in https://github.com/libgit2/libgit2/pull/5945
166 * stdintification: use int64_t and INT64_C instead of long long by @NattyNarwhal in https://github.com/libgit2/libgit2/pull/5941
167 * Optional stricter allocation checking (for `malloc(0)` cases) by @ethomson in https://github.com/libgit2/libgit2/pull/5951
168 * Variadic arguments aren't in C89 by @NattyNarwhal in https://github.com/libgit2/libgit2/pull/5948
169 * Fix typo in general.c by @Crayon2000 in https://github.com/libgit2/libgit2/pull/5954
170 * common.h: use inline when compiling for C99 and later by @boretrk in https://github.com/libgit2/libgit2/pull/5953
171 * Fix one memory leak in master by @lhchavez in https://github.com/libgit2/libgit2/pull/5957
172 * tests: reset odb backend priority by @ethomson in https://github.com/libgit2/libgit2/pull/5961
173 * cmake: extended futimens checking on macOS by @ethomson in https://github.com/libgit2/libgit2/pull/5962
174 * amiga: use ';' as path list separator on AmigaOS by @boretrk in https://github.com/libgit2/libgit2/pull/5978
175 * Respect the force flag on refspecs in git_remote_fetch by @alexjg in https://github.com/libgit2/libgit2/pull/5854
176 * Fix LIBGIT2_FILENAME not being passed to the resource compiler by @jairbubbles in https://github.com/libgit2/libgit2/pull/5994
177 * sha1dc: remove conditional for <sys/types.h> by @boretrk in https://github.com/libgit2/libgit2/pull/5997
178 * openssl: don't fail when we can't customize allocators by @ethomson in https://github.com/libgit2/libgit2/pull/5999
179 * C11 warnings by @boretrk in https://github.com/libgit2/libgit2/pull/6005
180 * open: input validation for empty segments in path by @boretrk in https://github.com/libgit2/libgit2/pull/5950
181 * Introduce GIT_WARN_UNUSED_RESULT by @lhchavez in https://github.com/libgit2/libgit2/pull/5802
182 * GCC C11 warnings by @boretrk in https://github.com/libgit2/libgit2/pull/6006
183 * array: check dereference from void * type by @boretrk in https://github.com/libgit2/libgit2/pull/6007
184 * Homogenize semantics for atomic-related functions by @lhchavez in https://github.com/libgit2/libgit2/pull/5747
185 * git_array_alloc: return objects of correct type by @boretrk in https://github.com/libgit2/libgit2/pull/6008
186 * CMake. hash sha1 header has been added. by @lolgear in https://github.com/libgit2/libgit2/pull/6013
187 * tests: change comments to c89 style by @boretrk in https://github.com/libgit2/libgit2/pull/6015
188 * Set Host Header to match CONNECT authority target by @lollipopman in https://github.com/libgit2/libgit2/pull/6022
189 * Fix worktree iteration when repository has no common directory by @kcsaul in https://github.com/libgit2/libgit2/pull/5943
190
191 ## Documentation improvements
192
193 * Update README.md for additional Delphi bindings by @todaysoftware in https://github.com/libgit2/libgit2/pull/5831
194 * Fix documentation formatting by @punkymaniac in https://github.com/libgit2/libgit2/pull/5850
195 * docs: fix incorrect comment marker by @tiennou in https://github.com/libgit2/libgit2/pull/5897
196 * Patch documentation by @punkymaniac in https://github.com/libgit2/libgit2/pull/5903
197 * Fix misleading doc for `git_index_find` by @arxanas in https://github.com/libgit2/libgit2/pull/5910
198 * docs: stop mentioning libgit2's "master" branch by @Batchyx in https://github.com/libgit2/libgit2/pull/5925
199 * docs: fix some missing includes that cause Docurium to error out by @tiennou in https://github.com/libgit2/libgit2/pull/5917
200 * Patch documentation by @punkymaniac in https://github.com/libgit2/libgit2/pull/5940
201
202 ## Development improvements
203
204 * WIP: .devcontainer: settings for a codespace workflow by @ethomson in https://github.com/libgit2/libgit2/pull/5508
205
206 ## CI Improvements
207
208 * Add a ThreadSanitizer build by @lhchavez in https://github.com/libgit2/libgit2/pull/5597
209 * ci: more GitHub Actions by @ethomson in https://github.com/libgit2/libgit2/pull/5706
210 * ci: run coverity in the nightly builds by @ethomson in https://github.com/libgit2/libgit2/pull/5707
211 * ci: only report main branch in README status by @ethomson in https://github.com/libgit2/libgit2/pull/5708
212 * Fix the `ENABLE_WERROR=ON` build in Groovy Gorilla (gcc 10.2) by @lhchavez in https://github.com/libgit2/libgit2/pull/5715
213 * Re-enable the RC4 test by @carlosmn in https://github.com/libgit2/libgit2/pull/4418
214 * ci: run codeql by @ethomson in https://github.com/libgit2/libgit2/pull/5709
215 * github-actions: Also rename the main branch here by @lhchavez in https://github.com/libgit2/libgit2/pull/5771
216 * ci: don't use ninja on macOS by @ethomson in https://github.com/libgit2/libgit2/pull/5780
217 * ci: use GitHub for storing mingw-w64 build dependency by @ethomson in https://github.com/libgit2/libgit2/pull/5855
218 * docker: remove the entrypoint by @ethomson in https://github.com/libgit2/libgit2/pull/5980
219 * http: don't require a password by @ethomson in https://github.com/libgit2/libgit2/pull/5972
220 * ci: update nightly to use source path by @ethomson in https://github.com/libgit2/libgit2/pull/5989
221 * ci: add centos 7 and centos 8 by @ethomson in https://github.com/libgit2/libgit2/pull/5992
222 * ci: update centos builds by @ethomson in https://github.com/libgit2/libgit2/pull/5995
223 * ci: tag new containers with the latest tag by @ethomson in https://github.com/libgit2/libgit2/pull/6000
224
225 ## Dependency updates
226
227 * ntlm: [ntlmclient](https://github.com/ethomson/ntlmclient) is now v0.9.1
228
229 **Full Changelog**: https://github.com/libgit2/libgit2/compare/v1.1.0...v1.2.0
230
231 ---------------------------------------------------------------------
232
233 v1.1
234 ----
235
236 This is release v1.1, "Fernweh".
237
238 ### Changes or improvements
239
240 * Our bundled PCRE dependency has been updated to 8.44.
241
242 * The `refs/remotes/origin/HEAD` file will be created at clone time to
243 point to the origin's default branch.
244
245 * libgit2 now uses the `__atomic_` intrinsics instead of `__sync_`
246 intrinsics on supported gcc and clang versions.
247
248 * The `init.defaultBranch` setting is now respected and `master` is
249 no longer the hardcoded as the default branch name.
250
251 * Patch files that do not contain an `index` line can now be parsed.
252
253 * Configuration files with multi-line values can now contain quotes
254 split across multiple lines.
255
256 * Windows clients now attempt to use TLS1.3 when available.
257
258 * Servers that request an upgrade to a newer HTTP version are
259 silently ignored instead of erroneously failing.
260
261 * Users can pass `NULL` to the options argument to
262 `git_describe_commit`.
263
264 * Clones and fetches of very large packfiles now succeeds on 32-bit
265 platforms.
266
267 * Custom reference database backends can now handle the repository's
268 `HEAD` correctly.
269
270 * Repositories with a large number of packfiles no longer exhaust the
271 number of file descriptors.
272
273 * The test framework now supports TAP output when the `-t` flag is
274 specified.
275
276 * The test framework can now specify an exact match to a test
277 function using a trailing `$`.
278
279 * All checkout types support `GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH`.
280
281 * `git_blame` now can ignore whitespace changes using the option
282 `GIT_BLAME_IGNORE_WHITESPACE`.
283
284 * Several new examples have been created, including an examples for
285 commit, add and push.
286
287 * Mode changes during rename are now supported in patch application.
288
289 * `git_checkout_head` now correctly removes untracked files in a
290 subdirectory when the `FORCE | REMOVE_UNTRACKED` options are specified.
291
292 v1.0.1
293 ------
294
295 This is a bugfix release with the following changes:
296
297 - Calculating information about renamed files during merges is more
298 efficient because dissimilarity about files is now being cached and
299 no longer needs to be recomputed.
300
301 - The `git_worktree_prune_init_options` has been correctly restored for
302 backward compatibility. In v1.0 it was incorrectly deprecated with a
303 typo.
304
305 - The optional ntlmclient dependency now supports NetBSD.
306
307 - A bug where attempting to stash on a bare repository may have failed
308 has been fixed.
309
310 - Configuration files that are unreadable due to permissions are now
311 silently ignored, and treated as if they do not exist. This matches
312 git's behavior; previously this case would have been an error.
313
314 - v4 index files are now correctly written; previously we would read
315 them correctly but would not write the prefix-compression accurately,
316 causing corruption.
317
318 - A bug where the smart HTTP transport could not read large data packets
319 has been fixed. Previously, fetching from servers like Gerrit, that
320 sent large data packets, would error.
321
322 ---------------------------------------------------------------------
323
324 v1.0
325 ----
326
327 This is release v1.0 "Luftschloss", which is the first stabe release of
328 libgit2. The API will stay compatible across all releases of the same major
329 version. This release includes bugfixes only and supersedes v0.99, which will
330 stop being maintained. Both v0.27 and v0.28 stay supported in accordance with
331 our release policy.
332
333 ### Changes or improvements
334
335 - CMake was converted to make use of the GNUInstallDirs module for both our
336 pkgconfig and install targets in favor of our custom build options
337 `BIN_INSTALL_DIR`, `LIB_INSTALL_DIR` and `INCLUDE_INSTALL_DIR`. Instead, you
338 can now use CMakes standard variables `CMAKE_INSTALL_BINDIR`,
339 `CMAKE_INSTALL_LIBDIR` and `CMAKE_INSTALL_INCLUDEDIR`.
340
341 - Some CMake build options accepted either a specific value or a boolean value
342 to disable the option altogether or use automatic detection. We only accepted
343 "ON" or "OFF", but none of the other values CMake recognizes as boolean. This
344 was aligned with CMake's understanding of booleans.
345
346 - The installed pkgconfig file contained incorrect values for both `libdir` and
347 `includedir` variables.
348
349 - If using pcre2 for regular expressions, then we incorrectly added "pcre2"
350 instead of "pcre2-8" to our pkgconfig dependencies, which was corrected.
351
352 - Fixed building the bundled ntlmclient dependency on FreeBSD, OpenBSD and
353 SunOS.
354
355 - When writing symlinks on Windows, we incorrectly handled relative symlink
356 targets, which was corrected.
357
358 - When using the HTTP protocol via macOS' SecureTransport implementation, reads
359 could stall at the end of the session and only continue after a timeout of 60
360 seconds was reached.
361
362 - The filesystem-based reference callback didn't corectly initialize the backend
363 version.
364
365 - A segmentation fault was fixed when calling `git_blame_buffer()` for files
366 that were modified and added to the index.
367
368 - A backwards-incompatible change was introduced when we moved some structures
369 from "git2/credentials.h" into "git2/sys/credentials.h". This was fixed in the
370 case where you do not use hard deprecation.
371
372 - Improved error handling in various places.
373
374
375 v0.99
376 -----
377
378 This is v0.99 "Torschlusspanik". This will be the last minor release
379 before libgit2 v1.0. We expect to only respond to bugs in this release,
380 to stabilize it for next major release.
381
382 It contains significant refactorings, but is expected to be API-compatible
383 with v0.28.0.
384
385 ### Changes or improvements
386
387 * When fetching from an anonymous remote using a URL with authentication
388 information provided in the URL (eg `https://foo:bar@example.com/repo`),
389 we would erroneously include the literal URL in the FETCH_HEAD file.
390 We now remove that to match git's behavior.
391
392 * Some credential structures, enums and values have been renamed:
393 `git_cred` is now `git_credential`. `git_credtype_t` is now
394 `git_credential_t`. Functions and types beginning with
395 `git_cred_` now begin with `git_credential`, and constants beginning
396 with `GIT_CREDTYPE` now begin with `GIT_CREDENTIAL`. The former names
397 are deprecated.
398
399 * Several function signatures have been changed to return an `int` to
400 indicate error conditions. We encourage you to check them for errors
401 in the standard way.
402
403 * `git_attr_cache_flush`
404 * `git_error_set_str`
405 * `git_index_name_clear`
406 * `git_index_reuc_clear`
407 * `git_libgit2_version`
408 * `git_mempack_reset`
409 * `git_oid_cpy`
410 * `git_oid_fmt`
411 * `git_oid_fromraw`
412 * `git_oid_nfmt`
413 * `git_oid_pathfmt`
414 * `git_remote_stop`
415 * `git_remote_disconnect`
416 * `git_repository__cleanup`
417 * `git_repository_set_config`
418 * `git_repository_set_index`
419 * `git_repository_set_odb`
420 * `git_repository_set_refdb`
421 * `git_revwalk_reset`
422 * `git_revwalk_simplify_first_parent`
423 * `git_revwalk_sorting`
424 * `git_treebuilder_clear`
425 * `git_treebuilder_filter`
426
427 * The NTLM and Negotiate authentication mechanisms are now supported when
428 talking to git implementations hosted on Apache or nginx servers.
429
430 * The `HEAD` symbolic reference can no longer be deleted.
431
432 * `git_merge_driver_source_repo` no longer returns a `const git_repository *`,
433 it now returns a non-`const` `git_repository *`.
434
435 * Relative symbolic links are now supported on Windows when `core.symlinks`
436 is enabled.
437
438 * Servers that provide query parameters with a redirect are now supported.
439
440 * `git_submodule_sync` will now resolve relative URLs.
441
442 * When creating git endpoint URLs, double-slashes are no longer used when
443 the given git URL has a trailing slash.
444
445 * On Windows, a `DllMain` function is no longer included and thread-local
446 storage has moved to fiber-local storage in order to prevent race
447 conditions during shutdown.
448
449 * The tracing mechanism (`GIT_TRACE`) is now enabled by default and does
450 not need to be explicitly enabled in CMake.
451
452 * The size of Git objects is now represented by `git_object_size_t`
453 instead of `off_t`.
454
455 * Binary patches without data can now be parsed.
456
457 * A configuration snapshot can now be created from another configuration
458 snapshot, not just a "true" configuration object.
459
460 * The `git_commit_with_signature` API will now ensure that referenced
461 objects exist in the object database.
462
463 * Stash messages containing newlines will now be replaced with spaces;
464 they will no longer be (erroneously) written to the repository.
465
466 * `git_commit_create_with_signature` now verifies the commit information
467 to ensure that it points to a valid tree and valid parents.
468
469 * `git_apply` has an option `GIT_APPLY_CHECK` that will only do a dry-run.
470 The index and working directory will remain unmodified, and application
471 will report if it would have worked.
472
473 * Patches produced by Mercurial (those that lack some git extended headers)
474 can now be parsed and applied.
475
476 * Reference locks are obeyed correctly on POSIX platforms, instead of
477 being removed.
478
479 * Patches with empty new files can now be read and applied.
480
481 * `git_apply_to_tree` can now correctly apply patches that add new files.
482
483 * The program data configuration on Windows (`C:\ProgramData\Git\config`)
484 must be owned by an administrator, a system account or the current user
485 to be read.
486
487 * `git_blob_filtered_content` is now deprecated in favor of `git_blob_filter`.
488
489 * Configuration files can now be included conditionally using the
490 `onbranch` conditional.
491
492 * Checkout can now properly create and remove symbolic links to directories
493 on Windows.
494
495 * Stash no longer recomputes trees when committing a worktree, for
496 improved performance.
497
498 * Repository templates can now include a `HEAD` file to default the
499 initial default branch.
500
501 * Some configuration structures, enums and values have been renamed:
502 `git_cvar_map` is now `git_configmap`, `git_cvar_t` is now
503 `git_configmap_t`, `GIT_CVAR_FALSE` is now `GIT_CONFIGMAP_FALSE`,
504 `GIT_CVAR_TRUE` is now `GIT_CONFIGMAP_TRUE`, `GIT_CVAR_INT32` is now
505 `GIT_CONFIGMAP_INT32`, and `GIT_CVAR_STRING` is now `GIT_CONFIGMAP_STRING`.
506 The former names are deprecated.
507
508 * Repositories can now be created at the root of a Windows drive.
509
510 * Configuration lookups are now more efficiently cached.
511
512 * `git_commit_create_with_signature` now supports a `NULL` signature,
513 which will create a commit without adding a signature.
514
515 * When a repository lacks an `info` "common directory", we will no
516 longer erroneously return `GIT_ENOTFOUND` for all attribute lookups.
517
518 * Several attribute macros have been renamed: `GIT_ATTR_TRUE` is now
519 `GIT_ATTR_IS_TRUE`, `GIT_ATTR_FALSE` is now `GIT_ATTR_IS_FALSE`,
520 `GIT_ATTR_UNSPECIFIED` is now `GIT_ATTR_IS_UNSPECIFIED`. The
521 attribute enum `git_attr_t` is now `git_attr_value_t` and its
522 values have been renamed: `GIT_ATTR_UNSPECIFIED_T` is now
523 `GIT_ATTR_VALUE_UNSPECIFIED`, `GIT_ATTR_TRUE_T` is now
524 `GIT_ATTR_VALUE_TRUE`, `GIT_ATTR_FALSE_T` is now `GIT_ATTR_VALUE_FALSE`,
525 and `GIT_ATTR_VALUE_T` is now `GIT_ATTR_VALUE_STRING`. The
526 former names are deprecated.
527
528 * `git_object__size` is now `git_object_size`. The former name is
529 deprecated.
530
531 * `git_tag_create_frombuffer` is now `git_tag_create_from_buffer`. The
532 former name is deprecated.
533
534 * Several blob creation functions have been renamed:
535 `git_blob_create_frombuffer` is now named `git_blob_create_from_buffer`,
536 `git_blob_create_fromdisk` is now named `git_blob_create_from_disk`,
537 `git_blob_create_fromworkdir` is now named `git_blob_create_from_workdir`,
538 `git_blob_create_fromstream` is now named `git_blob_create_from_stream`,
539 and `git_blob_create_fromstream_commit` is now named
540 `git_blob_create_from_stream_commit`. The former names are deprecated.
541
542 * The function `git_oid_iszero` is now named `git_oid_is_zero`. The
543 former name is deprecated.
544
545 * Pattern matching is now done using `wildmatch` instead of `fnmatch`
546 for compatibility with git.
547
548 * The option initialization functions suffixed by `init_options` are now
549 suffixed with `options_init`. (For example, `git_checkout_init_options`
550 is now `git_checkout_options_init`.) The former names are deprecated.
551
552 * NTLM2 authentication is now supported on non-Windows platforms.
553
554 * The `git_cred_sign_callback` callback is now named `git_cred_sign_cb`.
555 The `git_cred_ssh_interactive_callback` callback is now named
556 `git_cred_ssh_interactive_cb`.
557
558 * Ignore files now:
559
560 * honor escaped trailing whitespace.
561 * do not incorrectly negate sibling paths of a negated pattern.
562 * honor rules that stop ignoring files after a wildcard
563
564 * Attribute files now:
565
566 * honor leading and trailing whitespace.
567 * treat paths beginning with `\` as absolute only on Windows.
568 * properly handle escaped characters.
569 * stop reading macros defined in subdirectories
570
571 * The C locale is now correctly used when parsing regular expressions.
572
573 * The system PCRE2 or PCRE regular expression libraries are now used
574 when `regcomp_l` is not available on the system. If none of these
575 are available on the system, an included version of PCRE is used.
576
577 * Wildcards in reference specifications are now supported beyond simply
578 a bare wildcard (`*`) for compatibility with git.
579
580 * When `git_ignore_path_is_ignored` is provided a path with a trailing
581 slash (eg, `dir/`), it will now treat it as a directory for the
582 purposes of ignore matching.
583
584 * Patches that add or remove a file with a space in the path can now
585 be correctly parsed.
586
587 * The `git_remote_completion_type` type is now `git_remote_completion_t`.
588 The former name is deprecated.
589
590 * The `git_odb_backend_malloc` is now `git_odb_backend_data_alloc`. The
591 former name is deprecated.
592
593 * The `git_transfer_progress_cb` callback is now `git_indexer_progress_cb`
594 and the `git_transfer_progress` structure is now `git_indexer_progress`.
595 The former names are deprecated.
596
597 * The example projects are now contained in a single `lg2` executable
598 for ease of use.
599
600 * libgit2 now correctly handles more URLs, such as
601 `http://example.com:/repo.git` (colon but no port),
602 `http://example.com` (no path),
603 and `http://example.com:8080/` (path is /, nonstandard port).
604
605 * A carefully constructed commit object with a very large number
606 of parents may lead to potential out-of-bounds writes or
607 potential denial of service.
608
609 * The ProgramData configuration file is always read for compatibility
610 with Git for Windows and Portable Git installations. The ProgramData
611 location is not necessarily writable only by administrators, so we
612 now ensure that the configuration file is owned by the administrator
613 or the current user.
614
615 ### API additions
616
617 * The SSH host key now supports SHA-256 when `GIT_CERT_SSH_SHA256` is set.
618
619 * The diff format option `GIT_DIFF_FORMAT_PATCH_ID` can now be used to
620 emit an output like `git patch-id`.
621
622 * The `git_apply_options_init` function will initialize a
623 `git_apply_options` structure.
624
625 * The remote callbacks structure adds a `git_url_resolve_cb` callback
626 that is invoked when connecting to a server, so that applications
627 may edit or replace the URL before connection.
628
629 * The information about the original `HEAD` in a rebase operation is
630 available with `git_rebase_orig_head_name`. Its ID is available with
631 `git_rebase_orig_head_id`. The `onto` reference name is available with
632 `git_rebase_onto_name` and its ID is available with `git_rebase_onto_id`.
633
634 * ODB backends can now free backend data when an error occurs during its
635 backend data creation using `git_odb_backend_data_free`.
636
637 * Options may be specified to `git_repository_foreach_head` to control
638 its behavior: `GIT_REPOSITORY_FOREACH_HEAD_SKIP_REPO` will not skip
639 the main repository's HEAD reference, while
640 `GIT_REPOSITORY_FOREACH_HEAD_SKIP_WORKTREES` will now skip the
641 worktree HEAD references.
642
643 * The `GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS` option can be specified to
644 `git_libgit2_opts()` to avoid looking for `.keep` files that correspond
645 to packfiles. This setting can improve performance when packfiles are
646 stored on high-latency filesystems like network filesystems.
647
648 * Blobs can now be filtered with `git_blob_filter`, which allows for
649 options to be set with `git_blob_filter_options`, including
650 `GIT_FILTER_NO_SYSTEM_ATTRIBUTES` to disable filtering with system-level
651 attributes in `/etc/gitattributes` and `GIT_ATTR_CHECK_INCLUDE_HEAD` to
652 enable filtering with `.gitattributes` files in the HEAD revision.
653
654 ### API removals
655
656 * The unused `git_headlist_cb` function declaration was removed.
657
658 * The unused `git_time_monotonic` API is removed.
659
660 * The erroneously exported `inttypes.h` header was removed.
661
662 # Security Fixes
663
664 - CVE-2019-1348: the fast-import stream command "feature
665 export-marks=path" allows writing to arbitrary file paths. As
666 libgit2 does not offer any interface for fast-import, it is not
667 susceptible to this vulnerability.
668
669 - CVE-2019-1349: by using NTFS 8.3 short names, backslashes or
670 alternate filesystreams, it is possible to cause submodules to
671 be written into pre-existing directories during a recursive
672 clone using git. As libgit2 rejects cloning into non-empty
673 directories by default, it is not susceptible to this
674 vulnerability.
675
676 - CVE-2019-1350: recursive clones may lead to arbitrary remote
677 code executing due to improper quoting of command line
678 arguments. As libgit2 uses libssh2, which does not require us
679 to perform command line parsing, it is not susceptible to this
680 vulnerability.
681
682 - CVE-2019-1351: Windows provides the ability to substitute
683 drive letters with arbitrary letters, including multi-byte
684 Unicode letters. To fix any potential issues arising from
685 interpreting such paths as relative paths, we have extended
686 detection of DOS drive prefixes to accomodate for such cases.
687
688 - CVE-2019-1352: by using NTFS-style alternative file streams for
689 the ".git" directory, it is possible to overwrite parts of the
690 repository. While this has been fixed in the past for Windows,
691 the same vulnerability may also exist on other systems that
692 write to NTFS filesystems. We now reject any paths starting
693 with ".git:" on all systems.
694
695 - CVE-2019-1353: by using NTFS-style 8.3 short names, it was
696 possible to write to the ".git" directory and thus overwrite
697 parts of the repository, leading to possible remote code
698 execution. While this problem was already fixed in the past for
699 Windows, other systems accessing NTFS filesystems are
700 vulnerable to this issue too. We now enable NTFS protecions by
701 default on all systems to fix this attack vector.
702
703 - CVE-2019-1354: on Windows, backslashes are not a valid part of
704 a filename but are instead interpreted as directory separators.
705 As other platforms allowed to use such paths, it was possible
706 to write such invalid entries into a Git repository and was
707 thus an attack vector to write into the ".git" dierctory. We
708 now reject any entries starting with ".git\" on all systems.
709
710 - CVE-2019-1387: it is possible to let a submodule's git
711 directory point into a sibling's submodule directory, which may
712 result in overwriting parts of the Git repository and thus lead
713 to arbitrary command execution. As libgit2 doesn't provide any
714 way to do submodule clones natively, it is not susceptible to
715 this vulnerability. Users of libgit2 that have implemented
716 recursive submodule clones manually are encouraged to review
717 their implementation for this vulnerability.
718
719 ### Breaking API changes
720
721 * The "private" implementation details of the `git_cred` structure have been
722 moved to a dedicated `git2/sys/cred.h` header, to clarify that the underlying
723 structures are only provided for custom transport implementers.
724 The breaking change is that the `username` member of the underlying struct
725 is now hidden, and a new `git_cred_get_username` function has been provided.
726
727 * Some errors of class `GIT_ERROR_NET` now have class `GIT_ERROR_HTTP`.
728 Most authentication failures now have error code `GIT_EAUTH` instead of `GIT_ERROR`.
729
730 ### Breaking CMake configuration changes
731
732 * The CMake option to use a system http-parser library, instead of the
733 bundled dependency, has changed. This is due to a deficiency in
734 http-parser that we have fixed in our implementation. The bundled
735 library is now the default, but if you wish to force the use of the
736 system http-parser implementation despite incompatibilities, you can
737 specify `-DUSE_HTTP_PARSER=system` to CMake.
738
739 * The interactions between `USE_HTTPS` and `SHA1_BACKEND` have been
740 streamlined. The detection was moved to a new `USE_SHA1`, modeled after
741 `USE_HTTPS`, which takes the values "CollisionDetection/Backend/Generic", to
742 better match how the "hashing backend" is selected, the default (ON) being
743 "CollisionDetection". If you were using `SHA1_BACKEND` previously, you'll
744 need to check the value you've used, or switch to the autodetection.
745
746 ### Authors
747
748 The following individuals provided changes that were included in this
749 release:
750
751 * Aaron Patterson
752 * Alberto Fanjul
753 * Anders Borum
754 * Augie Fackler
755 * Augustin Fabre
756 * Ayush Shridhar
757 * brian m. carlson
758 * buddyspike
759 * Carlos Martín Nieto
760 * cheese1
761 * Dan Skorupski
762 * Daniel Cohen Gindi
763 * Dave Lee
764 * David Brooks
765 * David Turner
766 * Denis Laxalde
767 * Dhruva Krishnamurthy
768 * Dominik Ritter
769 * Drew DeVault
770 * Edward Thomson
771 * Eric Huss
772 * Erik Aigner
773 * Etienne Samson
774 * Gregory Herrero
775 * Heiko Voigt
776 * Ian Hattendorf
777 * Jacques Germishuys
778 * Janardhan Pulivarthi
779 * Jason Haslam
780 * Johannes Schindelin
781 * Jordan Wallet
782 * Josh Bleecher Snyder
783 * kas
784 * kdj0c
785 * Laurence McGlashan
786 * lhchavez
787 * Lukas Berk
788 * Max Kostyukevich
789 * Patrick Steinhardt
790 * pcpthm
791 * Remy Suen
792 * Robert Coup
793 * romkatv
794 * Scott Furry
795 * Sebastian Henke
796 * Stefan Widgren
797 * Steve King Jr
798 * Sven Strickroth
799 * Tobias Nießen
800 * Tyler Ang-Wanek
801 * Tyler Wanek
802
803 ---------------------------------------------------------------------
804
805 v0.28
806 -----
807
808 ### Changes or improvements
809
810 * The library is now always built with cdecl calling conventions on
811 Windows; the ability to build a stdcall library has been removed.
812
813 * Reference log creation now honors `core.logallrefupdates=always`.
814
815 * Fix some issues with the error-reporting in the OpenSSL backend.
816
817 * HTTP proxy support is now builtin; libcurl is no longer used to support
818 proxies and is removed as a dependency.
819
820 * Certificate and credential callbacks can now return `GIT_PASSTHROUGH`
821 to decline to act; libgit2 will behave as if there was no callback set
822 in the first place.
823
824 * The line-ending filtering logic - when checking out files - has been
825 updated to match newer git (>= git 2.9) for proper interoperability.
826
827 * Symbolic links are now supported on Windows when `core.symlinks` is set
828 to `true`.
829
830 * Submodules with names which attempt to perform path traversal now have their
831 configuration ignored. Such names were blindly appended to the
832 `$GIT_DIR/modules` and a malicious name could lead to an attacker writing to
833 an arbitrary location. This matches git's handling of CVE-2018-11235.
834
835 * Object validation is now performed during tree creation in the
836 `git_index_write_tree_to` API.
837
838 * Configuration variable may now be specified on the same line as a section
839 header; previously this was erroneously a parser error.
840
841 * When an HTTP server supports both NTLM and Negotiate authentication
842 mechanisms, we would previously fail to authenticate with any mechanism.
843
844 * The `GIT_OPT_SET_PACK_MAX_OBJECTS` option can now set the maximum
845 number of objects allowed in a packfile being downloaded; this can help
846 limit the maximum memory used when fetching from an untrusted remote.
847
848 * Line numbers in diffs loaded from patch files were not being populated;
849 they are now included in the results.
850
851 * The repository's index is reloaded from disk at the beginning of
852 `git_merge` operations to ensure that it is up-to-date.
853
854 * Mailmap handling APIs have been introduced, and the new commit APIs
855 `git_commit_committer_with_mailmap` and `git_commit_author_with_mailmap`
856 will use the mailmap to resolve the committer and author information.
857 In addition, blame will use the mailmap given when the
858 `GIT_BLAME_USE_MAILMAP` option.
859
860 * Ignore handling for files in ignored folders would be ignored.
861
862 * Worktrees can now be backed by bare repositories.
863
864 * Trailing spaces are supported in `.gitignore` files, these spaces were
865 previously (and erroneously) treated as part of the pattern.
866
867 * The library can now be built with mbedTLS support for HTTPS.
868
869 * The diff status character 'T' will now be presented by the
870 `git_diff_status_char` API for diff entries that change type.
871
872 * Revision walks previously would sometimes include commits that should
873 have been ignored; this is corrected.
874
875 * Revision walks are now more efficient when the output is unsorted;
876 we now avoid walking all the way to the beginning of history unnecessarily.
877
878 * Error-handling around index extension loading has been fixed. We were
879 previously always misreporting a truncated index (#4858).
880
881 ### API additions
882
883 * The index may now be iterated atomically using `git_index_iterator`.
884
885 * Remote objects can now be created with extended options using the
886 `git_remote_create_with_opts` API.
887
888 * Diff objects can now be applied as changes to the working directory,
889 index or both, emulating the `git apply` command. Additionally,
890 `git_apply_to_tree` can apply those changes to a tree object as a
891 fully in-memory operation.
892
893 * You can now swap out memory allocators via the
894 `GIT_OPT_SET_ALLOCATOR` option with `git_libgit2_opts()`.
895
896 * You can now ensure that functions do not discard unwritten changes to the
897 index via the `GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY` option to
898 `git_libgit2_opts()`. This will cause functions that implicitly re-read
899 the index (eg, `git_checkout`) to fail if you have staged changes to the
900 index but you have not written the index to disk. (Unless the checkout
901 has the FORCE flag specified.)
902
903 At present, this defaults to off, but we intend to enable this more
904 broadly in the future, as a warning or error. We encourage you to
905 examine your code to ensure that you are not relying on the current
906 behavior that implicitly removes staged changes.
907
908 * Reference specifications can be parsed from an arbitrary string with
909 the `git_refspec_parse` API.
910
911 * You can now get the name and path of worktrees using the
912 `git_worktree_name` and `git_worktree_path` APIs, respectively.
913
914 * The `ref` field has been added to `git_worktree_add_options` to enable
915 the creation of a worktree from a pre-existing branch.
916
917 * It's now possible to analyze merge relationships between any two
918 references, not just against `HEAD`, using `git_merge_analysis_for_ref`.
919
920 ### API removals
921
922 * The `git_buf_free` API is deprecated; it has been renamed to
923 `git_buf_dispose` for consistency. The `git_buf_free` API will be
924 retained for backward compatibility for the foreseeable future.
925
926 * The `git_otype` enumeration and its members are deprecated and have
927 been renamed for consistency. The `GIT_OBJ_` enumeration values are
928 now prefixed with `GIT_OBJECT_`. The old enumerations and macros
929 will be retained for backward compatibility for the foreseeable future.
930
931 * Several index-related APIs have been renamed for consistency. The
932 `GIT_IDXENTRY_` enumeration values and macros have been renamed to
933 be prefixed with `GIT_INDEX_ENTRY_`. The `GIT_INDEXCAP` enumeration
934 values are now prefixed with `GIT_INDEX_CAPABILITY_`. The old
935 enumerations and macros will be retained for backward compatibility
936 for the foreseeable future.
937
938 * The error functions and enumeration values have been renamed for
939 consistency. The `giterr_` functions and values prefix have been
940 renamed to be prefixed with `git_error_`; similarly, the `GITERR_`
941 constants have been renamed to be prefixed with `GIT_ERROR_`.
942 The old enumerations and macros will be retained for backward
943 compatibility for the foreseeable future.
944
945 ### Breaking API changes
946
947 * The default checkout strategy changed from `DRY_RUN` to `SAFE` (#4531).
948
949 * Adding a symlink as .gitmodules into the index from the workdir or checking
950 out such files is not allowed as this can make a Git implementation write
951 outside of the repository and bypass the fsck checks for CVE-2018-11235.
952
953 ---------------------------------------------------------------------
954
955 v0.27
956 ---------
957
958 ### Changes or improvements
959
960 * Improved `p_unlink` in `posix_w32.c` to try and make a file writable
961 before sleeping in the retry loop to prevent unnecessary calls to sleep.
962
963 * The CMake build infrastructure has been improved to speed up building time.
964
965 * A new CMake option "-DUSE_HTTPS=<backend>" makes it possible to explicitly
966 choose an HTTP backend.
967
968 * A new CMake option "-DSHA1_BACKEND=<backend>" makes it possible to explicitly
969 choose an SHA1 backend. The collision-detecting backend is now the default.
970
971 * A new CMake option "-DUSE_BUNDLED_ZLIB" makes it possible to explicitly use
972 the bundled zlib library.
973
974 * A new CMake option "-DENABLE_REPRODUCIBLE_BUILDS" makes it possible to
975 generate a reproducible static archive. This requires support from your
976 toolchain.
977
978 * The minimum required CMake version has been bumped to 2.8.11.
979
980 * Writing to a configuration file now preserves the case of the key given by the
981 caller for the case-insensitive portions of the key (existing sections are
982 used even if they don't match).
983
984 * We now support conditional includes in configuration files.
985
986 * Fix for handling re-reading of configuration files with includes.
987
988 * Fix for reading patches which contain exact renames only.
989
990 * Fix for reading patches with whitespace in the compared files' paths.
991
992 * We will now fill `FETCH_HEAD` from all passed refspecs instead of overwriting
993 with the last one.
994
995 * There is a new diff option, `GIT_DIFF_INDENT_HEURISTIC` which activates a
996 heuristic which takes into account whitespace and indentation in order to
997 produce better diffs when dealing with ambiguous diff hunks.
998
999 * Fix for pattern-based ignore rules where files ignored by a rule cannot be
1000 un-ignored by another rule.
1001
1002 * Sockets opened by libgit2 are now being closed on exec(3) if the platform
1003 supports it.
1004
1005 * Fix for peeling annotated tags from packed-refs files.
1006
1007 * Fix reading huge loose objects from the object database.
1008
1009 * Fix files not being treated as modified when only the file mode has changed.
1010
1011 * We now explicitly reject adding submodules to the index via
1012 `git_index_add_frombuffer`.
1013
1014 * Fix handling of `GIT_DIFF_FIND_RENAMES_FROM_REWRITES` raising `SIGABRT` when
1015 one file has been deleted and another file has been rewritten.
1016
1017 * Fix for WinHTTP not properly handling NTLM and Negotiate challenges.
1018
1019 * When using SSH-based transports, we now repeatedly ask for the passphrase to
1020 decrypt the private key in case a wrong passphrase is being provided.
1021
1022 * When generating conflict markers, they will now use the same line endings as
1023 the rest of the file.
1024
1025 ### API additions
1026
1027 * The `git_merge_file_options` structure now contains a new setting,
1028 `marker_size`. This allows users to set the size of markers that
1029 delineate the sides of merged files in the output conflict file.
1030 By default this is 7 (`GIT_MERGE_CONFLICT_MARKER_SIZE`), which
1031 produces output markers like `<<<<<<<` and `>>>>>>>`.
1032
1033 * `git_remote_create_detached()` creates a remote that is not associated
1034 to any repository (and does not apply configuration like 'insteadof' rules).
1035 This is mostly useful for e.g. emulating `git ls-remote` behavior.
1036
1037 * `git_diff_patchid()` lets you generate patch IDs for diffs.
1038
1039 * `git_status_options` now has an additional field `baseline` to allow creating
1040 status lists against different trees.
1041
1042 * New family of functions to allow creating notes for a specific notes commit
1043 instead of for a notes reference.
1044
1045 * New family of functions to allow parsing message trailers. This API is still
1046 experimental and may change in future releases.
1047
1048 ### API removals
1049
1050 ### Breaking API changes
1051
1052 * Signatures now distinguish between +0000 and -0000 UTC offsets.
1053
1054 * The certificate check callback in the WinHTTP transport will now receive the
1055 `message_cb_payload` instead of the `cred_acquire_payload`.
1056
1057 * We are now reading symlinked directories under .git/refs.
1058
1059 * We now refuse creating branches named "HEAD".
1060
1061 * We now refuse reading and writing all-zero object IDs into the
1062 object database.
1063
1064 * We now read the effective user's configuration file instead of the real user's
1065 configuration in case libgit2 runs as part of a setuid binary.
1066
1067 * The `git_odb_open_rstream` function and its `readstream` callback in the
1068 `git_odb_backend` interface have changed their signatures to allow providing
1069 the object's size and type to the caller.
1070
1071 ---------------------------------------------------------------------
1072
1073 v0.26
1074 -----
1075
1076 ### Changes or improvements
1077
1078 * Support for opening, creating and modifying worktrees.
1079
1080 * We can now detect SHA1 collisions resulting from the SHAttered attack. These
1081 checks can be enabled at build time via `-DUSE_SHA1DC`.
1082
1083 * Fix for missing implementation of `git_merge_driver_source` getters.
1084
1085 * Fix for installed pkg-config file being broken when the prefix contains
1086 spaces.
1087
1088 * We now detect when the hashsum of on-disk objects does not match their
1089 expected hashsum.
1090
1091 * We now support open-ended ranges (e.g. "master..", "...master") in our
1092 revision range parsing code.
1093
1094 * We now correctly compute ignores with leading "/" in subdirectories.
1095
1096 * We now optionally call `fsync` on loose objects, packfiles and their indexes,
1097 loose references and packed reference files.
1098
1099 * We can now build against OpenSSL v1.1 and against LibreSSL.
1100
1101 * `GIT_MERGE_OPTIONS_INIT` now includes a setting to perform rename detection.
1102 This aligns this structure with the default by `git_merge` and
1103 `git_merge_trees` when `NULL` was provided for the options.
1104
1105 * Improvements for reading index v4 files.
1106
1107 * Perform additional retries for filesystem operations on Windows when files
1108 are temporarily locked by other processes.
1109
1110 ### API additions
1111
1112 * New family of functions to handle worktrees:
1113
1114 * `git_worktree_list()` lets you look up worktrees for a repository.
1115 * `git_worktree_lookup()` lets you get a specific worktree.
1116 * `git_worktree_open_from_repository()` lets you get the associated worktree
1117 of a repository.
1118 a worktree.
1119 * `git_worktree_add` lets you create new worktrees.
1120 * `git_worktree_prune` lets you remove worktrees from disk.
1121 * `git_worktree_lock()` and `git_worktree_unlock()` let you lock
1122 respectively unlock a worktree.
1123 * `git_repository_open_from_worktree()` lets you open a repository via
1124 * `git_repository_head_for_worktree()` lets you get the current `HEAD` for a
1125 linked worktree.
1126 * `git_repository_head_detached_for_worktree()` lets you check whether a
1127 linked worktree is in detached HEAD mode.
1128
1129 * `git_repository_item_path()` lets you retrieve paths for various repository
1130 files.
1131
1132 * `git_repository_commondir()` lets you retrieve the common directory of a
1133 repository.
1134
1135 * `git_branch_is_checked_out()` allows you to check whether a branch is checked
1136 out in a repository or any of its worktrees.
1137
1138 * `git_repository_submodule_cache_all()` and
1139 `git_repository_submodule_cache_clear()` functions allow you to prime or clear
1140 the submodule cache of a repository.
1141
1142 * You can disable strict hash verifications via the
1143 `GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION` option with `git_libgit2_opts()`.
1144
1145 * You can enable us calling `fsync` for various files inside the ".git"
1146 directory by setting the `GIT_OPT_ENABLE_FSYNC_GITDIR` option with
1147 `git_libgit2_opts()`.
1148
1149 * You can now enable "offset deltas" when creating packfiles and negotiating
1150 packfiles with a remote server by setting `GIT_OPT_ENABLE_OFS_DELTA` option
1151 with `GIT_libgit2_opts()`.
1152
1153 * You can now set the default share mode on Windows for opening files using
1154 `GIT_OPT_SET_WINDOWS_SHAREMODE` option with `git_libgit2_opts()`.
1155 You can query the current share mode with `GIT_OPT_GET_WINDOWS_SHAREMODE`.
1156
1157 * `git_transport_smart_proxy_options()' enables you to get the proxy options for
1158 smart transports.
1159
1160 * The `GIT_FILTER_INIT` macro and the `git_filter_init` function are provided
1161 to initialize a `git_filter` structure.
1162
1163 ### Breaking API changes
1164
1165 * `clone_checkout_strategy` has been removed from
1166 `git_submodule_update_option`. The checkout strategy used to clone will
1167 be the same strategy specified in `checkout_opts`.
1168
1169 v0.25
1170 -------
1171
1172 ### Changes or improvements
1173
1174 * Fix repository discovery with `git_repository_discover` and
1175 `git_repository_open_ext` to match git's handling of a ceiling
1176 directory at the current directory. git only checks ceiling
1177 directories when its search ascends to a parent directory. A ceiling
1178 directory matching the starting directory will not prevent git from
1179 finding a repository in the starting directory or a parent directory.
1180
1181 * Do not fail when deleting remotes in the presence of broken
1182 global configs which contain branches.
1183
1184 * Support for reading and writing git index v4 files
1185
1186 * Improve the performance of the revwalk and bring us closer to git's code.
1187
1188 * The reference db has improved support for concurrency and returns `GIT_ELOCKED`
1189 when an operation could not be performed due to locking.
1190
1191 * Nanosecond resolution is now activated by default, following git's change to
1192 do this.
1193
1194 * We now restrict the set of ciphers we let OpenSSL use by default.
1195
1196 * Users can now register their own merge drivers for use with `.gitattributes`.
1197 The library also gained built-in support for the union merge driver.
1198
1199 * The default for creating references is now to validate that the object does
1200 exist.
1201
1202 * Add `git_proxy_options` which is used by the different networking
1203 implementations to let the caller specify the proxy settings instead of
1204 relying on the environment variables.
1205
1206 ### API additions
1207
1208 * You can now get the user-agent used by libgit2 using the
1209 `GIT_OPT_GET_USER_AGENT` option with `git_libgit2_opts()`.
1210 It is the counterpart to `GIT_OPT_SET_USER_AGENT`.
1211
1212 * The `GIT_OPT_SET_SSL_CIPHERS` option for `git_libgit2_opts()` lets you specify
1213 a custom list of ciphers to use for OpenSSL.
1214
1215 * `git_commit_create_buffer()` creates a commit and writes it into a
1216 user-provided buffer instead of writing it into the object db. Combine it with
1217 `git_commit_create_with_signature()` in order to create a commit with a
1218 cryptographic signature.
1219
1220 * `git_blob_create_fromstream()` and
1221 `git_blob_create_fromstream_commit()` allow you to create a blob by
1222 writing into a stream. Useful when you do not know the final size or
1223 want to copy the contents from another stream.
1224
1225 * New flags for `git_repository_open_ext`:
1226
1227 * `GIT_REPOSITORY_OPEN_NO_DOTGIT` - Do not check for a repository by
1228 appending `/.git` to the `start_path`; only open the repository if
1229 `start_path` itself points to the git directory.
1230 * `GIT_REPOSITORY_OPEN_FROM_ENV` - Find and open a git repository,
1231 respecting the environment variables used by the git command-line
1232 tools. If set, `git_repository_open_ext` will ignore the other
1233 flags and the `ceiling_dirs` argument, and will allow a NULL
1234 `path` to use `GIT_DIR` or search from the current directory. The
1235 search for a repository will respect `$GIT_CEILING_DIRECTORIES`
1236 and `$GIT_DISCOVERY_ACROSS_FILESYSTEM`. The opened repository
1237 will respect `$GIT_INDEX_FILE`, `$GIT_NAMESPACE`,
1238 `$GIT_OBJECT_DIRECTORY`, and `$GIT_ALTERNATE_OBJECT_DIRECTORIES`.
1239 In the future, this flag will also cause `git_repository_open_ext`
1240 to respect `$GIT_WORK_TREE` and `$GIT_COMMON_DIR`; currently,
1241 `git_repository_open_ext` with this flag will error out if either
1242 `$GIT_WORK_TREE` or `$GIT_COMMON_DIR` is set.
1243
1244 * `git_diff_from_buffer()` can create a `git_diff` object from the contents
1245 of a git-style patch file.
1246
1247 * `git_index_version()` and `git_index_set_version()` to get and set
1248 the index version
1249
1250 * `git_odb_expand_ids()` lets you check for the existence of multiple
1251 objects at once.
1252
1253 * The new `git_blob_dup()`, `git_commit_dup()`, `git_tag_dup()` and
1254 `git_tree_dup()` functions provide type-specific wrappers for
1255 `git_object_dup()` to reduce noise and increase type safety for callers.
1256
1257 * `git_reference_dup()` lets you duplicate a reference to aid in ownership
1258 management and cleanup.
1259
1260 * `git_signature_from_buffer()` lets you create a signature from a string in the
1261 format that appear in objects.
1262
1263 * `git_tree_create_updated()` lets you create a tree based on another one
1264 together with a list of updates. For the covered update cases, it's more
1265 efficient than the `git_index` route.
1266
1267 * `git_apply_patch()` applies hunks from a `git_patch` to a buffer.
1268
1269 * `git_diff_to_buf()` lets you print an entire diff directory to a buffer,
1270 similar to how `git_patch_to_buf()` works.
1271
1272 * `git_proxy_init_options()` is added to initialize a `git_proxy_options`
1273 structure at run-time.
1274
1275 * `git_merge_driver_register()`, `git_merge_driver_unregister()` let you
1276 register and unregister a custom merge driver to be used when `.gitattributes`
1277 specifies it.
1278
1279 * `git_merge_driver_lookup()` can be used to look up a merge driver by name.
1280
1281 * `git_merge_driver_source_repo()`, `git_merge_driver_source_ancestor()`,
1282 `git_merge_driver_source_ours()`, `git_merge_driver_source_theirs()`,
1283 `git_merge_driver_source_file_options()` added as accessors to
1284 `git_merge_driver_source`.
1285
1286 ### API removals
1287
1288 * `git_blob_create_fromchunks()` has been removed in favour of
1289 `git_blob_create_fromstream()`.
1290
1291 ### Breaking API changes
1292
1293 * `git_packbuilder_object_count` and `git_packbuilder_written` now
1294 return a `size_t` instead of a `uint32_t` for more thorough
1295 compatibility with the rest of the library.
1296
1297 * `git_packbuiler_progress` now provides explicitly sized `uint32_t`
1298 values instead of `unsigned int`.
1299
1300 * `git_diff_file` now includes an `id_abbrev` field that reflects the
1301 number of nibbles set in the `id` field.
1302
1303 * `git_odb_backend` now has a `freshen` function pointer. This optional
1304 function pointer is similar to the `exists` function, but it will update
1305 a last-used marker. For filesystem-based object databases, this updates
1306 the timestamp of the file containing the object, to indicate "freshness".
1307 If this is `NULL`, then it will not be called and the `exists` function
1308 will be used instead.
1309
1310 * `git_remote_connect()` now accepts `git_proxy_options` argument, and
1311 `git_fetch_options` and `git_push_options` each have a `proxy_opts` field.
1312
1313 * `git_merge_options` now provides a `default_driver` that can be used
1314 to provide the name of a merge driver to be used to handle files changed
1315 during a merge.
1316
1317 ---------------------------------------------------------------------
1318
1319 v0.24
1320 -------
1321
1322 ### Changes or improvements
1323
1324 * Custom merge drivers can now be registered, which allows callers to
1325 configure callbacks to honor `merge=driver` configuration in
1326 `.gitattributes`.
1327
1328 * Custom filters can now be registered with wildcard attributes, for
1329 example `filter=*`. Consumers should examine the attributes parameter
1330 of the `check` function for details.
1331
1332 * Symlinks are now followed when locking a file, which can be
1333 necessary when multiple worktrees share a base repository.
1334
1335 * You can now set your own user-agent to be sent for HTTP requests by
1336 using the `GIT_OPT_SET_USER_AGENT` with `git_libgit2_opts()`.
1337
1338 * You can set custom HTTP header fields to be sent along with requests
1339 by passing them in the fetch and push options.
1340
1341 * Tree objects are now assumed to be sorted. If a tree is not
1342 correctly formed, it will give bad results. This is the git approach
1343 and cuts a significant amount of time when reading the trees.
1344
1345 * Filter registration is now protected against concurrent
1346 registration.
1347
1348 * Filenames which are not valid on Windows in an index no longer cause
1349 to fail to parse it on that OS.
1350
1351 * Rebases can now be performed purely in-memory, without touching the
1352 repository's workdir.
1353
1354 * When adding objects to the index, or when creating new tree or commit
1355 objects, the inputs are validated to ensure that the dependent objects
1356 exist and are of the correct type. This object validation can be
1357 disabled with the GIT_OPT_ENABLE_STRICT_OBJECT_CREATION option.
1358
1359 * The WinHTTP transport's handling of bad credentials now behaves like
1360 the others, asking for credentials again.
1361
1362 ### API additions
1363
1364 * `git_config_lock()` has been added, which allow for
1365 transactional/atomic complex updates to the configuration, removing
1366 the opportunity for concurrent operations and not committing any
1367 changes until the unlock.
1368
1369 * `git_diff_options` added a new callback `progress_cb` to report on the
1370 progress of the diff as files are being compared. The documentation of
1371 the existing callback `notify_cb` was updated to reflect that it only
1372 gets called when new deltas are added to the diff.
1373
1374 * `git_fetch_options` and `git_push_options` have gained a `custom_headers`
1375 field to set the extra HTTP header fields to send.
1376
1377 * `git_stream_register_tls()` lets you register a callback to be used
1378 as the constructor for a TLS stream instead of the libgit2 built-in
1379 one.
1380
1381 * `git_commit_header_field()` allows you to look up a specific header
1382 field in a commit.
1383
1384 * `git_commit_extract_signature()` extracts the signature from a
1385 commit and gives you both the signature and the signed data so you
1386 can verify it.
1387
1388 ### API removals
1389
1390 * No APIs were removed in this version.
1391
1392 ### Breaking API changes
1393
1394 * The `git_merge_tree_flag_t` is now `git_merge_flag_t`. Subsequently,
1395 its members are no longer prefixed with `GIT_MERGE_TREE_FLAG` but are
1396 now prefixed with `GIT_MERGE_FLAG`, and the `tree_flags` field of the
1397 `git_merge_options` structure is now named `flags`.
1398
1399 * The `git_merge_file_flags_t` enum is now `git_merge_file_flag_t` for
1400 consistency with other enum type names.
1401
1402 * `git_cert` descendent types now have a proper `parent` member
1403
1404 * It is the responsibility of the refdb backend to decide what to do
1405 with the reflog on ref deletion. The file-based backend must delete
1406 it, a database-backed one may wish to archive it.
1407
1408 * `git_config_backend` has gained two entries. `lock` and `unlock`
1409 with which to implement the transactional/atomic semantics for the
1410 configuration backend.
1411
1412 * `git_index_add` and `git_index_conflict_add()` will now use the case
1413 as provided by the caller on case insensitive systems. Previous
1414 versions would keep the case as it existed in the index. This does
1415 not affect the higher-level `git_index_add_bypath` or
1416 `git_index_add_frombuffer` functions.
1417
1418 * The `notify_payload` field of `git_diff_options` was renamed to `payload`
1419 to reflect that it's also the payload for the new progress callback.
1420
1421 * The `git_config_level_t` enum has gained a higher-priority value
1422 `GIT_CONFIG_LEVEL_PROGRAMDATA` which represent a rough Windows equivalent
1423 to the system level configuration.
1424
1425 * `git_rebase_options` now has a `merge_options` field.
1426
1427 * The index no longer performs locking itself. This is not something
1428 users of the library should have been relying on as it's not part of
1429 the concurrency guarantees.
1430
1431 * `git_remote_connect()` now takes a `custom_headers` argument to set
1432 the extra HTTP header fields to send.
1433
1434 ---------------------------------------------------------------------
1435
1436 v0.23
1437 ------
1438
1439 ### Changes or improvements
1440
1441 * Patience and minimal diff drivers can now be used for merges.
1442
1443 * Merges can now ignore whitespace changes.
1444
1445 * Updated binary identification in CRLF filtering to avoid false positives in
1446 UTF-8 files.
1447
1448 * Rename and copy detection is enabled for small files.
1449
1450 * Checkout can now handle an initial checkout of a repository, making
1451 `GIT_CHECKOUT_SAFE_CREATE` unnecessary for users of clone.
1452
1453 * The signature parameter in the ref-modifying functions has been
1454 removed. Use `git_repository_set_ident()` and
1455 `git_repository_ident()` to override the signature to be used.
1456
1457 * The local transport now auto-scales the number of threads to use
1458 when creating the packfile instead of sticking to one.
1459
1460 * Reference renaming now uses the right id for the old value.
1461
1462 * The annotated version of branch creation, HEAD detaching and reset
1463 allow for specifying the expression from the user to be put into the
1464 reflog.
1465
1466 * `git_rebase_commit` now returns `GIT_EUNMERGED` when you attempt to
1467 commit with unstaged changes.
1468
1469 * On Mac OS X, we now use SecureTransport to provide the cryptographic
1470 support for HTTPS connections insead of OpenSSL.
1471
1472 * Checkout can now accept an index for the baseline computations via the
1473 `baseline_index` member.
1474
1475 * The configuration for fetching is no longer stored inside the
1476 `git_remote` struct but has been moved to a `git_fetch_options`. The
1477 remote functions now take these options or the callbacks instead of
1478 setting them beforehand.
1479
1480 * `git_submodule` instances are no longer cached or shared across
1481 lookup. Each submodule represents the configuration at the time of
1482 loading.
1483
1484 * The index now uses diffs for `add_all()` and `update_all()` which
1485 gives it a speed boost and closer semantics to git.
1486
1487 * The ssh transport now reports the stderr output from the server as
1488 the error message, which allows you to get the "repository not
1489 found" messages.
1490
1491 * `git_index_conflict_add()` will remove staged entries that exist for
1492 conflicted paths.
1493
1494 * The flags for a `git_diff_file` will now have the `GIT_DIFF_FLAG_EXISTS`
1495 bit set when a file exists on that side of the diff. This is useful
1496 for understanding whether a side of the diff exists in the presence of
1497 a conflict.
1498
1499 * The constructor for a write-stream into the odb now takes
1500 `git_off_t` instead of `size_t` for the size of the blob, which
1501 allows putting large files into the odb on 32-bit systems.
1502
1503 * The remote's push and pull URLs now honor the url.$URL.insteadOf
1504 configuration. This allows modifying URL prefixes to a custom
1505 value via gitconfig.
1506
1507 * `git_diff_foreach`, `git_diff_blobs`, `git_diff_blob_to_buffer`,
1508 and `git_diff_buffers` now accept a new binary callback of type
1509 `git_diff_binary_cb` that includes the binary diff information.
1510
1511 * The race condition mitigations described in `racy-git.txt` have been
1512 implemented.
1513
1514 * If libcurl is installed, we will use it to connect to HTTP(S)
1515 servers.
1516
1517 ### API additions
1518
1519 * The `git_merge_options` gained a `file_flags` member.
1520
1521 * Parsing and retrieving a configuration value as a path is exposed
1522 via `git_config_parse_path()` and `git_config_get_path()`
1523 respectively.
1524
1525 * `git_repository_set_ident()` and `git_repository_ident()` serve to
1526 set and query which identity will be used when writing to the
1527 reflog.
1528
1529 * `git_config_entry_free()` frees a config entry.
1530
1531 * `git_config_get_string_buf()` provides a way to safely retrieve a
1532 string from a non-snapshot configuration.
1533
1534 * `git_annotated_commit_from_revspec()` allows to get an annotated
1535 commit from an extended sha synatx string.
1536
1537 * `git_repository_set_head_detached_from_annotated()`,
1538 `git_branch_create_from_annotated()` and
1539 `git_reset_from_annotated()` allow for the caller to provide an
1540 annotated commit through which they can control what expression is
1541 put into the reflog as the source/target.
1542
1543 * `git_index_add_frombuffer()` can now create a blob from memory
1544 buffer and add it to the index which is attached to a repository.
1545
1546 * The structure `git_fetch_options` has been added to determine the
1547 runtime configuration for fetching, such as callbacks, pruning and
1548 autotag behaviour. It has the runtime initializer
1549 `git_fetch_init_options()`.
1550
1551 * The enum `git_fetch_prune_t` has been added, letting you specify the
1552 pruning behaviour for a fetch.
1553
1554 * A push operation will notify the caller of what updates it indends
1555 to perform on the remote, which provides similar information to
1556 git's pre-push hook.
1557
1558 * `git_stash_apply()` can now apply a stashed state from the stash list,
1559 placing the data into the working directory and index.
1560
1561 * `git_stash_pop()` will apply a stashed state (like `git_stash_apply()`)
1562 but will remove the stashed state after a successful application.
1563
1564 * A new error code `GIT_EEOF` indicates an early EOF from the
1565 server. This typically indicates an error with the URL or
1566 configuration of the server, and tools can use this to show messages
1567 about failing to communicate with the server.
1568
1569 * A new error code `GIT_EINVALID` indicates that an argument to a
1570 function is invalid, or an invalid operation was requested.
1571
1572 * `git_diff_index_to_workdir()` and `git_diff_tree_to_index()` will now
1573 produce deltas of type `GIT_DELTA_CONFLICTED` to indicate that the index
1574 side of the delta is a conflict.
1575
1576 * The `git_status` family of functions will now produce status of type
1577 `GIT_STATUS_CONFLICTED` to indicate that a conflict exists for that file
1578 in the index.
1579
1580 * `git_index_entry_is_conflict()` is a utility function to determine if
1581 a given index entry has a non-zero stage entry, indicating that it is
1582 one side of a conflict.
1583
1584 * It is now possible to pass a keypair via a buffer instead of a
1585 path. For this, `GIT_CREDTYPE_SSH_MEMORY` and
1586 `git_cred_ssh_key_memory_new()` have been added.
1587
1588 * `git_filter_list_contains` will indicate whether a particular
1589 filter will be run in the given filter list.
1590
1591 * `git_commit_header_field()` has been added, which allows retrieving
1592 the contents of an arbitrary header field.
1593
1594 * `git_submodule_set_branch()` allows to set the configured branch for
1595 a submodule.
1596
1597 ### API removals
1598
1599 * `git_remote_save()` and `git_remote_clear_refspecs()` have been
1600 removed. Remote's configuration is changed via the configuration
1601 directly or through a convenience function which performs changes to
1602 the configuration directly.
1603
1604 * `git_remote_set_callbacks()`, `git_remote_get_callbacks()` and
1605 `git_remote_set_transport()` have been removed and the remote no
1606 longer stores this configuration.
1607
1608 * `git_remote_set_fetch_refpecs()` and
1609 `git_remote_set_push_refspecs()` have been removed. There is no
1610 longer a way to set the base refspecs at run-time.
1611
1612 * `git_submodule_save()` has been removed. The submodules are no
1613 longer configured via the objects.
1614
1615 * `git_submodule_reload_all()` has been removed as we no longer cache
1616 submodules.
1617
1618 ### Breaking API changes
1619
1620 * `git_smart_subtransport_cb` now has a `param` parameter.
1621
1622 * The `git_merge_options` structure member `flags` has been renamed
1623 to `tree_flags`.
1624
1625 * The `git_merge_file_options` structure member `flags` is now
1626 an unsigned int. It was previously a `git_merge_file_flags_t`.
1627
1628 * `GIT_CHECKOUT_SAFE_CREATE` has been removed. Most users will generally
1629 be able to switch to `GIT_CHECKOUT_SAFE`, but if you require missing
1630 file handling during checkout, you may now use `GIT_CHECKOUT_SAFE |
1631 GIT_CHECKOUT_RECREATE_MISSING`.
1632
1633 * The `git_clone_options` and `git_submodule_update_options`
1634 structures no longer have a `signature` field.
1635
1636 * The following functions have removed the signature and/or log message
1637 parameters in favour of git-emulating ones.
1638
1639 * `git_branch_create()`, `git_branch_move()`
1640 * `git_rebase_init()`, `git_rebase_abort()`
1641 * `git_reference_symbolic_create_matching()`,
1642 `git_reference_symbolic_create()`, `git_reference_create()`,
1643 `git_reference_create_matching()`,
1644 `git_reference_symbolic_set_target()`,
1645 `git_reference_set_target()`, `git_reference_rename()`
1646 * `git_remote_update_tips()`, `git_remote_fetch()`, `git_remote_push()`
1647 * `git_repository_set_head()`,
1648 `git_repository_set_head_detached()`,
1649 `git_repository_detach_head()`
1650 * `git_reset()`
1651
1652 * `git_config_get_entry()` now gives back a ref-counted
1653 `git_config_entry`. You must free it when you no longer need it.
1654
1655 * `git_config_get_string()` will return an error if used on a
1656 non-snapshot configuration, as there can be no guarantee that the
1657 returned pointer is valid.
1658
1659 * `git_note_default_ref()` now uses a `git_buf` to return the string,
1660 as the string is otherwise not guaranteed to stay allocated.
1661
1662 * `git_rebase_operation_current()` will return `GIT_REBASE_NO_OPERATION`
1663 if it is called immediately after creating a rebase session but before
1664 you have applied the first patch.
1665
1666 * `git_rebase_options` now contains a `git_checkout_options` struct
1667 that will be used for functions that modify the working directory,
1668 namely `git_rebase_init`, `git_rebase_next` and
1669 `git_rebase_abort`. As a result, `git_rebase_open` now also takes
1670 a `git_rebase_options` and only the `git_rebase_init` and
1671 `git_rebase_open` functions take a `git_rebase_options`, where they
1672 will persist the options to subsequent `git_rebase` calls.
1673
1674 * The `git_clone_options` struct now has fetch options in a
1675 `fetch_opts` field instead of remote callbacks in
1676 `remote_callbacks`.
1677
1678 * The remote callbacks has gained a new member `push_negotiation`
1679 which gets called before sending the update commands to the server.
1680
1681 * The following functions no longer act on a remote instance but
1682 change the repository's configuration. Their signatures have changed
1683 accordingly:
1684
1685 * `git_remote_set_url()`, `git_remote_seturl()`
1686 * `git_remote_add_fetch()`, `git_remote_add_push()` and
1687 * `git_remote_set_autotag()`
1688
1689 * `git_remote_connect()` and `git_remote_prune()` now take a pointer
1690 to the callbacks.
1691
1692 * `git_remote_fetch()` and `git_remote_download()` now take a pointer
1693 to fetch options which determine the runtime configuration.
1694
1695 * The `git_remote_autotag_option_t` values have been changed. It has
1696 gained a `_UNSPECIFIED` default value to specify no override for the
1697 configured setting.
1698
1699 * `git_remote_update_tips()` now takes a pointer to the callbacks as
1700 well as a boolean whether to write `FETCH_HEAD` and the autotag
1701 setting.
1702
1703 * `git_remote_create_anonymous()` no longer takes a fetch refspec as
1704 url-only remotes cannot have configured refspecs.
1705
1706 * The `git_submodule_update_options` struct now has fetch options in
1707 the `fetch_opts` field instead of callbacks in the
1708 `remote_callbacks` field.
1709
1710 * The following functions no longer act on a submodule instance but
1711 change the repository's configuration. Their signatures have changed
1712 accordingly:
1713
1714 * `git_submodule_set_url()`, `git_submodule_set_ignore()`,
1715 `git_submodule_set_update()`,
1716 `git_submodule_set_fetch_recurse_submodules()`.
1717
1718 * `git_submodule_status()` no longer takes a submodule instance but a
1719 repsitory, a submodule name and an ignore setting.
1720
1721 * The `push` function in the `git_transport` interface now takes a
1722 pointer to the remote callbacks.
1723
1724 * The `git_index_entry` struct's fields' types have been changed to
1725 more accurately reflect what is in fact stored in the
1726 index. Specifically, time and file size are 32 bits intead of 64, as
1727 these values are truncated.
1728
1729 * `GIT_EMERGECONFLICT` is now `GIT_ECONFLICT`, which more accurately
1730 describes the nature of the error.
1731
1732 * It is no longer allowed to call `git_buf_grow()` on buffers
1733 borrowing the memory they point to.
1734
1735 ---------------------------------------------------------------------
1736
1737 v0.22
1738 ------
1739
1740 ### Changes or improvements
1741
1742 * `git_signature_new()` now requires a non-empty email address.
1743
1744 * Use CommonCrypto libraries for SHA-1 calculation on Mac OS X.
1745
1746 * Disable SSL compression and SSLv2 and SSLv3 ciphers in favor of TLSv1
1747 in OpenSSL.
1748
1749 * The fetch behavior of remotes with autotag set to `GIT_REMOTE_DOWNLOAD_TAGS_ALL`
1750 has been changed to match git 1.9.0 and later. In this mode, libgit2 now
1751 fetches all tags in addition to whatever else needs to be fetched.
1752
1753 * `git_checkout()` now handles case-changing renames correctly on
1754 case-insensitive filesystems; for example renaming "readme" to "README".
1755
1756 * The search for libssh2 is now done via pkg-config instead of a
1757 custom search of a few directories.
1758
1759 * Add support for core.protectHFS and core.protectNTFS. Add more
1760 validation for filenames which we write such as references.
1761
1762 * The local transport now generates textual progress output like
1763 git-upload-pack does ("counting objects").
1764
1765 * `git_checkout_index()` can now check out an in-memory index that is not
1766 necessarily the repository's index, so you may check out an index
1767 that was produced by git_merge and friends while retaining the cached
1768 information.
1769
1770 * Remove the default timeout for receiving / sending data over HTTP using
1771 the WinHTTP transport layer.
1772
1773 * Add SPNEGO (Kerberos) authentication using GSSAPI on Unix systems.
1774
1775 * Provide built-in objects for the empty blob (e69de29) and empty
1776 tree (4b825dc) objects.
1777
1778 * The index' tree cache is now filled upon read-tree and write-tree
1779 and the cache is written to disk.
1780
1781 * LF -> CRLF filter refuses to handle mixed-EOL files
1782
1783 * LF -> CRLF filter now runs when * text = auto (with Git for Windows 1.9.4)
1784
1785 * File unlocks are atomic again via rename. Read-only files on Windows are
1786 made read-write if necessary.
1787
1788 * Share open packfiles across repositories to share descriptors and mmaps.
1789
1790 * Use a map for the treebuilder, making insertion O(1)
1791
1792 * The build system now accepts an option EMBED_SSH_PATH which when set
1793 tells it to include a copy of libssh2 at the given location. This is
1794 enabled for MSVC.
1795
1796 * Add support for refspecs with the asterisk in the middle of a
1797 pattern.
1798
1799 * Fetching now performs opportunistic updates. To achieve this, we
1800 introduce a difference between active and passive refspecs, which
1801 make `git_remote_download()` and `git_remote_fetch()` to take a list of
1802 resfpecs to be the active list, similarly to how git fetch accepts a
1803 list on the command-line.
1804
1805 * The THREADSAFE option to build libgit2 with threading support has
1806 been flipped to be on by default.
1807
1808 * The remote object has learnt to prune remote-tracking branches. If
1809 the remote is configured to do so, this will happen via
1810 `git_remote_fetch()`. You can also call `git_remote_prune()` after
1811 connecting or fetching to perform the prune.
1812
1813
1814 ### API additions
1815
1816 * Introduce `git_buf_text_is_binary()` and `git_buf_text_contains_nul()` for
1817 consumers to perform binary detection on a git_buf.
1818
1819 * `git_branch_upstream_remote()` has been introduced to provide the
1820 branch.<name>.remote configuration value.
1821
1822 * Introduce `git_describe_commit()` and `git_describe_workdir()` to provide
1823 a description of the current commit (and working tree, respectively)
1824 based on the nearest tag or reference
1825
1826 * Introduce `git_merge_bases()` and the `git_oidarray` type to expose all
1827 merge bases between two commits.
1828
1829 * Introduce `git_merge_bases_many()` to expose all merge bases between
1830 multiple commits.
1831
1832 * Introduce rebase functionality (using the merge algorithm only).
1833 Introduce `git_rebase_init()` to begin a new rebase session,
1834 `git_rebase_open()` to open an in-progress rebase session,
1835 `git_rebase_commit()` to commit the current rebase operation,
1836 `git_rebase_next()` to apply the next rebase operation,
1837 `git_rebase_abort()` to abort an in-progress rebase and `git_rebase_finish()`
1838 to complete a rebase operation.
1839
1840 * Introduce `git_note_author()` and `git_note_committer()` to get the author
1841 and committer information on a `git_note`, respectively.
1842
1843 * A factory function for ssh has been added which allows to change the
1844 path of the programs to execute for receive-pack and upload-pack on
1845 the server, `git_transport_ssh_with_paths()`.
1846
1847 * The ssh transport supports asking the remote host for accepted
1848 credential types as well as multiple challeges using a single
1849 connection. This requires to know which username you want to connect
1850 as, so this introduces the USERNAME credential type which the ssh
1851 transport will use to ask for the username.
1852
1853 * The `GIT_EPEEL` error code has been introduced when we cannot peel a tag
1854 to the requested object type; if the given object otherwise cannot be
1855 peeled, `GIT_EINVALIDSPEC` is returned.
1856
1857 * Introduce `GIT_REPOSITORY_INIT_RELATIVE_GITLINK` to use relative paths
1858 when writing gitlinks, as is used by git core for submodules.
1859
1860 * `git_remote_prune()` has been added. See above for description.
1861
1862
1863 * Introduce reference transactions, which allow multiple references to
1864 be locked at the same time and updates be queued. This also allows
1865 us to safely update a reflog with arbitrary contents, as we need to
1866 do for stash.
1867
1868 ### API removals
1869
1870 * `git_remote_supported_url()` and `git_remote_is_valid_url()` have been
1871 removed as they have become essentially useless with rsync-style ssh paths.
1872
1873 * `git_clone_into()` and `git_clone_local_into()` have been removed from the
1874 public API in favour of `git_clone callbacks`.
1875
1876 * The option to ignore certificate errors via `git_remote_cert_check()`
1877 is no longer present. Instead, `git_remote_callbacks` has gained a new
1878 entry which lets the user perform their own certificate checks.
1879
1880 ### Breaking API changes
1881
1882 * `git_cherry_pick()` is now `git_cherrypick()`.
1883
1884 * The `git_submodule_update()` function was renamed to
1885 `git_submodule_update_strategy()`. `git_submodule_update()` is now used to
1886 provide functionalty similar to "git submodule update".
1887
1888 * `git_treebuilder_create()` was renamed to `git_treebuilder_new()` to better
1889 reflect it being a constructor rather than something which writes to
1890 disk.
1891
1892 * `git_treebuilder_new()` (was `git_treebuilder_create()`) now takes a
1893 repository so that it can query repository configuration.
1894 Subsequently, `git_treebuilder_write()` no longer takes a repository.
1895
1896 * `git_threads_init()` and `git_threads_shutdown()` have been renamed to
1897 `git_libgit2_init()` and `git_libgit2_shutdown()` to better explain what
1898 their purpose is, as it's grown to be more than just about threads.
1899
1900 * `git_libgit2_init()` and `git_libgit2_shutdown()` now return the number of
1901 initializations of the library, so consumers may schedule work on the
1902 first initialization.
1903
1904 * The `git_transport_register()` function no longer takes a priority and takes
1905 a URL scheme name (eg "http") instead of a prefix like "http://"
1906
1907 * `git_index_name_entrycount()` and `git_index_reuc_entrycount()` now
1908 return size_t instead of unsigned int.
1909
1910 * The `context_lines` and `interhunk_lines` fields in `git_diff`_options are
1911 now `uint32_t` instead of `uint16_t`. This allows to set them to `UINT_MAX`,
1912 in effect asking for "infinite" context e.g. to iterate over all the
1913 unmodified lines of a diff.
1914
1915 * `git_status_file()` now takes an exact path. Use `git_status_list_new()` if
1916 pathspec searching is needed.
1917
1918 * `git_note_create()` has changed the position of the notes reference
1919 name to match `git_note_remove()`.
1920
1921 * Rename `git_remote_load()` to `git_remote_lookup()` to bring it in line
1922 with the rest of the lookup functions.
1923
1924 * `git_remote_rename()` now takes the repository and the remote's
1925 current name. Accepting a remote indicates we want to change it,
1926 which we only did partially. It is much clearer if we accept a name
1927 and no loaded objects are changed.
1928
1929 * `git_remote_delete()` now accepts the repository and the remote's name
1930 instead of a loaded remote.
1931
1932 * `git_merge_head` is now `git_annotated_commit`, to better reflect its usage
1933 for multiple functions (including rebase)
1934
1935 * The `git_clone_options` struct no longer provides the `ignore_cert_errors` or
1936 `remote_name` members for remote customization.
1937
1938 Instead, the `git_clone_options` struct has two new members, `remote_cb` and
1939 `remote_cb_payload`, which allow the caller to completely override the remote
1940 creation process. If needed, the caller can use this callback to give their
1941 remote a name other than the default (origin) or disable cert checking.
1942
1943 The `remote_callbacks` member has been preserved for convenience, although it
1944 is not used when a remote creation callback is supplied.
1945
1946 * The `git_clone`_options struct now provides `repository_cb` and
1947 `repository_cb_payload` to allow the user to create a repository with
1948 custom options.
1949
1950 * The `git_push` struct to perform a push has been replaced with
1951 `git_remote_upload()`. The refspecs and options are passed as a
1952 function argument. `git_push_update_tips()` is now also
1953 `git_remote_update_tips()` and the callbacks are in the same struct as
1954 the rest.
1955
1956 * The `git_remote_set_transport()` function now sets a transport factory function,
1957 rather than a pre-existing transport instance.
1958
1959 * The `git_transport` structure definition has moved into the sys/transport.h
1960 file.
1961
1962 * libgit2 no longer automatically sets the OpenSSL locking
1963 functions. This is not something which we can know to do. A
1964 last-resort convenience function is provided in sys/openssl.h,
1965 `git_openssl_set_locking()` which can be used to set the locking.