1Git 2.10 Release Notes 2====================== 3 4Backward compatibility notes 5---------------------------- 6 7Updates since v2.9 8------------------ 9 10UI, Workflows & Features 11 12 * "git pull --rebase --verify-signature" learned to warn the user 13 that "--verify-signature" is a no-op when rebasing. 14 15 * An upstream project can make a recommendation to shallowly clone 16 some submodules in the .gitmodules file it ships. 17 18 * "git worktree add" learned that '-' can be used as a short-hand for 19 "@{-1}", the previous branch. 20 21 * Update the funcname definition to support css files. 22 23 * The completion script (in contrib/) learned to complete "git 24 status" options. 25 26 * Messages that are generated by auto gc during "git push" on the 27 receiving end are now passed back to the sending end in such a way 28 that they are shown with "remote: " prefix to avoid confusing the 29 users. 30 31 * "git add -i/-p" learned to honor diff.compactionHeuristic 32 experimental knob, so that the user can work on the same hunk split 33 as "git diff" output. 34 35 * "upload-pack" allows a custom "git pack-objects" replacement when 36 responding to "fetch/clone" via the uploadpack.packObjectsHook. 37 (merge b738396 jk/upload-pack-hook later to maint). 38 39 * Teach format-patch and mailsplit (hence "am") how a line that 40 happens to begin with "From " in the e-mail message is quoted with 41 ">", so that these lines can be restored to their original shape. 42 (merge d9925d1 ew/mboxrd-format-am later to maint). 43 44 * "git repack" learned the "--keep-unreachable" option, which sends 45 loose unreachable objects to a pack instead of leaving them loose. 46 This helps heuristics based on the number of loose objects 47 (e.g. "gc --auto"). 48 (merge e26a8c4 jk/repack-keep-unreachable later to maint). 49 50 * "log --graph --format=" learned that "%>|(N)" specifies the width 51 relative to the terminal's left edge, not relative to the area to 52 draw text that is to the right of the ancestry-graph section. It 53 also now accepts negative N that means the column limit is relative 54 to the right border. 55 56 * A careless invocation of "git send-email directory/" after editing 57 0001-change.patch with an editor often ends up sending both 58 0001-change.patch and its backup file, 0001-change.patch~, causing 59 embarrassment and a minor confusion. Detect such an input and 60 offer to skip the backup files when sending the patches out. 61 (merge 531220b jc/send-email-skip-backup later to maint). 62 63 * "git submodule update" that drives many "git clone" could 64 eventually hit flaky servers/network conditions on one of the 65 submodules; the command learned to retry the attempt. 66 67 * The output coloring scheme learned two new attributes, italic and 68 strike, in addition to existing bold, reverse, etc. 69 70 * "git log" learns log.showSignature configuration variable, and a 71 command line option "--no-show-signature" to countermand it. 72 (merge fce04c3 mj/log-show-signature-conf later to maint). 73 74 * A couple of "git svn" updates. 75 76 * More markings of messages for i18n, with updates to various tests 77 to pass GETTEXT_POISON tests. 78 79 * "git archive" learned to handle files that are larger than 8GB and 80 commits far in the future than expressible by the traditional US-TAR 81 format. 82 (merge 5caeeb8 jk/big-and-future-archive-tar later to maint). 83 84 * A new configuration variable core.sshCommand has been added to 85 specify what value for GIT_SSH_COMMAND to use per repository. 86 87 * "git worktree prune" protected worktrees that are marked as 88 "locked" by creating a file in a known location. "git worktree" 89 command learned a dedicated command pair to create and remove such 90 a file, so that the users do not have to do this with editor. 91 92 * A handful of "git svn" updates. 93 94 * "git push" learned to accept and pass extra options to the 95 receiving end so that hooks can read and react to them. 96 97 * "git status" learned to suggest "merge --abort" during a conflicted 98 merge, just like it already suggests "rebase --abort" during a 99 conflicted rebase. 100 (merge b0a61ab mm/status-suggest-merge-abort later to maint). 101 102 * "git jump" script (in contrib/) has been updated a bit. 103 (merge a91e692 jk/git-jump later to maint). 104 105 * "git push" and "git clone" learned to give better progress meters 106 to the end user who is waiting on the terminal. 107 108 * An entry "git log --decorate" for the tip of the current branch is 109 shown as "HEAD -> name" (where "name" is the name of the branch); 110 paint the arrow in the same color as "HEAD", not in the color for 111 commits. 112 113 114Performance, Internal Implementation, Development Support etc. 115 116 * "git fast-import" learned the same performance trick to avoid 117 creating too small a packfile as "git fetch" and "git push" have, 118 using *.unpackLimit configuration. 119 120 * When "git daemon" is run without --[init-]timeout specified, a 121 connection from a client that silently goes offline can hang around 122 for a long time, wasting resources. The socket-level KEEPALIVE has 123 been enabled to allow the OS to notice such failed connections. 124 125 * "git upload-pack" command has been updated to use the parse-options 126 API. 127 128 * The "git apply" standalone program is being libified; this is the 129 first step to move many state variables into a structure that can 130 be explicitly (re)initialized to make the machinery callable more 131 than once. 132 133 * HTTP transport gained an option to produce more detailed debugging 134 trace. 135 (merge 73e57aa ep/http-curl-trace later to maint). 136 137 * Instead of taking advantage of a struct string_list that is 138 allocated with all NULs happens to be STRING_LIST_INIT_NODUP kind, 139 initialize them explicitly as such, to document their behaviour 140 better. 141 (merge 2721ce2 jk/string-list-static-init later to maint). 142 143 * HTTPd tests learned to show the server error log to help diagnosing 144 a failing tests. 145 (merge 44f243d nd/test-lib-httpd-show-error-log-in-verbose later to maint). 146 147 * The ownership rule for the piece of memory that hold references to 148 be fetched in "git fetch" was screwy, which has been cleaned up. 149 150 * "git bisect" makes an internal call to "git diff-tree" when 151 bisection finds the culprit, but this call did not initialize the 152 data structure to pass to the diff-tree API correctly. 153 154 * Further preparatory clean-up for "worktree" feature continues. 155 (merge 0409e0b nd/worktree-cleanup-post-head-protection later to maint). 156 157 * Formats of the various data (and how to validate them) where we use 158 GPG signature have been documented. 159 160 * A new run-command API function pipe_command() is introduced to 161 sanely feed data to the standard input while capturing data from 162 the standard output and the standard error of an external process, 163 which is cumbersome to hand-roll correctly without deadlocking. 164 165 The codepath to sign data in a prepared buffer with GPG has been 166 updated to use this API to read from the status-fd to check for 167 errors (instead of relying on GPG's exit status). 168 (merge efee955 jk/gpg-interface-cleanup later to maint). 169 170 * Allow t/perf framework to use the features from the most recent 171 version of Git even when testing an older installed version. 172 173 * The commands in the "log/diff" family have had an FILE* pointer in the 174 data structure they pass around for a long time, but some codepaths 175 used to always write to the standard output. As a preparatory step 176 to make "git format-patch" available to the internal callers, these 177 codepaths have been updated to consistently write into that FILE* 178 instead. 179 180 * Conversion from unsigned char sha1[20] to struct object_id 181 continues. 182 183 * Improve the look of the way "git fetch" reports what happened to 184 each ref that was fetched. 185 186 * The .c/.h sources are marked as such in our .gitattributes file so 187 that "git diff -W" and friends would work better. 188 (merge e82675a rs/help-c-source-with-gitattributes later to maint). 189 190 * Code clean-up to avoid using a variable string that compilers may 191 feel untrustable as printf-style format given to write_file() 192 helper function. 193 194 * "git p4" used a location outside $GIT_DIR/refs/ to place its 195 temporary branches, which has been moved to refs/git-p4-tmp/. 196 197 * Existing autoconf generated test for the need to link with pthread 198 library did not check all the functions from pthread libraries; 199 recent FreeBSD has some functions in libc but not others, and we 200 mistakenly thought linking with libc is enough when it is not. 201 (merge a9b02de ew/autoconf-pthread later to maint). 202 203 * When "git fsck" reports a broken link (e.g. a tree object contains 204 a blob that does not exist), both containing object and the object 205 that is referred to were reported with their 40-hex object names. 206 The command learned the "--name-objects" option to show the path to 207 the containing object from existing refs (e.g. "HEAD~24^2:file.txt"). 208 209 * Allow http daemon tests in Travis CI tests. 210 (merge d9d1426 ls/travis-enable-httpd-tests later to maint). 211 212 * Makefile assumed that -lrt is always available on platforms that 213 want to use clock_gettime() and CLOCK_MONOTONIC, which is not a 214 case for recent Mac OS X. The necessary symbols are often found in 215 libc on many modern systems and having -lrt on the command line, as 216 long as the library exists, had no effect, but when the platform 217 removes librt.a that is a different matter--having -lrt will break 218 the linkage. 219 220 This change could be seen as a regression for those who do need to 221 specify -lrt, as they now specifically ask for NEEDS_LIBRT when 222 building. Hopefully they are in the minority these days. 223 224 * Further preparatory work on the refs API before the pluggable 225 backend series can land. 226 227 * Error handling in the codepaths that updates refs has been 228 improved. 229 230 * The API to iterate over all the refs (i.e. for_each_ref(), etc.) 231 has been revamped. 232 233 * A few tests that specifically target "git rebase -i" have been 234 added. 235 236 * Dumb http transport on the client side has been optimized. 237 (merge ecba195 ew/http-walker later to maint). 238 239 * Users of the parse_options_concat() API function need to allocate 240 extra slots in advance and fill them with OPT_END() when they want 241 to decide the set of supported options dynamically, which makes the 242 code error-prone and hard to read. This has been corrected by tweaking 243 the API to allocate and return a new copy of "struct option" array. 244 (merge 023ff39 jk/parse-options-concat later to maint). 245 246 * "git fetch" exchanges batched have/ack messages between the sender 247 and the receiver, initially doubling every time and then falling 248 back to enlarge the window size linearly. The "smart http" 249 transport, being an half-duplex protocol, outgrows the preset limit 250 too quickly and becomes inefficient when interacting with a large 251 repository. The internal mechanism learned to grow the window size 252 more aggressively when working with the "smart http" transport. 253 254 * Tests for "git svn" have been taught to reuse the lib-httpd test 255 infrastructure when testing the subversion integration that 256 interacts with subversion repositories served over the http:// 257 protocol. 258 (merge a8a5d25 ew/git-svn-http-tests later to maint). 259 260 * "git pack-objects" has a few options that tell it not to pack 261 objects found in certain packfiles, which require it to scan .idx 262 files of all available packs. The codepaths involved in these 263 operations have been optimized for a common case of not having any 264 non-local pack and/or any .kept pack. 265 266 * The t3700 test about "add --chmod=-x" have been made a bit more 267 robust and generally cleaned up. 268 (merge 766cdc4 ib/t3700-add-chmod-x-updates later to maint). 269 270 * The build procedure learned PAGER_ENV knob that lists what default 271 environment variable settings to export for popular pagers. This 272 mechanism is used to tweak the default settings to MORE on FreeBSD. 273 (merge 995bc22 ew/build-time-pager-tweaks later to maint). 274 275 276Also contains various documentation updates and code clean-ups. 277 278 279Fixes since v2.9 280---------------- 281 282Unless otherwise noted, all the fixes since v2.8 in the maintenance 283track are contained in this release (see the maintenance releases' 284notes for details). 285 286 * The commands in `git log` family take %C(auto) in a custom format 287 string. This unconditionally turned the color on, ignoring 288 --no-color or with --color=auto when the output is not connected to 289 a tty; this was corrected to make the format truly behave as 290 "auto". 291 292 * "git rev-list --count" whose walk-length is limited with "-n" 293 option did not work well with the counting optimized to look at the 294 bitmap index. 295 296 * "git show -W" (extend hunks to cover the entire function, delimited 297 by lines that match the "funcname" pattern) used to show the entire 298 file when a change added an entire function at the end of the file, 299 which has been fixed. 300 301 * The documentation set has been updated so that literal commands, 302 configuration variables and environment variables are consistently 303 typeset in fixed-width font and bold in manpages. 304 305 * "git svn propset" subcommand that was added in 2.3 days is 306 documented now. 307 308 * The documentation tries to consistently spell "GPG"; when 309 referring to the specific program name, "gpg" is used. 310 311 * "git reflog" stopped upon seeing an entry that denotes a branch 312 creation event (aka "unborn"), which made it appear as if the 313 reflog was truncated. 314 315 * The git-prompt scriptlet (in contrib/) was not friendly with those 316 who uses "set -u", which has been fixed. 317 318 * compat/regex code did not cleanly compile. 319 320 * A codepath that used alloca(3) to place an unbounded amount of data 321 on the stack has been updated to avoid doing so. 322 323 * "git update-index --add --chmod=+x file" may be usable as an escape 324 hatch, but not a friendly thing to force for people who do need to 325 use it regularly. "git add --chmod=+x file" can be used instead. 326 327 * Build improvements for gnome-keyring (in contrib/) 328 329 * "git status" used to say "working directory" when it meant "working 330 tree". 331 332 * Comments about misbehaving FreeBSD shells have been clarified with 333 the version number (9.x and before are broken, newer ones are OK). 334 335 * "git cherry-pick A" worked on an unborn branch, but "git 336 cherry-pick A..B" didn't. 337 338 * Fix an unintended regression in v2.9 that breaks "clone --depth" 339 that recurses down to submodules by forcing the submodules to also 340 be cloned shallowly, which many server instances that host upstream 341 of the submodules are not prepared for. 342 343 * Fix unnecessarily waste in the idiomatic use of ': ${VAR=default}' 344 to set the default value, without enclosing it in double quotes. 345 346 * Some platform-specific code had non-ANSI strict declarations of C 347 functions that do not take any parameters, which has been 348 corrected. 349 350 * The internal code used to show local timezone offset is not 351 prepared to handle timestamps beyond year 2100, and gave a 352 bogus offset value to the caller. Use a more benign looking 353 +0000 instead and let "git log" going in such a case, instead 354 of aborting. 355 356 * One among four invocations of readlink(1) in our test suite has 357 been rewritten so that the test can run on systems without the 358 command (others are in valgrind test framework and t9802). 359 360 * t/perf needs /usr/bin/time with GNU extension; the invocation of it 361 is updated to "gtime" on Darwin. 362 363 * A bug, which caused "git p4" while running under verbose mode to 364 report paths that are omitted due to branch prefix incorrectly, has 365 been fixed; the command said "Ignoring file outside of prefix" for 366 paths that are _inside_. 367 368 * The top level documentation "git help git" still pointed at the 369 documentation set hosted at now-defunct google-code repository. 370 Update it to point to https://git.github.io/htmldocs/git.html 371 instead. 372 373 * A helper function that takes the contents of a commit object and 374 finds its subject line did not ignore leading blank lines, as is 375 commonly done by other codepaths. Make it ignore leading blank 376 lines to match. 377 378 * For a long time, we carried an in-code comment that said our 379 colored output would work only when we use fprintf/fputs on 380 Windows, which no longer is the case for the past few years. 381 382 * "gc.autoPackLimit" when set to 1 should not trigger a repacking 383 when there is only one pack, but the code counted poorly and did 384 so. 385 386 * Add a test to specify the desired behaviour that currently is not 387 available in "git rebase -Xsubtree=...". 388 389 * More mark-up updates to typeset strings that are expected to 390 literally typed by the end user in fixed-width font. 391 392 * "git commit --amend --allow-empty-message -S" for a commit without 393 any message body could have misidentified where the header of the 394 commit object ends. 395 396 * "git rebase -i --autostash" did not restore the auto-stashed change 397 when the operation was aborted. 398 399 * Git does not know what the contents in the index should be for a 400 path added with "git add -N" yet, so "git grep --cached" should not 401 show hits (or show lack of hits, with -L) in such a path, but that 402 logic does not apply to "git grep", i.e. searching in the working 403 tree files. But we did so by mistake, which has been corrected. 404 405 * "git blame -M" missed a single line that was moved within the file. 406 407 * Fix recently introduced codepaths that are involved in parallel 408 submodule operations, which gave up on reading too early, and 409 could have wasted CPU while attempting to write under a corner 410 case condition. 411 412 * "git grep -i" has been taught to fold case in non-ascii locales 413 correctly. 414 415 * A test that unconditionally used "mktemp" learned that the command 416 is not necessarily available everywhere. 417 418 * There are certain house-keeping tasks that need to be performed at 419 the very beginning of any Git program, and programs that are not 420 built-in commands had to do them exactly the same way as "git" 421 potty does. It was easy to make mistakes in one-off standalone 422 programs (like test helpers). A common "main()" function that 423 calls cmd_main() of individual program has been introduced to 424 make it harder to make mistakes. 425 (merge de61ceb jk/common-main later to maint). 426 427 * The test framework learned a new helper test_match_signal to 428 check an exit code from getting killed by an expected signal. 429 430 * General code clean-up around a helper function to write a 431 single-liner to a file. 432 (merge 7eb6e10 jk/write-file later to maint). 433 434 * One part of "git am" had an oddball helper function that called 435 stuff from outside "his" as opposed to calling what we have "ours", 436 which was not gender-neutral and also inconsistent with the rest of 437 the system where outside stuff is usuall called "theirs" in 438 contrast to "ours". 439 440 * "git blame file" allowed the lineage of lines in the uncommitted, 441 unadded contents of "file" to be inspected, but it refused when 442 "file" did not appear in the current commit. When "file" was 443 created by renaming an existing file (but the change has not been 444 committed), this restriction was unnecessarily tight. 445 446 * "git add -N dir/file && git write-tree" produced an incorrect tree 447 when there are other paths in the same directory that sorts after 448 "file". 449 450 * "git fetch http://user:pass@host/repo..." scrubbed the userinfo 451 part, but "git push" didn't. 452 453 * "git merge" with renormalization did not work well with 454 merge-recursive, due to "safer crlf" conversion kicking in when it 455 shouldn't. 456 (merge 1335d76 jc/renormalize-merge-kill-safer-crlf later to maint). 457 458 * The use of strbuf in "git rm" to build filename to remove was a bit 459 suboptimal, which has been fixed. 460 (merge deb8e15 rs/rm-strbuf-optim later to maint). 461 462 * An age old bug that caused "git diff --ignore-space-at-eol" 463 misbehave has been fixed. 464 465 * "git notes merge" had a code to see if a path exists (and fails if 466 it does) and then open the path for writing (when it doesn't). 467 Replace it with open with O_EXCL. 468 469 * "git pack-objects" and "git index-pack" mostly operate with off_t 470 when talking about the offset of objects in a packfile, but there 471 were a handful of places that used "unsigned long" to hold that 472 value, leading to an unintended truncation. 473 474 * Recent update to "git daemon" tries to enable the socket-level 475 KEEPALIVE, but when it is spawned via inetd, the standard input 476 file descriptor may not necessarily be connected to a socket. 477 Suppress an ENOTSOCK error from setsockopt(). 478 479 * Recent FreeBSD stopped making perl available at /usr/bin/perl; 480 switch the default the built-in path to /usr/local/bin/perl on not 481 too ancient FreeBSD releases. 482 483 * "git commit --help" said "--no-verify" is only about skipping the 484 pre-commit hook, and failed to say that it also skipped the 485 commit-msg hook. 486 (merge def480f os/no-verify-skips-commit-msg-too later to maint). 487 488 * "git merge" in Git v2.9 was taught to forbid merging an unrelated 489 lines of history by default, but that is exactly the kind of thing 490 the "--rejoin" mode of "git subtree" (in contrib/) wants to do. 491 "git subtree" has been taught to use the "--allow-unrelated-histories" 492 option to override the default. 493 (merge 0f12c7d da/subtree-2.9-regression later to maint). 494 495 * The build procedure for "git persistent-https" helper (in contrib/) 496 has been updated so that it can be built with more recent versions 497 of Go. 498 (merge accb613 pm/build-persistent-https-with-recent-go later to maint). 499 500 * There is an optimization used in "git diff $treeA $treeB" to borrow 501 an already checked-out copy in the working tree when it is known to 502 be the same as the blob being compared, expecting that open/mmap of 503 such a file is faster than reading it from the object store, which 504 involves inflating and applying delta. This however kicked in even 505 when the checked-out copy needs to go through the convert-to-git 506 conversion (including the clean filter), which defeats the whole 507 point of the optimization. The optimization has been disabled when 508 the conversion is necessary. 509 (merge 06dec43 jk/diff-do-not-reuse-wtf-needs-cleaning later to maint). 510 511 * "git -c grep.patternType=extended log --basic-regexp" misbehaved 512 because the internal API to access the grep machinery was not 513 designed well. 514 (merge 8465541 jc/grep-commandline-vs-configuration later to maint). 515 516 * Windows port was failing some tests in t4130, due to the lack of 517 inum in the returned values by its lstat(2) emulation. 518 (merge 54956df js/t4130-rename-without-ino later to maint). 519 520 * The reflog output format is documented better, and a new format 521 --date=unix to report the seconds-since-epoch (without timezone) 522 has been added. 523 (merge 442f6fd jk/reflog-date later to maint). 524 525 * "git difftool <paths>..." started in a subdirectory failed to 526 interpret the paths relative to that directory, which has been 527 fixed. 528 (merge 32b8c58 jk/difftool-in-subdir later to maint). 529 530 * The characters in the label shown for tags/refs for commits in 531 "gitweb" output are now properly escaped for proper HTML output. 532 (merge 77947bb ab/gitweb-link-html-escape later to maint). 533 534 * FreeBSD can lie when asked mtime of a directory, which made the 535 untracked cache code to fall back to a slow-path, which in turn 536 caused tests in t7063 to fail because it wanted to verify the 537 behaviour of the fast-path. 538 (merge 6b7728d nd/fbsd-lazy-mtime later to maint). 539 540 * Squelch compiler warnings for netmalloc (in compat/) library. 541 (merge c6c9e18 js/nedmalloc-gcc6-warnings later to maint). 542 543 * A small memory leak in the command line parsing of "git blame" 544 has been plugged. 545 546 * The API documentation for hashmap was unclear if hashmap_entry 547 can be safely discarded without any other consideration. State 548 that it is safe to do so. 549 (merge 54ba5a1 jc/hashmap-doc-init later to maint). 550 551 * Other minor clean-ups and documentation updates 552 (merge 9d1ca1d jk/t4205-cleanup later to maint). 553 (merge 5f072e0 cp/completion-clone-recurse-submodules later to maint). 554 (merge bc57b9c rs/use-strbuf-addstr later to maint). 555 (merge 52db4b0 jh/clean-smudge-f-doc later to maint).