Raw
1 Git v2.56 Release Notes
2 =======================
3
4 UI, Workflows & Features
5 ------------------------
6
7 * Advice shown by "git status" when the local branch is behind or has
8 diverged from its push branch has been updated to suggest "git pull
9 <remote> <branch>".
10
11 * The handling of promisor-remote protocol capability has been updated
12 to allow the other side to add to the list of promisor remotes via the
13 'promisor.acceptFromServerURL' configuration variable.
14
15 * The 'ort' merge backend has been hardened against corrupt trees by
16 ensuring it aborts under appropriate error conditions.
17
18 * The `fetch.followRemoteHEAD` configuration variable has been added to
19 provide a default for the per-remote `remote.<name>.followRemoteHEAD`
20 setting.
21
22 * "git log --follow" has been updated to better handle non-linear
23 history, in which the path being tracked gets renamed differently in
24 multiple history lines.
25
26 * The "git repo info" command has been taught new keys to output both
27 absolute and relative paths for "gitdir" and "commondir", supported by
28 a new path-formatting helper extracted from "git rev-parse".
29
30 * When 'git push origin/main' or 'git branch origin main' is run, the
31 command is now recognized as a potential typo, and advice has been
32 added to offer a typo fix.
33
34 * The 'git refs' toolbox has been extended with new 'create', 'delete',
35 'update', and 'rename' subcommands to create, delete, update, and
36 rename references, respectively.
37
38 * The experimental 'git history' command has been taught a new 'drop'
39 subcommand to remove a commit, with its descendants replayed onto its
40 parent.
41
42 * The alignment of commit object name abbreviations in 'git blame'
43 output has been optimized to reserve a column for marks (caret,
44 question mark, or asterisk) only when such marks are actually shown.
45
46 * Option parsing with 'git rev-parse --parseopt' and in most 'git'
47 subcommands has been updated to exit with 0 (instead of 129) when the
48 help option ('-h' or '--help') is requested directly by the user,
49 aligning with standard Unix convention.
50
51 * The '[includeIf "condition"]' conditional inclusion facility for
52 configuration files has been taught to use the location of the
53 worktree in its condition.
54
55 * The usage string and SYNOPSIS for 'git fast-export' have been
56 standardized to make them consistent with each other and with other
57 commands.
58
59
60 Performance, Internal Implementation, Development Support etc.
61 --------------------------------------------------------------
62
63 * The refactoring of 'setup.c' has been continued to drop remaining
64 global state (`git_work_tree_cfg`, `is_bare_repository_cfg`), updating
65 `is_bare_repository()` to no longer implicitly rely on
66 `the_repository`.
67
68 * Project-specific configuration for b4 has been introduced, and the
69 documentation has been updated to recommend using it as a
70 streamlined method for submitting patches.
71
72 * The default format path of git cat-file --batch has been optimized
73 to use strbuf_add_oid_hex() and strbuf_add_uint() instead of
74 strbuf_addf(), yielding a noticeable speedup.
75
76 * Commands that list branches and tags (like git branch and git tag)
77 have been optimized to pass the namespace prefix when initializing
78 their ref iterator, avoiding a loose-ref scaling regression in
79 repositories with many unrelated loose references.
80
81 * The packed object source has been refactored into a proper struct
82 odb_source.
83
84 * The global configuration variables protect_hfs and protect_ntfs have
85 been migrated into struct repo_config_values to tie them to
86 per-repository configuration state.
87
88 * The trailer sections in SubmittingPatches have been updated to
89 encourage use of standard trailers.
90
91 * The documentation in SubmittingPatches has been updated to clarify how
92 patch contributors should respond to design and viability critiques,
93 and how the resolution of such critiques should be recorded in the
94 final commit messages.
95
96 * The pack-objects command has been updated to support reachability
97 bitmaps and delta-islands concurrently with the `--path-walk` option,
98 allowing faster packaging by falling back to path-walk when bitmaps
99 cannot fully satisfy the request.
100
101 * Documentation on community contribution guidelines has been updated to
102 encourage replying to review comments before rerolling, and to advise
103 a default limit of at most one reroll per day to give reviewers across
104 different time zones enough time to participate.
105
106 * The lazy priority queue optimization pattern (deferring actual removal
107 in 'prio_queue_get()' to allow get+put fusion) has been folded
108 directly into 'prio_queue' itself, speeding up commit traversal
109 workflows and simplifying callers.
110
111 * The 'reprepare()' callback for object database sources has been
112 generalized into a 'prepare()' callback with an optional flush cache
113 flag, and a new 'odb_prepare()' wrapper has been introduced to allow
114 pre-opening object database sources.
115
116 * The 'whence' field in 'struct object_info' has been removed. The
117 backend-specific object information retrieval has been refactored into
118 an opt-in 'struct object_info_source' structure.
119
120 * A racy build failure under Meson has been corrected by ensuring that
121 the generated header file 'hook-list.h' is built before compiling
122 files in 'builtin_sources' that depend on it.
123
124 * The repository discovery and repository configuration phases, which
125 were previously intertwined in 'setup.c', have been split. Repository
126 discovery has been updated to populate a 'struct repo_discovery'
127 without modifying the repository state, which is then taken by
128 repository configuration to initialize the repository, paving the way
129 for clean unification of repository configuration.
130
131 * The 'SubmittingPatches' document has been updated to explicitly
132 describe the expectation for contributors to retract or abandon their
133 patch series when they are no longer pursuing it.
134
135 * The contributor guide has been updated to advise new contributors to
136 trim irrelevant quoted text when replying to review comments, matching
137 the existing advice given to reviewers.
138
139 * The build system has been updated to support building universal macOS
140 binaries when 'Rust' is enabled, by compiling separate static archives
141 for each target triple listed in 'RUST_TARGETS' and combining them
142 using the macOS 'lipo' tool. The 'git-credential-osxkeychain' helper
143 has been updated to link against '$(RUST_LIB)' when 'Rust' is enabled.
144
145 * The test suite has been updated to use the 'test_grep' helper instead
146 of bare 'grep' for test assertions, allowing file contents to be
147 printed on failure for easier debugging. A new 'greplint' linter has
148 been introduced to detect and prevent new bare 'grep' assertions from
149 being added to the test suite.
150
151 * The pipelines in 't1410-reflog.sh' have been replaced with the
152 'test_stdout_line_count' helper to avoid suppressing the exit code of
153 'git' commands, ensuring failures are not hidden from the test suite.
154
155 * The cache-scanning loop in 'next_cache_entry()' has been optimized
156 to avoid rescanning already-unpacked index entries, preventing a
157 quadratic performance slow-down when diffing the working tree
158 against a commit with a pathspec matching early index entries.
159
160 * The global configuration variable 'ignore_case' (representing the
161 'core.ignorecase' configuration) has been migrated into 'struct
162 repo_config_values' to tie it to a specific repository instance.
163
164 * The performance of ref updates and reads using the 'reftable' backend
165 in the presence of many deletion tombstone records has been optimized
166 by removing the tombstone suppression flag from the merged iterator
167 and instead skipping tombstones at higher-level call sites where
168 iteration bounds are known.
169
170 * Various code paths have been hardened against potential NULL-pointer
171 dereferences and invalid file descriptor accesses flagged by
172 Coverity.
173
174 * The in-tree 'b4' cover letter template has been updated to include the
175 'change-id' trailer, ensuring that sent tags generated by 'b4' contain
176 the required tracking information for subsequent runs.
177
178 * 'git receive-pack' has been refactored to use ODB transaction
179 interfaces instead of directly managing 'tmp_objdir' for staging
180 incoming objects, bringing it closer to being ODB backend agnostic.
181
182 * The test script 't/t9811-git-p4-label-import.sh' has been
183 modernized to use 'test_path_is_file' and 'test_path_is_missing'
184 instead of raw 'test -f' and '! test -f' calls.
185
186 * A redundant strbuf_reset() call in the 'HAVE_GETDELIM' path of
187 strbuf_getwholeline() has been removed, as getdelim() overwrites the
188 buffer and the length is updated afterward.
189
190 * The object database enumeration interface odb_for_each_object() has
191 been taught to accept object filters, allowing the underlying backends
192 to optimize the traversal by using reachability bitmaps when
193 available. 'git cat-file --batch-all-objects' has been updated to use
194 this generic interface, simplifying its code and avoiding direct
195 access to ODB backend internals.
196
197 * The test script 't/t1100-commit-tree-options.sh' has been modernized
198 by converting test cases to the modern style (using single quotes and
199 tab indentation) and moving the creation of the expected file inside
200 the setup test so it runs under the protection of the test harness.
201
202 * The test script 't/t7614-merge-signoff.sh' has been updated to avoid
203 suppressing the exit code of 'git' commands in a pipe.
204
205 * The 'git rev-list --no-walk' command has been corrected to restore
206 pathspec filtering, which was lost when the streaming walk was
207 refactored.
208
209
210 Fixes since v2.55
211 -----------------
212
213 * A regression in the error diagnosis code for invalid .git files has
214 been fixed, avoiding a potential NULL-pointer crash when reporting
215 that a .git file does not point to a valid repository.
216 (merge 54a441bcea jk/setup-gitfile-diag-fix later to maint).
217
218 * Support for hashing loose or packed objects larger than 4GB on Windows
219 and other LLP64 platforms has been improved by converting object header
220 buffers and data-handling functions from 'unsigned long' to 'size_t'.
221 (merge d99e13d0be po/hash-object-size-t later to maint).
222
223 * The display of the rebase todo list in "git status" has been
224 improved to correctly abbreviate object IDs for more commands and
225 avoid misinterpreting refs as object IDs.
226 (merge 6f34e5f9e3 pw/status-rebase-todo later to maint).
227
228 * Reference backend configuration has been updated to load lazily to
229 avoid recursive calls during repository initialization when 'onbranch'
230 configuration conditions are evaluated. This has also fixed a memory
231 leak and allowed the unused `chdir_notify_reparent()` machinery to be
232 dropped.
233 (merge d6522d01df ps/refs-onbranch-fixes later to maint).
234
235 * The connectivity check has been refactored to search for promisor
236 objects in a generic way using the object database interface,
237 rather than iterating packfiles directly. This allows connectivity
238 checks to work properly in repositories that do not use packfiles.
239 (merge 66ee9cb930 ps/connected-generic-promisor-checks later to maint).
240
241 * A test checking interactions between git rebase --quit and
242 autostash in t3420-rebase-autostash.sh has been corrected to use
243 test_path_is_missing instead of ! grep on a file that shouldn't
244 exist in the conflicted state.
245 (merge eaad121fef sg/t3420-do-not-grep-in-missing-file later to maint).
246
247 * The GPG and SSH signature parsing code has been corrected to strip
248 carriage return characters only when they immediately precede line
249 feeds, instead of unconditionally stripping all carriage returns.
250 (merge 5dea8b690b ad/gpg-strip-cr-before-lf later to maint).
251
252 * A memory leak in the 'reftable_writer_new()' initialization function
253 has been fixed by delaying the allocation of 'struct reftable_writer'
254 until after input options are validated.
255 (merge c6fb3b9c3e jk/reftable-leakfix later to maint).
256
257 * A memory leak in the '--base' handling of 'git format-patch' has been
258 plugged, and the leak reporting of the test suite when running under a
259 TAP harness has been improved.
260 (merge 973a0373ff jk/format-patch-leakfix later to maint).
261
262 * A write file stream resource leak has been fixed as part of a code
263 cleanup.
264 (merge ebb4d2ffa3 jc/history-message-prep-fix later to maint).
265
266 * Various memory leaks in the Bloom-filter code paths that are exposed
267 when running tests with the 'GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=1'
268 environment variable have been plugged.
269 (merge 459088ec2e jk/bloom-leak-fixes later to maint).
270
271 * The wincred credential helper has been updated to avoid memory
272 corruption when erasing credentials and to prevent silent
273 credential loss when storing OAuth tokens, by correcting buffer
274 allocations and arguments passed to safe-CRT APIs.
275 (merge f635ab9ab4 js/wincred-fixes later to maint).
276
277 * Various code paths that initialize a cryptographic hash context but
278 bail out or finish without calling 'git_hash_final()' have been taught
279 to call 'git_hash_discard()' to release allocated resources, fixing
280 memory leaks when Git is built with non-default backends like
281 'OpenSSL' or 'libgcrypt'.
282 (merge 600588d2aa jk/hash-algo-leak-fixes later to maint).
283
284 * Various resource leaks, invalid file descriptor closures, and process
285 handle ownership issues flagged by Coverity have been fixed.
286 (merge 9184231173 js/coverity-fixes later to maint).
287
288 * Dockerized CI jobs running in private GitHub repositories have been
289 adjusted to use explicit process and file limits, preventing resource
290 exhaustion errors on private runners.
291 (merge bad766fbac js/ci-dockerized-pid-limit later to maint).
292
293 * Various test scripts have been updated to clean up large temporary
294 files and repositories, reducing peak disk usage during testing.
295 Also, expensive tests have been disabled on platforms that lack
296 sufficient resources (like 32-bit platforms and Windows CI runners),
297 and the long test suite has been enabled in GitLab CI.
298 (merge 84248444ad ps/t-fixes-for-git-test-long later to maint).
299
300 * The UTF-8 precomposition wrapper on macOS has been updated to use a
301 flexible array member to represent the name of a directory entry,
302 preventing fortified libc checks from failing when the name is
303 reallocated to be larger than 'NAME_MAX' bytes.
304 (merge 1eb281159f ih/precompose-flex-array later to maint).
305
306 * The 'git_hash_*()' wrappers have been updated to be used consistently
307 across the codebase instead of direct calls to members of 'struct
308 git_hash_algo', and 'git_hash_discard()' has been made idempotent to
309 simplify cleanups.
310 (merge 9e396aa553 jk/git-hash-cleanups later to maint).
311
312 * The sideband demultiplexer has been updated to recognize ANSI SGR
313 escape sequences that use colon-separated subfields (e.g., for
314 256-color or true-color codes).
315 (merge 3792b2aea4 mm/sideband-ansi-sgr-colon-fix later to maint).
316
317 * The 'reftable' code has been hardened against corrupted tables by
318 fixing out-of-bounds writes, out-of-bounds reads, and abort calls
319 during parsing.
320 (merge ca93c27328 ps/reftable-hardening later to maint).
321
322 * A description in the release notes for Git 2.55.0 has been
323 retroactively updated to clarify that Rust support is enabled by
324 default, but still optional, and will become mandatory in Git 3.0.
325 (merge 18b2009d14 jc/relnotes-2.55-rust-fix later to maint).
326
327 * The early-exit optimization in 'paint_down_to_common()' has been
328 gated on the queue being generation-ordered, fixing a bug where
329 'git merge-base' (without '--all') could return incorrect results
330 on repositories with v1 commit graphs and clock skew.
331 (merge ae68032a8d kk/commit-reach-find-all-fix later to maint).
332
333 * The client-side parser of the server-advertised bundle-URI list has
334 been updated to drain the remaining response in order to avoid
335 protocol desynchronization when the server sends a misconfigured list.
336 Also, the server-side has been taught to omit empty configuration
337 values instead of sending invalid key-value lines.
338 (merge 50de1169e4 tc/bundle-uri-empty-fix later to maint).
339
340 * The 'topo_levels' slab was propagated only to the topmost layer of a
341 split commit-graph chain, causing topological levels for commits in
342 base layers to be recomputed during incremental writes. This has been
343 corrected.
344
345 * The stream-based object signature verification path has been
346 corrected to avoid double-closing the stream on read errors.
347 (merge cfd52a74a0 ps/odb-stream-double-close-fix later to maint).
348
349 * The '-i' shorthand for the '--init' option, which was accepted by the
350 'git submodule update' command until it was broken in a modernization
351 of the option-parsing code, has been restored.
352 (merge ff1da37f58 dm/submodule-update-i-shorthand later to maint).