1Git 2.11 Release Notes 2====================== 3 4Backward compatibility notes. 5 6 * An empty string used as a pathspec element has always meant 7 'everything matches', but it is too easy to write a script that 8 finds a path to remove in $path and run 'git rm "$paht"', which 9 ends up removing everything. This release starts warning about the 10 use of an empty string that is used for 'everything matches' and 11 asks users to use a more explicit '.' for that instead. 12 13 The hope is that existing users will not mind this change, and 14 eventually the warning can be turned into a hard error, upgrading 15 the deprecation into removal of this (mis)feature. 16 17 * The historical argument order "git merge <msg> HEAD <commit>..." 18 has been deprecated for quite some time, and will be removed in the 19 next release (not this one). 20 21 * The default abbreviation length, which has historically been 7, now 22 scales as the repository grows, using the approximate number of 23 objects in the reopsitory and a bit of math around the birthday 24 paradox. The logic suggests to use 12 hexdigits for the Linux 25 kernel, and 9 to 10 for Git itself. 26 27 28Updates since v2.10 29------------------- 30 31UI, Workflows & Features 32 33 * Comes with new version of git-gui, now at its 0.21.0 tag. 34 35 * "git format-patch --cover-letter HEAD^" to format a single patch 36 with a separate cover letter now numbers the output as [PATCH 0/1] 37 and [PATCH 1/1] by default. 38 39 * An incoming "git push" that attempts to push too many bytes can now 40 be rejected by setting a new configuration variable at the receiving 41 end. 42 43 * "git nosuchcommand --help" said "No manual entry for gitnosuchcommand", 44 which was not intuitive, given that "git nosuchcommand" said "git: 45 'nosuchcommand' is not a git command". 46 47 * "git clone --resurse-submodules --reference $path $URL" is a way to 48 reduce network transfer cost by borrowing objects in an existing 49 $path repository when cloning the superproject from $URL; it 50 learned to also peek into $path for presense of corresponding 51 repositories of submodules and borrow objects from there when able. 52 53 * The "git diff --submodule={short,log}" mechanism has been enhanced 54 to allow "--submodule=diff" to show the patch between the submodule 55 commits bound to the superproject. 56 57 * Even though "git hash-objects", which is a tool to take an 58 on-filesystem data stream and put it into the Git object store, 59 allowed to perform the "outside-world-to-Git" conversions (e.g. 60 end-of-line conversions and application of the clean-filter), and 61 it had the feature on by default from very early days, its reverse 62 operation "git cat-file", which takes an object from the Git object 63 store and externalize for the consumption by the outside world, 64 lacked an equivalent mechanism to run the "Git-to-outside-world" 65 conversion. The command learned the "--filters" option to do so. 66 67 * Output from "git diff" can be made easier to read by selecting 68 which lines are common and which lines are added/deleted 69 intelligently when the lines before and after the changed section 70 are the same. A command line option is added to help with the 71 experiment to find a good heuristics. 72 73 * In some projects, it is common to use "[RFC PATCH]" as the subject 74 prefix for a patch meant for discussion rather than application. A 75 new option "--rfc" was a short-hand for "--subject-prefix=RFC PATCH" 76 to help the participants of such projects. 77 78 * "git add --chmod=+x <pathspec>" added recently only toggled the 79 executable bit for paths that are either new or modified. This has 80 been corrected to flip the executable bit for all paths that match 81 the given pathspec. 82 83 * When "git format-patch --stdout" output is placed as an in-body 84 header and it uses the RFC2822 header folding, "git am" failed to 85 put the header line back into a single logical line. The 86 underlying "git mailinfo" was taught to handle this properly. 87 88 * "gitweb" can spawn "highlight" to show blob contents with 89 (programming) language-specific syntax highlighting, but only 90 when the language is known. "highlight" can however be told 91 to make the guess itself by giving it "--force" option, which 92 has been enabled. 93 94 * "git gui" l10n to Portuguese. 95 96 * When given an abbreviated object name that is not (or more 97 realistically, "no longer") unique, we gave a fatal error 98 "ambiguous argument". This error is now accompanied by hints that 99 lists the objects that begins with the given prefix. During the 100 course of development of this new feature, numerous minor bugs were 101 uncovered and corrected, the most notable one of which is that we 102 gave "short SHA1 xxxx is ambiguous." twice without good reason. 103 104 * "git log rev^..rev" is an often-used revision range specification 105 to show what was done on a side branch merged at rev. This has 106 gained a short-hand "rev^-1". In general "rev^-$n" is the same as 107 "^rev^$n rev", i.e. what has happened on other branches while the 108 history leading to nth parent was looking the other way. 109 110 * In recent versions of cURL, GSSAPI credential delegation is 111 disabled by default due to CVE-2011-2192; introduce a configuration 112 to selectively allow enabling this. 113 (merge 26a7b23429 ps/http-gssapi-cred-delegation later to maint). 114 115 * "git mergetool" learned to honor "-O<orderfile>" to control the 116 order of paths to present to the end user. 117 118 * "git diff/log --ws-error-highlight=<kind>" lacked the corresponding 119 configuration variable to set it by default. 120 121 * "git ls-files" learned "--recurse-submodules" option that can be 122 used to get a listing of tracked files across submodules (i.e. this 123 only works with "--cached" option, not for listing untracked or 124 ignored files). This would be a useful tool to sit on the upstream 125 side of a pipe that is read with xargs to work on all working tree 126 files from the top-level superproject. 127 128 * A new credential helper that talks via "libsecret" with 129 implementations of XDG Secret Service API has been added to 130 contrib/credential/. 131 132 * The GPG verification status shown in "%G?" pretty format specifier 133 was not rich enough to differentiate a signature made by an expired 134 key, a signature made by a revoked key, etc. New output letters 135 have been assigned to express them. 136 137 * In addition to purely abbreviated commit object names, "gitweb" 138 learned to turn "git describe" output (e.g. v2.9.3-599-g2376d31787) 139 into clickable links in its output. 140 141 * When new paths were added by "git add -N" to the index, it was 142 enough to circumvent the check by "git commit" to refrain from 143 making an empty commit without "--allow-empty". The same logic 144 prevented "git status" to show such a path as "new file" in the 145 "Changes not staged for commit" section. 146 147 148Performance, Internal Implementation, Development Support etc. 149 150 * The delta-base-cache mechanism has been a key to the performance in 151 a repository with a tightly packed packfile, but it did not scale 152 well even with a larger value of core.deltaBaseCacheLimit. 153 154 * Enhance "git status --porcelain" output by collecting more data on 155 the state of the index and the working tree files, which may 156 further be used to teach git-prompt (in contrib/) to make fewer 157 calls to git. 158 159 * Extract a small helper out of the function that reads the authors 160 script file "git am" internally uses. 161 (merge a77598e jc/am-read-author-file later to maint). 162 163 * Lifts calls to exit(2) and die() higher in the callchain in 164 sequencer.c files so that more helper functions in it can be used 165 by callers that want to handle error conditions themselves. 166 167 * "git am" has been taught to make an internal call to "git apply"'s 168 innards without spawning the latter as a separate process. 169 170 * The ref-store abstraction was introduced to the refs API so that we 171 can plug in different backends to store references. 172 173 * The "unsigned char sha1[20]" to "struct object_id" conversion 174 continues. Notable changes in this round includes that ce->sha1, 175 i.e. the object name recorded in the cache_entry, turns into an 176 object_id. 177 178 * JGit can show a fake ref "capabilities^{}" to "git fetch" when it 179 does not advertise any refs, but "git fetch" was not prepared to 180 see such an advertisement. When the other side disconnects without 181 giving any ref advertisement, we used to say "there may not be a 182 repository at that URL", but we may have seen other advertisement 183 like "shallow" and ".have" in which case we definitely know that a 184 repository is there. The code to detect this case has also been 185 updated. 186 187 * Some codepaths in "git pack-objects" were not ready to use an 188 existing pack bitmap; now they are and as the result they have 189 become faster. 190 191 * The codepath in "git fsck" to detect malformed tree objects has 192 been updated not to die but keep going after detecting them. 193 194 * We call "qsort(array, nelem, sizeof(array[0]), fn)", and most of 195 the time third parameter is redundant. A new QSORT() macro lets us 196 omit it. 197 198 * "git pack-objects" in a repository with many packfiles used to 199 spend a lot of time looking for/at objects in them; the accesses to 200 the packfiles are now optimized by checking the most-recently-used 201 packfile first. 202 (merge c9af708b1a jk/pack-objects-optim-mru later to maint). 203 204 * Codepaths involved in interacting alternate object store have 205 been cleaned up. 206 207 * In order for the receiving end of "git push" to inspect the 208 received history and decide to reject the push, the objects sent 209 from the sending end need to be made available to the hook and 210 the mechanism for the connectivity check, and this was done 211 traditionally by storing the objects in the receiving repository 212 and letting "git gc" to expire it. Instead, store the newly 213 received objects in a temporary area, and make them available by 214 reusing the alternate object store mechanism to them only while we 215 decide if we accept the check, and once we decide, either migrate 216 them to the repository or purge them immediately. 217 218 * The require_clean_work_tree() helper was recreated in C when "git 219 pull" was rewritten from shell; the helper is now made available to 220 other callers in preparation for upcoming "rebase -i" work. 221 222 * "git upload-pack" had its code cleaned-up and performance improved 223 by reducing use of timestamp-ordered commit-list, which was 224 replaced with a priority queue. 225 226 * "git diff --no-index" codepath has been updated not to try to peek 227 into .git/ directory that happens to be under the current 228 directory, when we know we are operating outside any repository. 229 230 * Update of the sequencer codebase to make it reusable to reimplement 231 "rebase -i" continues. 232 233 234Also contains various documentation updates and code clean-ups. 235 236 237Fixes since v2.10 238----------------- 239 240Unless otherwise noted, all the fixes since v2.9 in the maintenance 241track are contained in this release (see the maintenance releases' 242notes for details). 243 244 * Clarify various ways to specify the "revision ranges" in the 245 documentation. 246 247 * "diff-highlight" script (in contrib/) learned to work better with 248 "git log -p --graph" output. 249 250 * The test framework left the number of tests and success/failure 251 count in the t/test-results directory, keyed by the name of the 252 test script plus the process ID. The latter however turned out not 253 to serve any useful purpose. The process ID part of the filename 254 has been removed. 255 256 * Having a submodule whose ".git" repository is somehow corrupt 257 caused a few commands that recurse into submodules loop forever. 258 259 * "git symbolic-ref -d HEAD" happily removes the symbolic ref, but 260 the resulting repository becomes an invalid one. Teach the command 261 to forbid removal of HEAD. 262 263 * A test spawned a short-lived background process, which sometimes 264 prevented the test directory from getting removed at the end of the 265 script on some platforms. 266 267 * Update a few tests that used to use GIT_CURL_VERBOSE to use the 268 newer GIT_TRACE_CURL. 269 270 * "git pack-objects --include-tag" was taught that when we know that 271 we are sending an object C, we want a tag B that directly points at 272 C but also a tag A that points at the tag B. We used to miss the 273 intermediate tag B in some cases. 274 275 * Update Japanese translation for "git-gui". 276 277 * "git fetch http::/site/path" did not die correctly and segfaulted 278 instead. 279 280 * "git commit-tree" stopped reading commit.gpgsign configuration 281 variable that was meant for Porcelain "git commit" in Git 2.9; we 282 forgot to update "git gui" to look at the configuration to match 283 this change. 284 285 * "git add --chmod=+x" added recently lacked documentation, which has 286 been corrected. 287 288 * "git log --cherry-pick" used to include merge commits as candidates 289 to be matched up with other commits, resulting a lot of wasted time. 290 The patch-id generation logic has been updated to ignore merges to 291 avoid the wastage. 292 293 * The http transport (with curl-multi option, which is the default 294 these days) failed to remove curl-easy handle from a curlm session, 295 which led to unnecessary API failures. 296 297 * There were numerous corner cases in which the configuration files 298 are read and used or not read at all depending on the directory a 299 Git command was run, leading to inconsistent behaviour. The code 300 to set-up repository access at the beginning of a Git process has 301 been updated to fix them. 302 (merge 4d0efa1 jk/setup-sequence-update later to maint). 303 304 * "git diff -W" output needs to extend the context backward to 305 include the header line of the current function and also forward to 306 include the body of the entire current function up to the header 307 line of the next one. This process may have to merge to adjacent 308 hunks, but the code forgot to do so in some cases. 309 310 * Performance tests done via "t/perf" did not use the same set of 311 build configuration if the user relied on autoconf generated 312 configuration. 313 314 * "git format-patch --base=..." feature that was recently added 315 showed the base commit information after "-- " e-mail signature 316 line, which turned out to be inconvenient. The base information 317 has been moved above the signature line. 318 319 * More i18n. 320 321 * Even when "git pull --rebase=preserve" (and the underlying "git 322 rebase --preserve") can complete without creating any new commit 323 (i.e. fast-forwards), it still insisted on having a usable ident 324 information (read: user.email is set correctly), which was less 325 than nice. As the underlying commands used inside "git rebase" 326 would fail with a more meaningful error message and advice text 327 when the bogus ident matters, this extra check was removed. 328 329 * "git gc --aggressive" used to limit the delta-chain length to 250, 330 which is way too deep for gaining additional space savings and is 331 detrimental for runtime performance. The limit has been reduced to 332 50. 333 334 * Documentation for individual configuration variables to control use 335 of color (like `color.grep`) said that their default value is 336 'false', instead of saying their default is taken from `color.ui`. 337 When we updated the default value for color.ui from 'false' to 338 'auto' quite a while ago, all of them broke. This has been 339 corrected. 340 341 * The pretty-format specifier "%C(auto)" used by the "log" family of 342 commands to enable coloring of the output is taught to also issue a 343 color-reset sequence to the output. 344 (merge 82b83da8d3 rs/c-auto-resets-attributes later to maint). 345 346 * A shell script example in check-ref-format documentation has been 347 fixed. 348 349 * "git checkout <word>" does not follow the usual disambiguation 350 rules when the <word> can be both a rev and a path, to allow 351 checking out a branch 'foo' in a project that happens to have a 352 file 'foo' in the working tree without having to disambiguate. 353 This was poorly documented and the check was incorrect when the 354 command was run from a subdirectory. 355 356 * Some codepaths in "git diff" used regexec(3) on a buffer that was 357 mmap(2)ed, which may not have a terminating NUL, leading to a read 358 beyond the end of the mapped region. This was fixed by introducing 359 a regexec_buf() helper that takes a <ptr,len> pair with REG_STARTEND 360 extension. 361 (merge 842a516cb0 js/regexec-buf later to maint). 362 363 * The procedure to build Git on Mac OS X for Travis CI hardcoded the 364 internal directory structure we assumed HomeBrew uses, which was a 365 no-no. The procedure has been updated to ask HomeBrew things we 366 need to know to fix this. 367 368 * When "git rebase -i" is given a broken instruction, it told the 369 user to fix it with "--edit-todo", but didn't say what the step 370 after that was (i.e. "--continue"). 371 372 * Documentation around tools to import from CVS was fairly outdated. 373 374 * "git clone --recurse-submodules" lost the progress eye-candy in 375 recent update, which has been corrected. 376 377 * A low-level function verify_packfile() was meant to show errors 378 that were detected without dying itself, but under some conditions 379 it didn't and died instead, which has been fixed. 380 381 * When "git fetch" tries to find where the history of the repository 382 it runs in has diverged from what the other side has, it has a 383 mechanism to avoid digging too deep into irrelevant side branches. 384 This however did not work well over the "smart-http" transport due 385 to a design bug, which has been fixed. 386 (merge 06b3d386e0 jt/fetch-pack-in-vain-count-with-stateless later to maint). 387 388 * In the codepath that comes up with the hostname to be used in an 389 e-mail when the user didn't tell us, we looked at ai_canonname 390 field in struct addrinfo without making sure it is not NULL first. 391 392 * "git worktree", even though it used the default_abbrev setting that 393 ought to be affected by core.abbrev configuration variable, ignored 394 the variable setting. The command has been taught to read the 395 default set of configuration variables to correct this. 396 397 * "git init" tried to record core.worktree in the repository's 398 'config' file when GIT_WORK_TREE environment variable was set and 399 it was different from where GIT_DIR appears as ".git" at its top, 400 but the logic was faulty when .git is a "gitdir:" file that points 401 at the real place, causing trouble in working trees that are 402 managed by "git worktree". This has been corrected. 403 404 * Codepaths that read from an on-disk loose object were too loose in 405 validating what they are reading is a proper object file and 406 sometimes read past the data they read from the disk, which has 407 been corrected. H/t to Gustavo Grieco for reporting. 408 409 * The original command line syntax for "git merge", which was "git 410 merge <msg> HEAD <parent>...", has been deprecated for quite some 411 time, and "git gui" was the last in-tree user of the syntax. This 412 is finally fixed, so that we can move forward with the deprecation. 413 414 * An author name, that spelled a backslash-quoted double quote in the 415 human readable part "My \"double quoted\" name", was not unquoted 416 correctly while applying a patch from a piece of e-mail. 417 418 * Doc update to clarify what "log -3 --reverse" does. 419 420 * Almost everybody uses DEFAULT_ABBREV to refer to the default 421 setting for the abbreviation, but "git blame" peeked into 422 underlying variable bypassing the macro for no good reason. 423 424 * The "graph" API used in "git log --graph" miscounted the number of 425 output columns consumed so far when drawing a padding line, which 426 has been fixed; this did not affect any existing code as nobody 427 tried to write anything after the padding on such a line, though. 428 429 * The code that parses the format parameter of for-each-ref command 430 has seen a micro-optimization. 431 432 * When we started cURL to talk to imap server when a new enough 433 version of cURL library is available, we forgot to explicitly add 434 imap(s):// before the destination. To some folks, that didn't work 435 and the library tried to make HTTP(s) requests instead. 436 (merge d2d07ab861 ak/curl-imap-send-explicit-scheme later to maint). 437 438 * The ./configure script generated from configure.ac was taught how 439 to detect support of SSL by libcurl better. 440 (merge 924b7eb1c9 dp/autoconf-curl-ssl later to maint). 441 442 * The command-line completion script (in contrib/) learned to 443 complete "git cmd ^mas<HT>" to complete the negative end of 444 reference to "git cmd ^master". 445 (merge 49416ad22a cp/completion-negative-refs later to maint). 446 447 * The existing "git fetch --depth=<n>" option was hard to use 448 correctly when making the history of an existing shallow clone 449 deeper. A new option, "--deepen=<n>", has been added to make this 450 easier to use. "git clone" also learned "--shallow-since=<date>" 451 and "--shallow-exclude=<tag>" options to make it easier to specify 452 "I am interested only in the recent N months worth of history" and 453 "Give me only the history since that version". 454 (merge cccf74e2da nd/shallow-deepen later to maint). 455 456 * It is a common mistake to say "git blame --reverse OLD path", 457 expecting that the command line is dwimmed as if asking how lines 458 in path in an old revision OLD have survived up to the current 459 commit. 460 (merge e1d09701a4 jc/blame-reverse later to maint). 461 462 * http.emptyauth configuration is a way to allow an empty username to 463 pass when attempting to authenticate using mechanisms like 464 Kerberos. We took an unspecified (NULL) username and sent ":" 465 (i.e. no username, no password) to CURLOPT_USERPWD, but did not do 466 the same when the username is explicitly set to an empty string. 467 (merge 5275c3081c dt/http-empty-auth later to maint). 468 469 * "git clone" of a local repository can be done at the filesystem 470 level, but the codepath did not check errors while copying and 471 adjusting the file that lists alternate object stores. 472 (merge 22d3b8de1b jk/clone-copy-alternates-fix later to maint). 473 474 * Documentation for "git commit" was updated to clarify that "commit 475 -p <paths>" adds to the current contents of the index to come up 476 with what to commit. 477 (merge 7431596ab1 nd/commit-p-doc later to maint). 478 479 * A stray symbolic link in $GIT_DIR/refs/ directory could make name 480 resolution loop forever, which has been corrected. 481 (merge e8c42cb9ce jk/ref-symlink-loop later to maint). 482 483 * The "submodule.<name>.path" stored in .gitmodules is never copied 484 to .git/config and such a key in .git/config has no meaning, but 485 the documentation described it and submodule.<name>.url next to 486 each other as if both belong to .git/config. This has been fixed. 487 (merge 72710165c9 sb/submodule-config-doc-drop-path later to maint). 488 489 * In a worktree connected to a repository elsewhere, created via "git 490 worktree", "git checkout" attempts to protect users from confusion 491 by refusing to check out a branch that is already checked out in 492 another worktree. However, this also prevented checking out a 493 branch, which is designated as the primary branch of a bare 494 reopsitory, in a worktree that is connected to the bare 495 repository. The check has been corrected to allow it. 496 (merge 171c646f8c dk/worktree-dup-checkout-with-bare-is-ok later to maint). 497 498 * "git rebase" immediately after "git clone" failed to find the fork 499 point from the upstream. 500 (merge 4f21454b55 jk/merge-base-fork-point-without-reflog later to maint). 501 502 * When fetching from a remote that has many tags that are irrelevant 503 to branches we are following, we used to waste way too many cycles 504 when checking if the object pointed at by a tag (that we are not 505 going to fetch!) exists in our repository too carefully. 506 (merge 5827a03545 jk/fetch-quick-tag-following later to maint). 507 508 * Protect our code from over-eager compilers. 509 (merge 0ac52a38e8 jk/tighten-alloc later to maint). 510 511 * Recent git allows submodule.<name>.branch to use a special token 512 "." instead of the branch name; the documentation has been updated 513 to describe it. 514 (merge 15ef78008a bw/submodule-branch-dot-doc later to maint). 515 516 * A hot-fix for a test added by a recent topic that went to both 517 'master' and 'maint' already. 518 (merge 76e368c378 tg/add-chmod+x-fix later to maint). 519 520 * "git send-email" attempts to pick up valid e-mails from the 521 trailers, but people in real world write non-addresses there, like 522 "Cc: Stable <add@re.ss> # 4.8+", which broke the output depending 523 on the availability and vintage of Mail::Address perl module. 524 (merge dcfafc5214 mm/send-email-cc-cruft-after-address later to maint). 525 526 * The Travis CI configuration we ship ran the tests with --verbose 527 option but this risks non-TAP output that happens to be "ok" to be 528 misinterpreted as TAP signalling a test that passed. This resulted 529 in unnecessary failure. This has been corrected by introducing a 530 new mode to run our tests in the test harness to send the verbose 531 output separately to the log file. 532 (merge 614fe01521 jk/tap-verbose-fix later to maint). 533 534 * Some AsciiDoc formatter mishandles a displayed illustration with 535 tabs in it. Adjust a few of them in merge-base documentation to 536 work around them. 537 (merge 6750f62699 po/fix-doc-merge-base-illustration later to maint). 538 539 * A minor regression fix for "git submodule" that was introduced 540 when more helper functions were reimplemented in C. 541 (merge 77b63ac31e sb/submodule-ignore-trailing-slash later to maint). 542 543 * The code that we have used for the past 10+ years to cycle 544 4-element ring buffers turns out to be not quite portable in 545 theoretical world. 546 (merge bb84735c80 rs/ring-buffer-wraparound later to maint). 547 548 * "git daemon" used fixed-length buffers to turn URL to the 549 repository the client asked for into the server side directory 550 path, using snprintf() to avoid overflowing these buffers, but 551 allowed possibly truncated paths to the directory. This has been 552 tightened to reject such a request that causes overlong path to be 553 required to serve. 554 (merge 6bdb0083be jk/daemon-path-ok-check-truncation later to maint). 555 556 * Other minor doc, test and build updates and code cleanups. 557 (merge a94bb68397 rs/cocci later to maint). 558 (merge 641c900b2c js/reset-usage later to maint). 559 (merge 30cfe72d37 rs/pretty-format-color-doc-fix later to maint). 560 (merge d709f1fb9d jc/diff-unique-abbrev-comments later to maint). 561 (merge 13092a916d jc/cocci-xstrdup-or-null later to maint). 562 (merge 86009f32bb pb/test-parse-options-expect later to maint). 563 (merge 749a2279a4 yk/git-tag-remove-mention-of-old-layout-in-doc later to maint).