1Git 2.18 Release Notes 2====================== 3 4Updates since v2.17 5------------------- 6 7UI, Workflows & Features 8 9 * Rename detection logic in "diff" family that is used in "merge" has 10 learned to guess when all of x/a, x/b and x/c have moved to z/a, 11 z/b and z/c, it is likely that x/d added in the meantime would also 12 want to move to z/d by taking the hint that the entire directory 13 'x' moved to 'z'. A bug causing dirty files involved in a rename 14 to be overwritten during merge has also been fixed as part of this 15 work. Incidentally, this also avoids updating a file in the 16 working tree after a (non-trivial) merge whose result matches what 17 our side originally had. 18 19 * "git filter-branch" learned to use a different exit code to allow 20 the callers to tell the case where there was no new commits to 21 rewrite from other error cases. 22 23 * When built with more recent cURL, GIT_SSL_VERSION can now specify 24 "tlsv1.3" as its value. 25 26 * "git gui" learned that "~/.ssh/id_ecdsa.pub" and 27 "~/.ssh/id_ed25519.pub" are also possible SSH key files. 28 (merge 2e2f0288ef bb/git-gui-ssh-key-files later to maint). 29 30 * "git gui" performs commit upon CTRL/CMD+ENTER but the 31 CTRL/CMD+KP_ENTER (i.e. enter key on the numpad) did not have the 32 same key binding. It now does. 33 (merge 28a1d94a06 bp/git-gui-bind-kp-enter later to maint). 34 35 * "git gui" has been taught to work with old versions of tk (like 36 8.5.7) that do not support "ttk::style theme use" as a way to query 37 the current theme. 38 (merge 4891961105 cb/git-gui-ttk-style later to maint). 39 40 * "git rebase" has learned to honor "--signoff" option when using 41 backends other than "am" (but not "--preserve-merges"). 42 43 * "git branch --list" during an interrupted "rebase -i" now lets 44 users distinguish the case where a detached HEAD is being rebased 45 and a normal branch is being rebased. 46 47 * "git mergetools" learned talking to guiffy. 48 49 * The scripts in contrib/emacs/ have outlived their usefulness and 50 have been replaced with a stub that errors out and tells the user 51 there are replacements. 52 53 * The new "checkout-encoding" attribute can ask Git to convert the 54 contents to the specified encoding when checking out to the working 55 tree (and the other way around when checking in). 56 57 * The "git config" command uses separate options e.g. "--int", 58 "--bool", etc. to specify what type the caller wants the value to 59 be interpreted as. A new "--type=<typename>" option has been 60 introduced, which would make it cleaner to define new types. 61 62 * "git config --get" learned the "--default" option, to help the 63 calling script. Building on top of the above changes, the 64 "git config" learns "--type=color" type. Taken together, you can 65 do things like "git config --get foo.color --default blue" and get 66 the ANSI color sequence for the color given to foo.color variable, 67 or "blue" if the variable does not exist. 68 69 * "git ls-remote" learned an option to allow sorting its output based 70 on the refnames being shown. 71 72 * The command line completion (in contrib/) has been taught that "git 73 stash save" has been deprecated ("git stash push" is the preferred 74 spelling in the new world) and does not offer it as a possible 75 completion candidate when "git stash push" can be. 76 77 * "git gc --prune=nonsense" spent long time repacking and then 78 silently failed when underlying "git prune --expire=nonsense" 79 failed to parse its command line. This has been corrected. 80 81 * Error messages from "git push" can be painted for more visibility. 82 83 * "git http-fetch" (deprecated) had an optional and experimental 84 "feature" to fetch only commits and/or trees, which nobody used. 85 This has been removed. 86 87 * The functionality of "$GIT_DIR/info/grafts" has been superseded by 88 the "refs/replace/" mechanism for some time now, but the internal 89 code had support for it in many places, which has been cleaned up 90 in order to drop support of the "grafts" mechanism. 91 92 * "git worktree add" learned to check out an existing branch. 93 94 * "git --no-pager cmd" did not have short-and-sweet single letter 95 option. Now it does as "-P". 96 (merge 7213c28818 js/no-pager-shorthand later to maint). 97 98 * "git rebase" learned "--rebase-merges" to transplant the whole 99 topology of commit graph elsewhere. 100 101 * "git status" learned to pay attention to UI related diff 102 configuration variables such as diff.renames. 103 104 * The command line completion mechanism (in contrib/) learned to load 105 custom completion file for "git $command" where $command is a 106 custom "git-$command" that the end user has on the $PATH when using 107 newer version of bash. 108 109 * "git send-email" can sometimes offer confirmation dialog "Send this 110 email?" with choices 'Yes', 'No', 'Quit', and 'All'. A new action 111 'Edit' has been added to this dialog's choice. 112 113 * With merge.renames configuration set to false, the recursive merge 114 strategy can be told not to spend cycles trying to find renamed 115 paths and merge them accordingly. 116 117 * "git status" learned to honor a new status.renames configuration to 118 skip rename detection, which could be useful for those who want to 119 do so without disabling the default rename detection done by the 120 "git diff" command. 121 122 * Command line completion (in contrib/) learned to complete pathnames 123 for various commands better. 124 125 * "git blame" learns to unhighlight uninteresting metadata from the 126 originating commit on lines that are the same as the previous one, 127 and also paint lines in different colors depending on the age of 128 the commit. 129 130 * Transfer protocol v2 learned to support the partial clone. 131 132 * When a short hexadecimal string is used to name an object but there 133 are multiple objects that share the string as the prefix of their 134 names, the code lists these ambiguous candidates in a help message. 135 These object names are now sorted according to their types for 136 easier eyeballing. 137 138 * "git fetch $there $refspec" that talks over protocol v2 can take 139 advantage of server-side ref filtering; the code has been extended 140 so that this mechanism triggers also when fetching with configured 141 refspec. 142 143 * Our HTTP client code used to advertise that we accept gzip encoding 144 from the other side; instead, just let cURL library to advertise 145 and negotiate the best one. 146 147 * "git p4" learned to "unshelve" shelved commit from P4. 148 (merge 123f631761 ld/p4-unshelve later to maint). 149 150 151Performance, Internal Implementation, Development Support etc. 152 153 * A "git fetch" from a repository with insane number of refs into a 154 repository that is already up-to-date still wasted too many cycles 155 making many lstat(2) calls to see if these objects at the tips 156 exist as loose objects locally. These lstat(2) calls are optimized 157 away by enumerating all loose objects beforehand. 158 It is unknown if the new strategy negatively affects existing use 159 cases, fetching into a repository with many loose objects from a 160 repository with small number of refs. 161 162 * Git can be built to use either v1 or v2 of the PCRE library, and so 163 far, the build-time configuration USE_LIBPCRE=YesPlease instructed 164 the build procedure to use v1, but now it means v2. USE_LIBPCRE1 165 and USE_LIBPCRE2 can be used to explicitly choose which version to 166 use, as before. 167 168 * The build procedure learned to optionally use symbolic links 169 (instead of hardlinks and copies) to install "git-foo" for built-in 170 commands, whose binaries are all identical. 171 172 * Conversion from uchar[20] to struct object_id continues. 173 174 * The way "git worktree prune" worked internally has been simplified, 175 by assuming how "git worktree move" moves an existing worktree to a 176 different place. 177 178 * Code clean-up for the "repository" abstraction. 179 (merge 00a3da2a13 nd/remove-ignore-env-field later to maint). 180 181 * Code to find the length to uniquely abbreviate object names based 182 on packfile content, which is a relatively recent addtion, has been 183 optimized to use the same fan-out table. 184 185 * The mechanism to use parse-options API to automate the command line 186 completion continues to get extended and polished. 187 188 * Copies of old scripted Porcelain commands in contrib/examples/ have 189 been removed. 190 191 * Some tests that rely on the exact hardcoded values of object names 192 have been updated in preparation for hash function migration. 193 194 * Perf-test update. 195 196 * Test helper update. 197 198 * The effort continues to refactor the internal global data structure 199 to make it possible to open multiple repositories, work with and 200 then close them, 201 202 * Small test-helper programs have been consolidated into a single 203 binary. 204 205 * API clean-up around ref-filter code. 206 207 * Shell completion (in contrib) that gives list of paths have been 208 optimized somewhat. 209 210 * The index file is updated to record the fsmonitor section after a 211 full scan was made, to avoid wasting the effort that has already 212 spent. 213 214 * Performance measuring framework in t/perf learned to help bisecting 215 performance regressions. 216 217 * Some multi-word source filenames are being renamed to separate 218 words with dashes instead of underscores. 219 220 * An reusable "memory pool" implementation has been extracted from 221 fast-import.c, which in turn has become the first user of the 222 mem-pool API. 223 224 * A build-time option has been added to allow Git to be told to refer 225 to its associated files relative to the main binary, in the same 226 way that has been possible on Windows for quite some time, for 227 Linux, BSDs and Darwin. 228 229 * Precompute and store information necessary for ancestry traversal 230 in a separate file to optimize graph walking. 231 232 * The effort to pass the repository in-core structure throughout the 233 API continues. This round deals with the code that implements the 234 refs/replace/ mechanism. 235 236 * The build procedure "make DEVELOPER=YesPlease" learned to enable a 237 bit more warning options depending on the compiler used to help 238 developers more. There also is "make DEVOPTS=tokens" knob 239 available now, for those who want to help fixing warnings we 240 usually ignore, for example. 241 242 * A new version of the transport protocol is being worked on. 243 244 * The code to interface to GPG has been restructured somewhat to make 245 it cleaner to integrate with other types of signature systems later. 246 247 * The code has been taught to use the duplicated information stored 248 in the commit-graph file to learn the tree object name for a commit 249 to avoid opening and parsing the commit object when it makes sense 250 to do so. 251 252 * "git gc" in a large repository takes a lot of time as it considers 253 to repack all objects into one pack by default. The command has 254 been taught to pretend as if the largest existing packfile is 255 marked with ".keep" so that it is left untouched while objects in 256 other packs and loose ones are repacked. 257 258 * The transport protocol v2 is getting updated further. 259 260 * The codepath around object-info API has been taught to take the 261 repository object (which in turn tells the API which object store 262 the objects are to be located). 263 264 * "git pack-objects" needs to allocate tons of "struct object_entry" 265 while doing its work, and shrinking its size helps the performance 266 quite a bit. 267 268 * The implementation of "git rebase -i --root" has been updated to use 269 the sequencer machinery more. 270 271 * Developer support update, by using BUG() macro instead of die() to 272 mark codepaths that should not happen more clearly. 273 274 * Developer support. Use newer GCC on one of the builds done at 275 TravisCI.org to get more warnings and errors diagnosed. 276 277 * Conversion from uchar[20] to struct object_id continues. 278 279 * By code restructuring of submodule merge in merge-recursive, 280 informational messages from the codepath are now given using the 281 same mechanism as other output, and honor the merge.verbosity 282 configuration. The code also learned to give a few new messages 283 when a submodule three-way merge resolves cleanly when one side 284 records a descendant of the commit chosen by the other side. 285 286 * Avoid unchecked snprintf() to make future code auditing easier. 287 (merge ac4896f007 jk/snprintf-truncation later to maint). 288 289 * Many tests hardcode the raw object names, which would change once 290 we migrate away from SHA-1. While some of them must test against 291 exact object names, most of them do not have to use hardcoded 292 constants in the test. The latter kind of tests have been updated 293 to test the moral equivalent of the original without hardcoding the 294 actual object names. 295 296 * The list of commands with their various attributes were spread 297 across a few places in the build procedure, but it now is getting a 298 bit more consolidated to allow more automation. 299 300 * Quite a many tests assumed that newly created refs are made as 301 loose refs using the files backend, which have been updated to use 302 proper plumbing like rev-parse and update-ref, to avoid breakage 303 once we start using different ref backends. 304 305 306Also contains various documentation updates and code clean-ups. 307 308 309Fixes since v2.17 310----------------- 311 312 * "git shortlog cruft" aborted with a BUG message when run outside a 313 Git repository. The command has been taught to complain about 314 extra and unwanted arguments on its command line instead in such a 315 case. 316 (merge 4aa0161e83 ma/shortlog-revparse later to maint). 317 318 * "git stash push -u -- <pathspec>" gave an unnecessary and confusing 319 error message when there was no tracked files that match the 320 <pathspec>, which has been fixed. 321 (merge 353278687e tg/stash-untracked-with-pathspec-fix later to maint). 322 323 * "git tag --contains no-such-commit" gave a full list of options 324 after giving an error message. 325 (merge 3bb0923f06 ps/contains-id-error-message later to maint). 326 327 * "diff-highlight" filter (in contrib/) learned to undertand "git log 328 --graph" output better. 329 (merge 4551fbba14 jk/diff-highlight-graph-fix later to maint). 330 331 * when refs that do not point at committish are given, "git 332 filter-branch" gave a misleading error messages. This has been 333 corrected. 334 (merge f78ab355e7 yk/filter-branch-non-committish-refs later to maint). 335 336 * "git submodule status" misbehaved on a submodule that has been 337 removed from the working tree. 338 (merge 74b6bda32f rs/status-with-removed-submodule later to maint). 339 340 * When credential helper exits very quickly without reading its 341 input, it used to cause Git to die with SIGPIPE, which has been 342 fixed. 343 (merge a0d51e8d0e eb/cred-helper-ignore-sigpipe later to maint). 344 345 * "git rebase --keep-empty" still removed an empty commit if the 346 other side contained an empty commit (due to the "does an 347 equivalent patch exist already?" check), which has been corrected. 348 (merge 3d946165e1 pw/rebase-keep-empty-fixes later to maint). 349 350 * Some codepaths, including the refs API, get and keep relative 351 paths, that go out of sync when the process does chdir(2). The 352 chdir-notify API is introduced to let these codepaths adjust these 353 cached paths to the new current directory. 354 (merge fb9c2d2703 jk/relative-directory-fix later to maint). 355 356 * "cd sub/dir && git commit ../path" ought to record the changes to 357 the file "sub/path", but this regressed long time ago. 358 (merge 86238e07ef bw/commit-partial-from-subdirectory-fix later to maint). 359 360 * Recent introduction of "--log-destination" option to "git daemon" 361 did not work well when the daemon was run under "--inetd" mode. 362 (merge e67d906d73 lw/daemon-log-destination later to maint). 363 364 * Small fix to the autoconf build procedure. 365 (merge 249482daf0 es/fread-reads-dir-autoconf-fix later to maint). 366 367 * Fix an unexploitable (because the oversized contents are not under 368 attacker's control) buffer overflow. 369 (merge d8579accfa bp/fsmonitor-bufsize-fix later to maint). 370 371 * Recent simplification of build procedure forgot a bit of tweak to 372 the build procedure of contrib/mw-to-git/ 373 (merge d8698987f3 ab/simplify-perl-makefile later to maint). 374 375 * Moving a submodule that itself has submodule in it with "git mv" 376 forgot to make necessary adjustment to the nested sub-submodules; 377 now the codepath learned to recurse into the submodules. 378 379 * "git config --unset a.b", when "a.b" is the last variable in an 380 otherwise empty section "a", left an empty section "a" behind, and 381 worse yet, a subsequent "git config a.c value" did not reuse that 382 empty shell and instead created a new one. These have been 383 (partially) corrected. 384 (merge c71d8bb38a js/empty-config-section-fix later to maint). 385 386 * "git worktree remove" learned that "-f" is a shorthand for 387 "--force" option, just like for "git worktree add". 388 (merge d228eea514 sb/worktree-remove-opt-force later to maint). 389 390 * The completion script (in contrib/) learned to clear cached list of 391 command line options upon dot-sourcing it again in a more efficient 392 way. 393 (merge 94408dc71c sg/completion-clear-cached later to maint). 394 395 * "git svn" had a minor thinko/typo which has been fixed. 396 (merge 51db271587 ab/git-svn-get-record-typofix later to maint). 397 398 * During a "rebase -i" session, the code could give older timestamp 399 to commits created by later "pick" than an earlier "reword", which 400 has been corrected. 401 (merge 12f7babd6b js/ident-date-fix later to maint). 402 403 * "git submodule status" did not check the symbolic revision name it 404 computed for the submodule HEAD is not the NULL, and threw it at 405 printf routines, which has been corrected. 406 (merge 0b5e2ea7cf nd/submodule-status-fix later to maint). 407 408 * When fed input that already has In-Reply-To: and/or References: 409 headers and told to add the same information, "git send-email" 410 added these headers separately, instead of appending to an existing 411 one, which is a violation of the RFC. This has been corrected. 412 (merge 256be1d3f0 sa/send-email-dedup-some-headers later to maint). 413 414 * "git fast-export" had a regression in v2.15.0 era where it skipped 415 some merge commits in certain cases, which has been corrected. 416 (merge be011bbe00 ma/fast-export-skip-merge-fix later to maint). 417 418 * The code did not propagate the terminal width to subprocesses via 419 COLUMNS environment variable, which it now does. This caused 420 trouble to "git column" helper subprocess when "git tag --column=row" 421 tried to list the existing tags on a display with non-default width. 422 (merge b5d5a567fb nd/term-columns later to maint). 423 424 * We learned that our source files with ".pl" and ".py" extensions 425 are Perl and Python files respectively and changes to them are 426 better viewed as such with appropriate diff drivers. 427 (merge 7818b619e2 ab/perl-python-attrs later to maint). 428 429 * "git rebase -i" sometimes left intermediate "# This is a 430 combination of N commits" message meant for the human consumption 431 inside an editor in the final result in certain corner cases, which 432 has been fixed. 433 (merge 15ef69314d js/rebase-i-clean-msg-after-fixup-continue later to maint). 434 435 * A test to see if the filesystem normalizes UTF-8 filename has been 436 updated to check what we need to know in a more direct way, i.e. a 437 path created in NFC form can be accessed with NFD form (or vice 438 versa) to cope with APFS as well as HFS. 439 (merge 742ae10e35 tb/test-apfs-utf8-normalization later to maint). 440 441 * "git format-patch --cover --attach" created a broken MIME multipart 442 message for the cover letter, which has been fixed by keeping the 443 cover letter as plain text file. 444 (merge 50cd54ef4e bc/format-patch-cover-no-attach later to maint). 445 446 * The split-index feature had a long-standing and dormant bug in 447 certain use of the in-core merge machinery, which has been fixed. 448 (merge 7db118303a en/unpack-trees-split-index-fix later to maint). 449 450 * Asciidoctor gives a reasonable imitation for AsciiDoc, but does not 451 render illustration in a literal block correctly when indented with 452 HT by default. The problem is fixed by forcing 8-space tabs. 453 (merge 379805051d bc/asciidoctor-tab-width later to maint). 454 455 * Code clean-up to adjust to a more recent lockfile API convention that 456 allows lockfile instances kept on the stack. 457 (merge 0fa5a2ed8d ma/lockfile-cleanup later to maint). 458 459 * the_repository->index is not a allocated piece of memory but 460 repo_clear() indiscriminately attempted to free(3) it, which has 461 been corrected. 462 (merge 74373b5f10 nd/repo-clear-keep-the-index later to maint). 463 464 * Code clean-up to avoid non-standard-conformant pointer arithmetic. 465 (merge c112084af9 rs/no-null-ptr-arith-in-fast-export later to maint). 466 467 * Code clean-up to turn history traversal more robust in a 468 semi-corrupt repository. 469 (merge 8702b30fd7 jk/unavailable-can-be-missing later to maint). 470 471 * "git update-ref A B" is supposed to ensure that ref A does not yet 472 exist when B is a NULL OID, but this check was not done correctly 473 for pseudo-refs outside refs/ hierarchy, e.g. MERGE_HEAD. 474 475 * "git submodule update" and "git submodule add" supported the 476 "--reference" option to borrow objects from a neighbouring local 477 repository like "git clone" does, but lacked the more recent 478 invention "--dissociate". Also "git submodule add" has been taught 479 to take the "--progress" option. 480 (merge a0ef29341a cf/submodule-progress-dissociate later to maint). 481 482 * Update credential-netrc helper (in contrib/) to allow customizing 483 the GPG used to decrypt the encrypted .netrc file. 484 (merge 786ef50a23 lm/credential-netrc later to maint). 485 486 * "git submodule update" attempts two different kinds of "git fetch" 487 against the upstream repository to grab a commit bound at the 488 submodule's path, but it incorrectly gave up if the first kind 489 (i.e. a normal fetch) failed, making the second "last resort" one 490 (i.e. fetching an exact commit object by object name) ineffective. 491 This has been corrected. 492 (merge e30d833671 sb/submodule-update-try-harder later to maint). 493 494 * Error behaviour of "git grep" when it cannot read the index was 495 inconsistent with other commands that uses the index, which has 496 been corrected to error out early. 497 (merge b2aa84c789 sb/grep-die-on-unreadable-index later to maint). 498 499 * We used to call regfree() after regcomp() failed in some codepaths, 500 which have been corrected. 501 (merge 17154b1576 ma/regex-no-regfree-after-comp-fail later to maint). 502 503 * The import-tars script (in contrib/) has been taught to handle 504 tarballs with overly long paths that use PAX extended headers. 505 (merge 12ecea46e3 pa/import-tars-long-names later to maint). 506 507 * "git rev-parse Y..." etc. misbehaved when given endpoints were 508 not committishes. 509 (merge 0ed556d38f en/rev-parse-invalid-range later to maint). 510 511 * "git pull -recurse-submodules --rebase", when the submodule 512 repository's history did not have anything common between ours and 513 the upstream's, failed to execute. We need to fetch from them to 514 continue even in such a case. 515 (merge 4d36f88be7 jt/submodule-pull-recurse-rebase later to maint). 516 517 * "git remote update" can take both a single remote nickname and a 518 nickname for remote groups, but only one of them was documented. 519 (merge a97447a42a nd/remote-update-doc later to maint). 520 521 * Other minor doc, test and build updates and code cleanups. 522 (merge 248f66ed8e nd/trace-with-env later to maint). 523 (merge 14ced5562c ys/bisect-object-id-missing-conversion-fix later to maint). 524 (merge 5988eb631a ab/doc-hash-brokenness later to maint). 525 (merge a4d4e32a70 pk/test-avoid-pipe-hiding-exit-status later to maint). 526 (merge 05e293c1ac jk/flockfile-stdio later to maint). 527 (merge e9184b0789 jk/t5561-missing-curl later to maint). 528 (merge b1801b85a3 nd/worktree-move later to maint). 529 (merge bbd374dd20 ak/bisect-doc-typofix later to maint). 530 (merge 4855f06fb3 mn/send-email-credential-doc later to maint). 531 (merge 8523b1e355 en/doc-typoes later to maint). 532 (merge 43b44ccfe7 js/t5404-path-fix later to maint). 533 (merge decf711fc1 ps/test-chmtime-get later to maint). 534 (merge 22d11a6e8e es/worktree-docs later to maint). 535 (merge 92a5dbbc22 tg/use-git-contacts later to maint). 536 (merge adc887221f tq/t1510 later to maint). 537 (merge bed21a8ad6 sg/doc-gc-quote-mismatch-fix later to maint). 538 (merge 73364e4f10 tz/doc-git-urls-reference later to maint). 539 (merge cd1e606bad bc/mailmap-self later to maint). 540 (merge f7997e3682 ao/config-api-doc later to maint). 541 (merge ee930754d8 jk/apply-p-doc later to maint). 542 (merge 011b648646 nd/pack-format-doc later to maint). 543 (merge 87a6bb701a sg/t5310-jgit-bitmap-test later to maint). 544 (merge f6b82970aa sg/t5516-fixes later to maint). 545 (merge 4362da078e sg/t7005-spaces-in-filenames-cleanup later to maint). 546 (merge 7d0ee47c11 js/test-unset-prereq later to maint). 547 (merge 5356a3c354 ah/misc-doc-updates later to maint). 548 (merge 92c4a7a129 nd/completion-aliasfiletype-typofix later to maint). 549 (merge 58bd77b66a nd/pack-unreachable-objects-doc later to maint). 550 (merge 4ed79d5203 sg/t6500-no-redirect-of-stdin later to maint). 551 (merge 17b8a2d6cd jk/config-blob-sans-repo later to maint). 552 (merge 590551ca2c rd/tag-doc-lightweight later to maint). 553 (merge 44f560fc16 rd/init-typo later to maint). 554 (merge f156a0934a rd/p4-doc-markup-env later to maint). 555 (merge 2a00502b14 tg/doc-sec-list later to maint).