| 1 | Git v2.52 Release Notes |
| 2 | ======================= |
| 3 | |
| 4 | UI, Workflows & Features |
| 5 | ------------------------ |
| 6 | |
| 7 | * The "list" subcommand of "git refs" acts as a front-end for |
| 8 | "git for-each-ref". |
| 9 | |
| 10 | * "git cmd --help-all" now works outside repositories. |
| 11 | |
| 12 | * "git diff-tree" learned "--max-depth" option. |
| 13 | |
| 14 | * A new subcommand "git repo" gives users a way to grab various |
| 15 | repository characteristics. |
| 16 | |
| 17 | * A new command "git last-modified" has been added to show the closest |
| 18 | ancestor commit that touched each path. |
| 19 | |
| 20 | * The "git refs exists" command that works like "git show-ref --exists" |
| 21 | has been added. |
| 22 | |
| 23 | * "git repo info" learns the short-hand option "-z" that is the same as |
| 24 | "--format=nul", and learns to report the objects format used in the |
| 25 | repository. |
| 26 | |
| 27 | * "core.commentChar=auto" that attempts to dynamically pick a |
| 28 | suitable comment character is non-workable, as it is too much |
| 29 | trouble to support for little benefit, and is marked as deprecated. |
| 30 | |
| 31 | * "git send-email" learned to drive "git imap-send" to store already |
| 32 | sent e-mails in an IMAP folder. |
| 33 | |
| 34 | * The "promisor-remote" capability mechanism has been updated to |
| 35 | allow the "partialCloneFilter" settings and the "token" value to be |
| 36 | communicated from the server side. |
| 37 | |
| 38 | * Declare that "git init" that is not otherwise configured uses |
| 39 | 'main' as the initial branch, not 'master', starting Git 3.0. |
| 40 | |
| 41 | * Keep giving hint about the default initial branch name for users |
| 42 | who may be surprised after Git 3.0 switch-over. |
| 43 | |
| 44 | * The stash.index configuration variable can be set to make "git stash |
| 45 | pop/apply" pretend that it was invoked with "--index". |
| 46 | |
| 47 | * "git fast-import" learned that "--signed-commits=<how>" option that |
| 48 | corresponds to that of "git fast-export". |
| 49 | |
| 50 | * Marking a hunk 'selected' in "git add -p" and then splitting made |
| 51 | all the split pieces 'selected'; this has been changed to make them |
| 52 | all 'undecided', which gives better end-user experience. |
| 53 | |
| 54 | * Configuration variables that take a pathname as a value |
| 55 | (e.g. blame.ignorerevsfile) can be marked as optional by prefixing |
| 56 | ":(optional)" before its value. |
| 57 | |
| 58 | * Show 'P'ipe command in "git add -p". |
| 59 | |
| 60 | * "git sparse-checkout" subcommand learned a new "clean" action to |
| 61 | prune otherwise unused working-tree files that are outside the |
| 62 | areas of interest. |
| 63 | |
| 64 | * "git fast-import" is taught to handle signed tags, just like it |
| 65 | recently learned to handle signed commits, in different ways. |
| 66 | |
| 67 | * A new configuration variable commitGraph.changedPaths allows to |
| 68 | turn "--changed-paths" on by default for "git commit-graph". |
| 69 | |
| 70 | * "Symlink symref" has been added to the list of things that will |
| 71 | disappear at Git 3.0 boundary. |
| 72 | |
| 73 | * "git maintenance" command learns the "geometric" strategy where it |
| 74 | avoids doing maintenance tasks that rebuilds everything from |
| 75 | scratch. |
| 76 | |
| 77 | * "git repo structure", a new command. |
| 78 | |
| 79 | * The help text and manual page of "git bisect" command have been |
| 80 | made consistent with each other. |
| 81 | |
| 82 | |
| 83 | Performance, Internal Implementation, Development Support etc. |
| 84 | -------------------------------------------------------------- |
| 85 | |
| 86 | * string_list_split*() family of functions have been extended to |
| 87 | simplify common use cases. |
| 88 | |
| 89 | * Arrays of strbuf is often a wrong data structure to use, and |
| 90 | strbuf_split*() family of functions that create them often have |
| 91 | better alternatives. Update several code paths and replace |
| 92 | strbuf_split*(). |
| 93 | |
| 94 | * Revision traversal limited with pathspec, like "git log dir/*", |
| 95 | used to ignore changed-paths Bloom filter when the pathspec |
| 96 | contained wildcards; now they take advantage of the filter when |
| 97 | they can. |
| 98 | |
| 99 | * Doc lint updates to encourage the newer and easier-to-use |
| 100 | `synopsis` format, with fixes to a handful of existing uses. |
| 101 | |
| 102 | * Remove dependency on the_repository and other globals from the |
| 103 | commit-graph code, and other changes unrelated to de-globaling. |
| 104 | |
| 105 | * Discord has been added to the first contribution documentation as |
| 106 | another way to ask for help. |
| 107 | |
| 108 | * Inspired by Ezekiel's recent effort to showcase Rust interface, the |
| 109 | hash function implementation used to hash lines have been updated |
| 110 | to the one used for ELF symbol lookup by Glibc. |
| 111 | |
| 112 | * Instead of scanning for the remaining items to see if there are |
| 113 | still commits to be explored in the queue, use khash to remember |
| 114 | which items are still on the queue (an unacceptable alternative is |
| 115 | to reserve one object flag bits). |
| 116 | |
| 117 | * The bulk-checkin code used to depend on a file-scope static |
| 118 | singleton variable, which has been updated to pass an instance |
| 119 | throughout the callchain. |
| 120 | |
| 121 | * The work to build on the bulk-checkin infrastructure to create many |
| 122 | objects at once in a transaction and to abstract it into the |
| 123 | generic object layer continues. |
| 124 | |
| 125 | * CodingGuidelines now spells out how bitfields are to be written. |
| 126 | |
| 127 | * Adjust to the way newer versions of cURL selectively enable tracing |
| 128 | options, so that our tests can continue to work. |
| 129 | |
| 130 | * The clear_alloc_state() API function was not fully clearing the |
| 131 | structure for reuse, but since nobody reuses it, replace it with a |
| 132 | variant that frees the structure as well, making the callers simpler. |
| 133 | |
| 134 | * "git range-diff" learned a way to limit the memory consumed by |
| 135 | O(N*N) cost matrix. |
| 136 | |
| 137 | * Some places in the code confused a variable that is *not* a boolean |
| 138 | to enable color but is an enum that records what the user requested |
| 139 | to do about color. A couple of bugs of this sort have been fixed, |
| 140 | while the code has been cleaned up to prevent similar bugs in the |
| 141 | future. |
| 142 | |
| 143 | * The build procedure based on meson learned a target to only build |
| 144 | documentation, similar to "make doc". |
| 145 | (merge ff4ec8ded0 ps/meson-build-docs later to maint). |
| 146 | |
| 147 | * Dip our toes a bit to (optionally) use Rust implemented helper |
| 148 | called from our C code. |
| 149 | |
| 150 | * Documentation for "git log --pretty" options has been updated |
| 151 | to make it easier to translate. |
| 152 | |
| 153 | * Instead of three library archives (one for git, one for reftable, |
| 154 | and one for xdiff), roll everything into a single libgit.a archive. |
| 155 | This would help later effort to FFI into Rust. |
| 156 | |
| 157 | * The beginning of SHA1-SHA256 interoperability work. |
| 158 | |
| 159 | * Build procedure for a few credential helpers (in contrib/) have |
| 160 | been updated. |
| 161 | |
| 162 | * CI improvements to handle the recent Rust integration better. |
| 163 | |
| 164 | * The code in "git repack" machinery has been cleaned up to prepare |
| 165 | for incremental update of midx files. |
| 166 | |
| 167 | * Two slightly different ways to get at "all the packfiles" in API |
| 168 | has been cleaned up. |
| 169 | |
| 170 | * The code to walk revision graph to compute merge base has been |
| 171 | optimized. |
| 172 | |
| 173 | * AI guidelines has been added to our documentation set. |
| 174 | |
| 175 | * Contributed credential helpers (obviously in contrib/) now have "cd |
| 176 | $there && make install" target. |
| 177 | |
| 178 | * The "MyFirstContribution" tutorial tells the reader how to send out |
| 179 | their patches; the section gained a hint to verify the message |
| 180 | reached the mailing list. |
| 181 | |
| 182 | * The "debug" ref-backend was missing a method implementation, which |
| 183 | has been corrected. |
| 184 | |
| 185 | * Build procedure for Wincred credential helper has been updated. |
| 186 | |
| 187 | * The build procedure based on meson learned to allow builders to |
| 188 | specify the directory to install HTML documents. |
| 189 | |
| 190 | * Building "git contacts" script (in contrib/) left the resulting |
| 191 | file unexecutable, which has been corrected. |
| 192 | |
| 193 | |
| 194 | Fixes since v2.51 |
| 195 | ----------------- |
| 196 | |
| 197 | Unless otherwise noted, all the changes in 2.51.X maintenance track, |
| 198 | including security updates, are included in this release. |
| 199 | |
| 200 | * During interactive rebase, using 'drop' on a merge commit lead to |
| 201 | an error, which was incorrect. |
| 202 | |
| 203 | * "git refs migrate" to migrate the reflog entries from a refs |
| 204 | backend to another had a handful of bugs squashed. |
| 205 | |
| 206 | * "git remote rename origin upstream" failed to move origin/HEAD to |
| 207 | upstream/HEAD when origin/HEAD is unborn and performed other |
| 208 | renames extremely inefficiently, which has been corrected. |
| 209 | (merge 16c4fa26b9 ps/remote-rename-fix later to maint). |
| 210 | |
| 211 | * "git describe" has been optimized by using better data structure. |
| 212 | (merge 08bb69d70f rs/describe-with-prio-queue later to maint). |
| 213 | |
| 214 | * "git push" had a code path that led to BUG() but it should have |
| 215 | been a die(), as it is a response to a usual but invalid end-user |
| 216 | action to attempt pushing an object that does not exist. |
| 217 | |
| 218 | * Various bugs about rename handling in "ort" merge strategy have |
| 219 | been fixed. |
| 220 | |
| 221 | * "git jump" (in contrib/) fails to parse the diff header correctly |
| 222 | when a file has a space in its name, which has been corrected. |
| 223 | (merge 621ce9c1c6 gh/git-jump-pathname-with-sp later to maint). |
| 224 | |
| 225 | * "git diff --no-index" run inside a subdirectory under control of a |
| 226 | Git repository operated at the top of the working tree and stripped |
| 227 | the prefix from the output, and oddballs like "-" (stdin) did not |
| 228 | work correctly because of it. Correct the set-up by undoing what |
| 229 | the set-up sequence did to cwd and prefix. |
| 230 | |
| 231 | * Various options to "git diff" that makes comparison ignore certain |
| 232 | aspects of the differences (like "space changes are ignored", |
| 233 | "differences in lines that match these regular expressions are |
| 234 | ignored") did not work well with "--name-only" and friends. |
| 235 | (merge b55e6d36eb ly/diff-name-only-with-diff-from-content later to maint). |
| 236 | |
| 237 | * The above caused regressions, which has been corrected. |
| 238 | |
| 239 | * Documentation for "git rebase" has been updated. |
| 240 | (merge 3f7f2b0359 je/doc-rebase later to maint). |
| 241 | |
| 242 | * The start_delayed_progress() function in the progress eye-candy API |
| 243 | did not clear its internal state, making an initial delay value |
| 244 | larger than 1 second ineffective, which has been corrected. |
| 245 | |
| 246 | * The compatObjectFormat extension is used to hide an incomplete |
| 247 | feature that is not yet usable for any purpose other than |
| 248 | developing the feature further. Document it as such to discourage |
| 249 | its use by mere mortals. |
| 250 | |
| 251 | * "git log -L..." compared trees of multiple parents with the tree of the |
| 252 | merge result in an unnecessarily inefficient way. |
| 253 | (merge 0a15bb634c sg/line-log-merge-optim later to maint). |
| 254 | |
| 255 | * Under a race against another process that is repacking the |
| 256 | repository, especially a partially cloned one, "git fetch" may |
| 257 | mistakenly think some objects we do have are missing, which has |
| 258 | been corrected. |
| 259 | |
| 260 | * "git fetch" can clobber a symref that is dangling when the |
| 261 | remote-tracking HEAD is set to auto update, which has been |
| 262 | corrected. |
| 263 | |
| 264 | * "git describe <blob>" misbehaves and/or crashes in some corner |
| 265 | cases, which has been taught to exit with failure gracefully. |
| 266 | (merge 7c10e48e81 jk/describe-blob later to maint). |
| 267 | |
| 268 | * Manual page for "gitk" is updated with the current maintainer's |
| 269 | name. |
| 270 | |
| 271 | * Update the instructions for using GGG in the MyFirstContribution |
| 272 | document to say that a GitHub PR could be made against `git/git` |
| 273 | instead of `gitgitgadget/git`. |
| 274 | |
| 275 | * Makefile tried to run multiple "cargo build" which would not work |
| 276 | very well; serialize their execution to work around this problem. |
| 277 | |
| 278 | * "git repack --path-walk" lost objects in some corner cases, which |
| 279 | has been corrected. |
| 280 | |
| 281 | * "git ls-files <pathspec>..." should not necessarily have to expand |
| 282 | the index fully if a sparsified directory is excluded by the |
| 283 | pathspec; the code is taught to expand the index on demand to avoid |
| 284 | this. |
| 285 | (merge 681f26bccc ds/ls-files-lazy-unsparse later to maint). |
| 286 | |
| 287 | * Windows "real-time monitoring" interferes with the execution of |
| 288 | tests and affects negatively in both correctness and performance, |
| 289 | which has been disabled in Gitlab CI. |
| 290 | |
| 291 | * A broken or malicious "git fetch" can say that it has the same |
| 292 | object for many many times, and the upload-pack serving it can |
| 293 | exhaust memory storing them redundantly, which has been corrected. |
| 294 | |
| 295 | * A corner case bug in "git log -L..." has been corrected. |
| 296 | |
| 297 | * "git rev-parse --short" and friends failed to disambiguate two |
| 298 | objects with object names that share common prefix longer than 32 |
| 299 | characters, which has been fixed. |
| 300 | (merge 8655908b9e jc/longer-disambiguation-fix later to maint). |
| 301 | |
| 302 | * Some among "git add -p" and friends ignored color.diff and/or |
| 303 | color.ui configuration variables, which is an old regression, which |
| 304 | has been corrected. |
| 305 | |
| 306 | * "git subtree" (in contrib/) did not work correctly when splitting |
| 307 | squashed subtrees, which has been improved. |
| 308 | |
| 309 | * Import a newer version of the clar unit testing framework. |
| 310 | (merge 93dbb6b3c5 ps/clar-updates later to maint). |
| 311 | |
| 312 | * "git send-email --compose --reply-to=<address>" used to add |
| 313 | duplicated Reply-To: header, which made mailservers unhappy. This |
| 314 | has been corrected. |
| 315 | (merge f448f65719 nb/send-email-no-dup-reply-to later to maint). |
| 316 | |
| 317 | * "git rebase -i" failed to clean-up the commit log message when the |
| 318 | command commits the final one in a chain of "fixup" commands, which |
| 319 | has been corrected. |
| 320 | |
| 321 | * There are double frees and leaks around setup_revisions() API used |
| 322 | in "git stash show", which has been fixed, and setup_revisions() |
| 323 | API gained a wrapper to make it more ergonomic when using it with |
| 324 | strvec-manged argc/argv pairs. |
| 325 | (merge a04bc71725 jk/setup-revisions-freefix later to maint). |
| 326 | |
| 327 | * Deal more gracefully with directory / file conflicts when the files |
| 328 | backend is used for ref storage, by failing only the ones that are |
| 329 | involved in the conflict while allowing others. |
| 330 | |
| 331 | * "git last-modified" operating in non-recursive mode used to trigger |
| 332 | a BUG(), which has been corrected. |
| 333 | |
| 334 | * The use of "git config get" command to learn how ANSI color |
| 335 | sequence is for a particular type, e.g., "git config get |
| 336 | --type=color --default=reset no.such.thing", isn't very ergonomic. |
| 337 | (merge e4dabf4fd6 ps/config-get-color-fixes later to maint). |
| 338 | |
| 339 | * The "do you still use it?" message given by a command that is |
| 340 | deeply deprecated and allow us to suggest alternatives has been |
| 341 | updated. |
| 342 | |
| 343 | * Clang-format update to let our control macros be formatted the way we |
| 344 | had them traditionally, e.g., "for_each_string_list_item()" without |
| 345 | space before the parentheses. |
| 346 | |
| 347 | * A few places where a size_t value was cast to curl_off_t without |
| 348 | checking has been updated to use the existing helper function. |
| 349 | |
| 350 | * "git reflog write" did not honor the configured user.name/email |
| 351 | which has been corrected. |
| 352 | |
| 353 | * Handling of an empty subdirectory of .git/refs/ in the ref-files |
| 354 | backend has been corrected. |
| 355 | |
| 356 | * Our CI script requires "sudo" that can be told to preserve |
| 357 | environment, but Ubuntu replaced with "sudo" with an implementation |
| 358 | that lacks the feature. Work this around by reinstalling the |
| 359 | original version. |
| 360 | |
| 361 | * The reftable backend learned to sanity check its on-disk data more |
| 362 | carefully. |
| 363 | (merge 466a3a1afd kn/reftable-consistency-checks later to maint). |
| 364 | |
| 365 | * A lot of code clean-up of xdiff. |
| 366 | Split out of a larger topic. |
| 367 | (merge 8b9c5d2e3a en/xdiff-cleanup later to maint). |
| 368 | |
| 369 | * "git format-patch --range-diff=... --notes=..." did not drive the |
| 370 | underlying range-diff with correct --notes parameter, ending up |
| 371 | comparing with different set of notes from its main patch output |
| 372 | you would get from "git format-patch --notes=..." for a singleton |
| 373 | patch. |
| 374 | |
| 375 | * The code in "git add -p" and friends to iterate over hunks was |
| 376 | riddled with bugs, which has been corrected. |
| 377 | |
| 378 | * A few more things that patch authors can do to help maintainer to |
| 379 | keep track of their topics better. |
| 380 | (merge 1a41698841 tb/doc-submitting-patches later to maint). |
| 381 | |
| 382 | * An earlier addition to "git diff --no-index A B" to limit the |
| 383 | output with pathspec after the two directories misbehaved when |
| 384 | these directories were given with a trailing slash, which has been |
| 385 | corrected. |
| 386 | |
| 387 | * The "--short" option of "git status" that meant output for humans |
| 388 | and "-z" option to show NUL delimited output format did not mix |
| 389 | well, and colored some but not all things. The command has been |
| 390 | updated to color all elements consistently in such a case. |
| 391 | |
| 392 | * Unicode width table update. |
| 393 | |
| 394 | * GPG signing test set-up has been broken for a year, which has been |
| 395 | corrected. |
| 396 | (merge 516bf45749 jc/t1016-setup-fix later to maint). |
| 397 | |
| 398 | * Recent OpenSSH creates the Unix domain socket to communicate with |
| 399 | ssh-agent under $HOME instead of /tmp, which causes our test to |
| 400 | fail doe to overly long pathname in our test environment, which has |
| 401 | been worked around by using "ssh-agent -T". |
| 402 | |
| 403 | * strbuf_split*() to split a string into multiple strbufs is often a |
| 404 | wrong API to use. A few uses of it have been removed by |
| 405 | simplifying the code. |
| 406 | (merge 2ab72a16d9 ob/gpg-interface-cleanup later to maint). |
| 407 | |
| 408 | * "git shortlog" knows "--committer" and "--author" options, which |
| 409 | the command line completion (in contrib/) did not handle well, |
| 410 | which has been corrected. |
| 411 | (merge c568fa8e1c kf/log-shortlog-completion-fix later to maint). |
| 412 | |
| 413 | * "git bisect" command did not react correctly to "git bisect help" |
| 414 | and "git bisect unknown", which has been corrected. |
| 415 | (merge 2bb3a012f3 rz/bisect-help-unknown later to maint). |
| 416 | |
| 417 | * The 'q'(uit) command in "git add -p" has been improved to quit |
| 418 | without doing any meaningless work before leaving, and giving EOF |
| 419 | (typically control-D) to the prompt is made to behave the same way. |
| 420 | |
| 421 | * The wildmatch code had a corner case bug that mistakenly makes |
| 422 | "foo**/bar" match with "foobar", which has been corrected. |
| 423 | (merge 1940a02dc1 jk/match-pathname-fix later to maint). |
| 424 | |
| 425 | * Tests did not set up GNUPGHOME correctly, which is fixed but some |
| 426 | flaky tests are exposed in t1016, which needs to be addressed |
| 427 | before this topic can move forward. |
| 428 | (merge 6cd8369ef3 tz/test-prepare-gnupghome later to maint). |
| 429 | |
| 430 | * The patterns used in the .gitignore files use backslash in the way |
| 431 | documented for fnmatch(3); document as such to reduce confusion. |
| 432 | (merge 8a6d158a1d jk/doc-backslash-in-exclude later to maint). |
| 433 | |
| 434 | * The version of macos image used in GitHub CI has been updated to |
| 435 | macos-14, as the macos-13 that we have been using got deprecated. |
| 436 | Perforce binary used there has been changed to arm64 version to |
| 437 | match. |
| 438 | (merge 73b9cdb7c4 jc/ci-use-macos-14 later to maint). |
| 439 | (merge ffff0bb0da jc/ci-use-arm64-p4-on-macos later to maint). |
| 440 | |
| 441 | * Other code cleanup, docfix, build fix, etc. |
| 442 | (merge 529a60a885 ua/t1517-short-help-tests later to maint). |
| 443 | (merge 22d421fed9 ac/deglobal-fmt-merge-log-config later to maint). |
| 444 | (merge a60203a015 dk/t7005-editor-updates later to maint). |
| 445 | (merge 16684b6fae ps/reftable-libgit2-cleanup later to maint). |
| 446 | (merge e5c27bd3d8 je/doc-add later to maint). |
| 447 | (merge 13296ac909 ps/object-store-midx-dedup-info later to maint). |
| 448 | (merge f9a6705d9a tc/t0450-harden later to maint). |
| 449 | (merge a66fc22bf9 rs/get-oid-with-flags-cleanup later to maint). |
| 450 | (merge 15b8abde07 js/mingw-includes-cleanup later to maint). |
| 451 | (merge 2cebca0582 tb/cat-file-objectmode-update later to maint). |
| 452 | (merge 8f487db07a kh/doc-patch-id-1 later to maint). |
| 453 | (merge f711f37b05 eb/t1016-hash-transition-fix later to maint). |
| 454 | (merge 85333aa1af jk/test-delete-gpgsig-leakfix later to maint). |