Raw
1 Git v2.54 Release Notes
2 =======================
3
4 UI, Workflows & Features
5 ------------------------
6
7 * "git add -p" and friends note what the current status of the hunk
8 being shown is.
9
10 * "git history" history rewriting (experimental) command has been
11 added.
12
13 * "git replay" is taught to drop commits that become empty (not the
14 ones that are empty in the original).
15
16 * The help text and the documentation for the "--expire" option of
17 "git worktree [list|prune]" have been improved.
18
19 * When "git show-index" is run outside a repository, it silently
20 defaults to SHA-1; the tool now warns when this happens.
21
22 * "git merge-file" can be run outside a repository, but it ignored
23 all configuration, even the per-user ones. The command now uses
24 available configuration files to find its customization.
25
26 * "auto filter" logic for large-object promisor remote.
27
28 * "git rev-list" and friends learn "--maximal-only" to show only the
29 commits that are not reachable by other commits.
30
31 * Command line completion (in contrib/) update for
32 "stash import/export".
33
34 * "git repo info" learns "--keys" action to list known keys.
35
36 * Extend the alias configuration syntax to allow aliases using
37 characters outside ASCII alphanumeric (plus '-').
38
39 * A signature on a commit that was GPG signed a long time ago ought to
40 be still valid after the key that was used to sign it has expired,
41 but we showed them in alarming red.
42
43 * "git subtree split --prefix=P <commit>" now checks the prefix P
44 against the tree of the (potentially quite different from the
45 current working tree) given commit.
46
47 * "git add -p" learned a new mode that allows the user to revisit a
48 file that was already dealt with.
49
50 * Allow the directory in which reference backends store their data to
51 be specified.
52
53 * "gitweb" has been taught to be mobile friendly.
54
55 * "git apply --directory=./un/../normalized/path" now normalizes the
56 given path before using it.
57
58 * "git maintenance" starts using the "geometric" strategy by default.
59
60 * "git config list" is taught to show the values interpreted for
61 specific type with "--type=<X>" option.
62
63 * "git add <submodule>" has been taught to honor
64 submodule.<name>.ignore that is set to "all" (and requires "git add
65 -f" to override it).
66
67 * Hook commands are now allowed to be defined (possibly centrally)
68 in the configuration files, and run multiple of them for the same
69 hook event.
70
71 * The way end-users can add their own "git <cmd>" subcommand by
72 storing "git-<cmd>" in a directory on their $PATH has not been
73 documented clearly, which has been corrected.
74
75 * "git send-email" learns to pass hostname/port to Authen::SASL
76 module.
77
78 * "git send-email" learns to support use of client-side certificates.
79
80 * "git send-email" has learned to be a bit more careful when it
81 accepts charset to use from the end-user, to avoid 'y' (mistaken
82 'yes' when expecting a charset like 'UTF-8') and other nonsense.
83
84 * "git status" learned to show comparison between the current branch
85 and various other branches listed on status.compareBranches
86 configuration.
87
88 * "git repo structure" command learns to report maximum values on
89 various aspects of objects it inspects.
90
91 * "git rebase" learns "--trailer" option to drive the
92 interpret-trailers machinery.
93
94 * "git fast-import" learned to optionally replace signature on
95 commits whose signatures get invalidated due to replaying by
96 signing afresh.
97
98 * "git history" learned the "split" subcommand.
99
100 * The reference-transaction hook was taught to be triggered before
101 taking locks on references in the "preparing" phase.
102
103 * "git apply" now reports the name of the input file along with the
104 line number when it encounters a corrupt patch, and correctly
105 resets the line counter when processing multiple patch files.
106
107 * The HTTP transport learned to react to "429 Too Many Requests".
108
109 * "git repo info -h" and "git repo structure -h" limit their help output
110 to the part that is specific to the subcommand.
111
112 * "git format-patch --cover-letter" learns to use a simpler format
113 instead of the traditional shortlog format to list its commits with
114 a new --commit-list-format option and format.commitListFormat
115 configuration variable.
116
117 * `git backfill` learned to accept revision and pathspec arguments.
118
119 * "git replay" (experimental) learns, in addition to "pick" and
120 "replay", a new operating mode "revert".
121
122 * "git replay" now supports replaying down to the root commit.
123
124 * Handling of signed commits and tags in fast-import has been made more
125 configurable.
126
127 * "git config list" is the official way to spell "git config -l" and
128 "git config --list". Use it to update the documentation.
129
130
131 Performance, Internal Implementation, Development Support etc.
132 --------------------------------------------------------------
133
134 * Avoid local submodule repository directory paths overlapping with
135 each other by encoding submodule names before using them as path
136 components.
137
138 * The string_list API gains a new helper, string_list_sort_u(), and
139 new unit tests to extend coverage.
140
141 * Improve set-up time of a perf test.
142
143 * ISO C23 redefines strchr and friends that traditionally took
144 a const pointer and returned a non-const pointer derived from it to
145 preserve constness (i.e., if you ask for a substring in a const
146 string, you get a const pointer to the substring). Update code
147 paths that used non-const pointer to receive their results that did
148 not have to be non-const to adjust.
149
150 * Rename three functions around the commit_list data structure.
151
152 * Transaction to create objects (or not) is currently tied to the
153 repository, but in the future a repository can have multiple object
154 sources, which may have different transaction mechanisms. Make the
155 odb transaction API per object source.
156
157 * "git merge-ours" is taught to work better in a sparse checkout.
158
159 * Allow recording process ID of the process that holds the lock next
160 to a lockfile for diagnosis.
161
162 * Reduce dependency on the_repository of xdiff-interface layer.
163
164 * Code clean-up to use the commit_stack API.
165
166 * "git diff --anchored=<text>" has been optimized.
167
168 * A CodingGuidelines update.
169
170 * Add process ancestry data to trace2 on macOS to match what we
171 already do on Linux and Windows. Also adjust the way Windows
172 implementation reports this information to match the other two.
173
174 * A handful of places used refs_for_each_ref_in() API incorrectly,
175 which has been corrected.
176
177 * Some tests assumed "iconv" is available without honoring ICONV
178 prerequisite, which has been corrected.
179
180 * Revamp object enumeration API around odb.
181
182 * Additional tests were introduced to see the interaction with netrc
183 auth with auth failure on the http transport.
184
185 * A couple of bugs in use of flag bits around odb API has been
186 corrected, and the flag bits reordered.
187
188 * Plumb gitk/git-gui build and install procedure in meson based
189 builds.
190
191 * The code to accept shallow "git push" has been optimized.
192
193 * Simplify build procedure for oxskeychain (in contrib/).
194
195 * Fix dependency screw-up in meson-based builds.
196
197 * Wean the mailmap code off of the_repository dependency.
198
199 * API clean-up for the worktree subsystem.
200
201 * The last uses of the_repository in "tree-diff.c" have been
202 eradicated.
203
204 * Clean-up the code around "git repo info" command.
205
206 * Mark the merge-ort codebase to prevent more uses of the_repository
207 from getting added.
208
209 * The core.attributesfile is intended to be set per repository, but
210 was kept track of by a single global variable in-core, which has
211 been corrected by moving it to per-repository data structure.
212
213 * Use the hook API to replace ad-hoc invocation of hook scripts via
214 the run_command() API.
215
216 * Code refactoring around refs-for-each-* API functions.
217
218 * The parse-options API learned to notice an options[] array with
219 duplicated long options.
220 (merge 237e520d81 rs/parse-options-duplicated-long-options later to maint).
221
222 * The code to maintain mapping between object names in multiple hash
223 functions is being added, written in Rust.
224
225 * A bit of OIDmap API enhancement and cleanup.
226
227 * Move gitlab CI from macOS 14 images that are being deprecated.
228
229 * The object source API is getting restructured to allow plugging new
230 backends.
231
232 * Reduce dependence on the global the_hash_algo and the_repository
233 variables of wt-status code path.
234
235 * The way combined list-object filter options are parsed has been
236 revamped.
237
238 * Editorconfig filename patterns were specified incorrectly, making
239 many source files inside subdirectories unaffected, which has been
240 corrected.
241
242 * The run_command() API lost its implicit dependency on the singleton
243 `the_repository` instance.
244
245 * The unit test helper function was taught to use backslash +
246 mnemonic notation for certain control characters like "\t", instead
247 of octal notation like "\011".
248
249 * Adjust test-lint to allow "sed -E" to use ERE in the patterns.
250
251 * Clar (unit testing framework) update from the upstream.
252
253 * Reduce system overhead "git upload-pack" spends on relaying "git
254 pack-objects" output to the "git fetch" running on the other end of
255 the connection.
256
257 * Add a coccinelle rule to break the build when "struct strbuf" gets
258 passed by value.
259
260 * Further work on incremental repacking using MIDX/bitmap
261
262 * The logic to count objects has been cleaned up.
263
264 * Tweak the build infrastructure by moving tools around.
265
266 * Uses of prio_queue as a LIFO stack of commits have been written
267 with commit_stack.
268
269 * The cleanup of remaining bitmaps in "ahead_behind()" has been
270 simplified.
271
272 * split-index.c has been updated to not use the global the_repository
273 and the_hash_algo variables.
274
275 * The unsigned integer that is used as a bitset to specify the kind
276 of branches interpret_branch_name() function has been changed to
277 use a dedicated enum type.
278
279 * Various updates to contrib/diff-highlight, including documentation
280 updates, test improvements, and color configuration handling.
281
282 * Code paths that loop over another array to push each element into a
283 strvec have been rewritten to use strvec_pushv() instead.
284
285 * In case homebrew breaks REG_ENHANCED again, leave an in-code comment
286 to suggest use of our replacement regex as a workaround.
287
288 * MinGW build updates.
289
290 * The way dash 0.5.13 handles non-ASCII contents in here-doc
291 is buggy and breaks our existing tests, which unfortunately
292 have been rewritten to avoid triggering the bug.
293
294 * Object name handling (disambiguation and abbreviation) has been
295 refactored to be backend-generic, moving logic into the respective
296 object database backends.
297
298 * pack-objects's --stdin-packs=follow mode learns to handle
299 excluded-but-open packs.
300
301 * A few code paths that spawned child processes for network
302 connection weren't wait(2)ing for their children and letting "init"
303 reap them instead; they have been tightened.
304
305 * Adjust the codebase for C23 that changes functions like strchr()
306 that discarded constness when they return a pointer into a const
307 string to preserve constness.
308
309 * A handful of inappropriate uses of the_repository have been
310 rewritten to use the right repository structure instance in the
311 read-cache.c codepath.
312
313 * Internals of "git fsck" have been refactored to not depend on the
314 global `the_repository` variable.
315
316 * Reduce dependency on `the_repository` in add-patch.c file.
317
318 * The way the "git log -L<range>:<file>" feature is bolted onto the
319 log/diff machinery is being reworked a bit to make the feature
320 compatible with more diff options, like -S/G.
321
322 * Further work to adjust the codebase for C23 that changes functions
323 like strchr() that discarded constness when they return a pointer into
324 a const string to preserve constness.
325
326 * "git rev-list --maximal-only" has been optimized by borrowing the
327 logic used by "git show-branch --independent", which computes the
328 same kind of information much more efficiently.
329
330
331 Fixes since v2.53
332 -----------------
333
334 * HTTP transport failed to authenticate in some code paths, which has
335 been corrected.
336 (merge ed0f7a62f7 ap/http-probe-rpc-use-auth later to maint).
337
338 * The computation of column width made by "git diff --stat" was
339 confused when pathnames contain non-ASCII characters.
340 (merge 04f5d95ef7 lp/diff-stat-utf8-display-width-fix later to maint).
341
342 * The "-z" and "--max-depth" documentation (and implementation of
343 "-z") in the "git last-modified" command have been updated.
344 (merge 9dcc09bed1 tc/last-modified-options-cleanup later to maint).
345
346 * A handful of code paths that started using batched ref update API
347 (after Git 2.51 or so) lost detailed error output, which have been
348 corrected.
349 (merge eff9299eac kn/ref-batch-output-error-reporting-fix later to maint).
350
351 * "git blame --ignore-revs=... --color-lines" did not account for
352 ignored revisions passing blame to the same commit an adjacent line
353 gets blamed for.
354 (merge d519082d4e rs/blame-ignore-colors-fix later to maint).
355
356 * Coccinelle rules update.
357 (merge 60614838a4 tc/memzero-array later to maint).
358
359 * Giving "git last-modified" a tree (not a commit-ish) died an
360 uncontrolled death, which has been corrected.
361 (merge 525ef52301 tc/last-modified-not-a-tree later to maint).
362
363 * Test contrib/ things in CI to catch breakages before they enter the
364 "next" branch.
365 (merge c591c3ceff jc/ci-test-contrib-too later to maint).
366
367 * A handful of documentation pages have been modernized to use the
368 "synopsis" style.
369 (merge a34d1d53a6 ja/doc-synopsis-style-even-more later to maint).
370
371 * Small clean-up of xdiff library to remove unnecessary data
372 duplication.
373 (merge 5086213bd2 pw/xdiff-cleanups later to maint).
374
375 * Update sample commit-msg hook to complain when a log message has
376 material mailinfo considers the end of log message in the middle.
377 (merge 83804c361b pw/commit-msg-sample-hook later to maint).
378
379 * "git pack-objects --stdin-packs" with "--exclude-promisor-objects"
380 fetched objects that are promised, which was not wanted. This has
381 been fixed.
382 (merge f4eff7116d ps/pack-concat-wo-backfill later to maint).
383
384 * "git switch <name>", in an attempt to create a local branch <name>
385 after a remote tracking branch of the same name gave an advice
386 message to disambiguate using "git checkout", which has been
387 updated to use "git switch".
388 (merge 12fee11f21 jc/checkout-switch-restore later to maint).
389
390 * It does not make much sense to apply the "incomplete-line"
391 whitespace rule to symbolic links, whose contents almost always
392 lack the final newline. "git apply" and "git diff" are now taught
393 to exclude them for a change to symbolic links.
394 (merge 6a41481c6d jc/whitespace-incomplete-line later to maint).
395
396 * "git format-patch --from=<me>" did not honor the command line
397 option when writing out the cover letter, which has been corrected.
398
399 * Update build procedure for mergetool documentation in meson-based builds.
400 (merge 58e4eeeeb5 pw/meson-doc-mergetool later to maint).
401
402 * An earlier attempt to optimize "git subtree" discarded too much
403 relevant histories, which has been corrected.
404
405 * A prefetch call can be triggered to access a stale diff_queue entry
406 after diffcore-break breaks a filepair into two and freed the
407 original entry that is no longer used, leading to a segfault, which
408 has been corrected.
409 (merge 2d88ab078d hy/diff-lazy-fetch-with-break-fix later to maint).
410
411 * "git fetch --deepen" that tries to go beyond merged branch used to
412 get confused where the updated shallow points are, which has been
413 corrected.
414 (merge 3ef68ff40e sp/shallow-deepen-relative-fix later to maint).
415
416 * "fsck" iterates over packfiles and its access to pack data caused
417 the list to be permuted, which caused it to loop forever; the code
418 to access pack data by "fsck" has been updated to avoid this.
419 (merge 13eb65d366 ps/fsck-stream-from-the-right-object-instance later to maint).
420
421 * "git log --graph --stat" did not count the display width of colored
422 graph part of its own output correctly, which has been corrected.
423 (merge 064b869efc lp/diff-stat-utf8-display-width-fix later to maint).
424
425 * The configuration variable format.noprefix did not behave as a
426 proper boolean variable, which has now been fixed and documented.
427 (merge ea3a62c40e kh/format-patch-noprefix-is-boolean later to maint).
428
429 * CI fix.
430 (merge eb35167dd4 ps/ci-reduce-gitlab-envsize later to maint).
431
432 * "git diff --no-index --find-object=<object-name>" outside a
433 repository of course wouldn't be able to find the object and died
434 while parsing the command line. The command is made to die in a
435 bit more user-friendly way.
436 (merge b0ddc7947c mm/diff-no-index-find-object later to maint).
437
438 * Fix typo-induced breakages in fsmonitor-watchman sample hook.
439 (merge 41366e4677 pt/fsmonitor-watchman-sample-fix later to maint).
440
441 * "git for-each-repo" started from a secondary worktree did not work
442 as expected, which has been corrected.
443 (merge e87493b9b4 ds/for-each-repo-w-worktree later to maint).
444
445 * The construct 'test "$(command)" = expectation' loses the exit
446 status from the command, which has been fixed by breaking up the
447 statement into pieces.
448 (merge d3edca979a fp/t3310-unhide-git-failures later to maint).
449
450 * While discovering a ".git" directory, the code treats any stat()
451 failure as a sign that a filesystem entity .git does not exist
452 there, and ignores ".git" that is not a "gitdir" file or a
453 directory. The code has been tightened to notice and report
454 filesystem corruption better.
455 (merge 1dd27bfbfd ty/setup-error-tightening later to maint).
456
457 * Plug a few leaks where mmap'ed memory regions are not unmapped.
458 (merge a8a69bbb64 jk/unleak-mmap later to maint).
459
460 * A test now uses the symbolic constant $ZERO_OID instead of 40 "0" to
461 work better with SHA-256 as well as SHA-1.
462 (merge 30310f3cc4 ss/t3200-test-zero-oid later to maint).
463
464 * Instead of hardcoded 'origin', use the configured default remote
465 when fetching from submodules.
466 (merge 3b5fb32da8 ng/submodule-default-remote later to maint).
467
468 * The code in "git help" that shows configuration items in sorted
469 order was awkwardly organized and prone to bugs.
470
471 * "imap-send" used to use functions whose use is going to be removed
472 with OpenSSL 4.0; rewrite them using public API that has been
473 available since OpenSSL 1.1 since 2016 or so.
474 (merge 6392a0b75d bb/imap-send-openssl-4.0-prep later to maint).
475
476 * Fix an example in the user-manual.
477 (merge 5514f14617 gj/user-manual-fix-grep-example later to maint).
478
479 * The final clean-up phase of the diff output could turn the result of
480 histogram diff algorithm suboptimal, which has been corrected.
481 (merge e417277ae9 yc/histogram-hunk-shift-fix later to maint).
482
483 * "git diff -U<num>" was too lenient in its command line parsing and
484 took an empty string as a valid <num>.
485 (merge 4f6a803aba ty/doc-diff-u-wo-number later to maint).
486
487 * The handling of the incomplete lines at the end by "git
488 diff-highlight" has been fixed.
489
490 * merge-file --object-id used to trigger a BUG when run in a linked
491 worktree, which has been fixed.
492 (merge 57246b7c62 mr/merge-file-object-id-worktree-fix later to maint).
493
494 * "git apply -p<n>" parses <n> more carefully now.
495 (merge d05d84c5f5 mf/apply-p-no-atoi later to maint).
496
497 * A test to run a .bat file with whitespaces in the name with arguments
498 with whitespaces in them was flaky in that sometimes it got killed
499 before it produced expected side effects, which has been rewritten to
500 make it more robust.
501 (merge 3ad4921838 jk/t0061-bat-test-update later to maint).
502
503 * "git ls-remote '+refs/tags/*:refs/tags/*' https://..." run outside a
504 repository would dereference a NULL while trying to see if the given
505 refspec is a single-object refspec, which has been corrected.
506 (merge 4e5dc601dd kj/refspec-parsing-outside-repository later to maint).
507
508 * Fix a regression in writing the commit-graph where commits with dates
509 exceeding 34 bits (beyond year 2514) could cause an underflow and
510 crash Git during the generation data overflow chunk writing.
511
512 * The value of a wrong pointer variable was referenced in an error
513 message that reported that it shouldn't be NULL.
514 (merge 753ecf4205 yc/path-walk-fix-error-reporting later to maint).
515
516 * The check in "receive-pack" to prevent a checked out branch from
517 getting updated via updateInstead mechanism has been corrected.
518
519 * "git backfill" is capable of auto-detecting a sparsely checked out
520 working tree, which was broken.
521 (merge 339eba65a7 th/backfill-auto-detect-sparseness-fix later to maint).
522
523 * add_files_to_cache() used diff_files() to detect only the paths that
524 are different between the index and the working tree and add them,
525 which does not need rename detection, which interfered with unnecessary
526 conflicts.
527 (merge c0ce43376b ng/add-files-to-cache-wo-rename later to maint).
528
529 * Doc mark-up update for entries in the glossary with bulleted lists.
530 (merge a65cbd87ea jk/doc-markup-sub-list-indentation later to maint).
531
532 * CI dependency updates.
533 (merge 4bdb17e3a8 jc/ci-github-actions-use-checkout-v5 later to maint).
534
535 * Other code cleanup, docfix, build fix, etc.
536 (merge d79fff4a11 jk/remote-tracking-ref-leakfix later to maint).
537 (merge 7a747f972d dd/t5403-modernise later to maint).
538 (merge 81021871ea sp/myfirstcontribution-include-update later to maint).
539 (merge 49223593fd ac/sparse-checkout-string-list-cleanup later to maint).
540 (merge a824421d36 sp/t5500-cleanup later to maint).
541 (merge df1c5d7ed7 kh/doc-shortlog-fix later to maint).
542 (merge 2d45507f15 am/doc-github-contributiong-link-to-submittingpatches later to maint).
543 (merge 68060b9262 hs/t9160-test-paths later to maint).
544 (merge 486386c687 cs/subtree-reftable-testfix later to maint).
545 (merge 0728012c53 jc/diff-highlight-main-master-testfix later to maint).
546 (merge 831989ef38 mc/doc-send-email-signed-off-by-cc later to maint).
547 (merge c44b3f3203 sd/doc-my1c-api-config-reference-fix later to maint).
548 (merge 6c21e53bad rs/version-wo-the-repository later to maint).
549 (merge 10c68d2577 rs/clean-includes later to maint).
550 (merge 168d575719 bk/t2003-modernise later to maint).
551 (merge 6bfef81c9a kh/doc-rerere-options-xref later to maint).
552 (merge aaf3cc3d8d sd/t7003-test-path-is-helpers later to maint).
553 (merge 2668b6bdc4 jc/doc-rerere-update later to maint).
554 (merge 2f99f50f2d jc/doc-cg-c-comment later to maint).
555 (merge a454cdca42 kh/doc-am-format-sendmail later to maint).
556 (merge 8b0061b5c5 jk/ref-filter-lrstrip-optim later to maint).
557 (merge 5133837392 ps/ci-gitlab-msvc-updates later to maint).
558 (merge 143e84958c db/doc-fetch-jobs-auto later to maint).
559 (merge 0678e01f02 ap/use-test-seq-f-more later to maint).
560 (merge 96286f14b0 ty/symlinks-use-unsigned-for-bitset later to maint).
561 (merge b10e0cb1f3 kh/doc-am-xref later to maint).
562 (merge ed84bc1c0d kh/doc-patch-id-4 later to maint).
563 (merge 7451864bfa sc/pack-redundant-leakfix later to maint).
564 (merge f87593ab1a cx/fetch-display-ubfix later to maint).
565 (merge a66c8c7f91 jk/repo-structure-cleanup later to maint).
566 (merge 5ee8782f87 ss/test-that-that-typofix later to maint).
567 (merge f31b322008 fp/t3310-test-path-is-helpers later to maint).
568 (merge b22ed4c4f9 kj/path-micro-code-cleanup later to maint).
569 (merge a56fa1ca05 lp/doc-gitprotocol-pack-fixes later to maint).
570 (merge 0d6bb8b541 ss/t3700-modernize later to maint).
571 (merge 63c00a677b ss/t9123-setup-inside-test-expect-success later to maint).
572 (merge beca0ca4be os/doc-git-custom-commands later to maint).
573 (merge 4c223571be ty/patch-ids-document-lazy-eval later to maint).
574 (merge 476365ac85 jc/doc-wholesale-replace-before-next later to maint).
575 (merge 35f220b639 ss/submodule--helper-use-xmalloc later to maint).
576 (merge 02cbae61df cf/constness-fixes later to maint).
577 (merge 69efd53c81 ms/t7605-test-path-is-helpers later to maint).
578 (merge d39cef3a1a ss/t0410-delete-object-cleanup later to maint).
579 (merge 2f05039717 rj/pack-refs-tests-path-is-helpers later to maint).
580 (merge 2594747ad1 jk/transport-color-leakfix later to maint).
581 (merge 48430e44ac mf/t0008-cleanup later to maint).
582 (merge fc8a4f15e7 gi/doc-boolean-config-typofix later to maint).
583 (merge 37182267a0 kh/doc-interpret-trailers-1 later to maint).
584 (merge f64c50e768 jc/rerere-modern-strbuf-handling later to maint).
585 (merge 699248d89e th/t8003-unhide-git-failures later to maint).
586 (merge d8e34f971b za/t2000-modernise later to maint).
587 (merge 849988bc74 th/t6101-unhide-git-failures later to maint).
588 (merge 0f0ce07625 sp/doc-gitignore-oowt later to maint).