Documentation / RelNotes / 2.14.0.txton commit Merge branch 'ab/sha1dc' (2db8732)
   1Git 2.14 Release Notes
   2======================
   3
   4Backward compatibility notes.
   5
   6 * Use of an empty string as a pathspec element that is used for
   7   'everything matches' is still warned and Git asks users to use a
   8   more explicit '.' for that instead.  The hope is that existing
   9   users will not mind this change, and eventually the warning can be
  10   turned into a hard error, upgrading the deprecation into removal of
  11   this (mis)feature.  That is not scheduled to happen in the upcoming
  12   release (yet).
  13
  14 * Git now avoids blindly falling back to ".git" when the setup
  15   sequence said we are _not_ in Git repository.  A corner case that
  16   happens to work right now may be broken by a call to die("BUG").
  17   We've tried hard to locate such cases and fixed them, but there
  18   might still be cases that need to be addressed--bug reports are
  19   greatly appreciated.
  20
  21 * The experiment to improve the hunk-boundary selection of textual
  22   diff output has finished, and the "indent heuristics" has now
  23   become the default.
  24
  25
  26Updates since v2.13
  27-------------------
  28
  29UI, Workflows & Features
  30
  31 * The colors in which "git status --short --branch" showed the names
  32   of the current branch and its remote-tracking branch are now
  33   configurable.
  34
  35 * "git clone" learned the "--no-tags" option not to fetch all tags
  36   initially, and also set up the tagopt not to follow any tags in
  37   subsequent fetches.
  38
  39 * "git archive --format=zip" learned to use zip64 extension when
  40   necessary to go beyond the 4GB limit.
  41
  42 * "git reset" learned "--recurse-submodules" option.
  43
  44 * "git diff --submodule=diff" now recurses into nested submodules.
  45
  46 * "git repack" learned to accept the --threads=<n> option and pass it
  47   to pack-objects.
  48
  49 * "git send-email" learned to run sendemail-validate hook to inspect
  50   and reject a message before sending it out.
  51
  52 * There is no good reason why "git fetch $there $sha1" should fail
  53   when the $sha1 names an object at the tip of an advertised ref,
  54   even when the other side hasn't enabled allowTipSHA1InWant.
  55
  56 * The recently introduced "[includeIf "gitdir:$dir"] path=..."
  57   mechanism has further been taught to take symlinks into account.
  58   The directory "$dir" specified in "gitdir:$dir" may be a symlink to
  59   a real location, not something that $(getcwd) may return.  In such
  60   a case, a realpath of "$dir" is compared with the real path of the
  61   current repository to determine if the contents from the named path
  62   should be included.
  63
  64 * Make the "indent" heuristics the default in "diff" and diff.indentHeuristics
  65   configuration variable an escape hatch for those who do no want it.
  66
  67 * Many commands learned to pay attention to submodule.recurse
  68   configuration.
  69
  70 * The convention for a command line is to follow "git cmdname
  71   --options" with revisions followed by an optional "--"
  72   disambiguator and then finally pathspecs.  When "--" is not there,
  73   we make sure early ones are all interpretable as revs (and do not
  74   look like paths) and later ones are the other way around.  A
  75   pathspec with "magic" (e.g. ":/p/a/t/h" that matches p/a/t/h from
  76   the top-level of the working tree, no matter what subdirectory you
  77   are working from) are conservatively judged as "not a path", which
  78   required disambiguation more often.  The command line parser
  79   learned to say "it's a pathspec" a bit more often when the syntax
  80   looks like so.
  81
  82 * Update "perl-compatible regular expression" support to enable JIT
  83   and also allow linking with the newer PCRE v2 library.
  84
  85 * "filter-branch" learned a pseudo filter "--setup" that can be used
  86   to define common functions/variables that can be used by other
  87   filters.
  88
  89 * Using "git add d/i/r" when d/i/r is the top of the working tree of
  90   a separate repository would create a gitlink in the index, which
  91   would appear as a not-quite-initialized submodule to others.  We
  92   learned to give warnings when this happens.
  93
  94 * "git status" learned to optionally give how many stash entries the
  95   user has in its output.
  96
  97 * "git status" has long shown essentially the same message as "git
  98   commit"; the message it gives while preparing for the root commit,
  99   i.e. "Initial commit", was hard to understand for some new users.
 100   Now it says "No commits yet" to stress more on the current status
 101   (rather than the commit the user is preparing for, which is more in
 102   line with the focus of "git commit").
 103
 104 * "git send-email" learned to overcome some SMTP server limitation
 105   that does not allow many pieces of e-mails to be sent over a single
 106   session.
 107
 108
 109Performance, Internal Implementation, Development Support etc.
 110
 111 * The default packed-git limit value has been raised on larger
 112   platforms to save "git fetch" from a (recoverable) failure while
 113   "gc" is running in parallel.
 114
 115 * Code to update the cache-tree has been tightened so that we won't
 116   accidentally write out any 0{40} entry in the tree object.
 117
 118 * Attempt to allow us notice "fishy" situation where we fail to
 119   remove the temporary directory used during the test.
 120
 121 * Travis CI gained a task to format the documentation with both
 122   AsciiDoc and AsciiDoctor.
 123
 124 * Some platforms have ulong that is smaller than time_t, and our
 125   historical use of ulong for timestamp would mean they cannot
 126   represent some timestamp that the platform allows.  Invent a
 127   separate and dedicated timestamp_t (so that we can distingiuish
 128   timestamps and a vanilla ulongs, which along is already a good
 129   move), and then declare uintmax_t is the type to be used as the
 130   timestamp_t.
 131
 132 * We can trigger Windows auto-build tester (credits: Dscho &
 133   Microsoft) from our existing Travis CI tester now.
 134
 135 * Conversion from uchar[20] to struct object_id continues.
 136
 137 * Simplify parse_pathspec() codepath and stop it from looking at the
 138   default in-core index.
 139
 140 * Add perf-test for wildmatch.
 141
 142 * Code from "conversion using external process" codepath has been
 143   extracted to a separate sub-process.[ch] module.
 144
 145 * When "git checkout", "git merge", etc. manipulates the in-core
 146   index, various pieces of information in the index extensions are
 147   discarded from the original state, as it is usually not the case
 148   that they are kept up-to-date and in-sync with the operation on the
 149   main index.  The untracked cache extension is copied across these
 150   operations now, which would speed up "git status" (as long as the
 151   cache is properly invalidated).
 152
 153 * The internal implementation of "git grep" has seen some clean-up.
 154
 155 * Update the C style recommendation for notes for translators, as
 156   recent versions of gettext tools can work with our style of
 157   multi-line comments.
 158
 159 * The implementation of "ref" API around the "packed refs" have been
 160   cleaned up, in preparation for further changes.
 161
 162 * The internal logic used in "git blame" has been libified to make it
 163   easier to use by cgit.
 164
 165 * Our code often opens a path to an optional file, to work on its
 166   contents when we can successfully open it.  We can ignore a failure
 167   to open if such an optional file does not exist, but we do want to
 168   report a failure in opening for other reasons (e.g. we got an I/O
 169   error, or the file is there, but we lack the permission to open).
 170
 171   The exact errors we need to ignore are ENOENT (obviously) and
 172   ENOTDIR (less obvious).  Instead of repeating comparison of errno
 173   with these two constants, introduce a helper function to do so.
 174
 175 * We often try to open a file for reading whose existence is
 176   optional, and silently ignore errors from open/fopen; report such
 177   errors if they are not due to missing files.
 178
 179 * When an existing repository is used for t/perf testing, we first
 180   create bit-for-bit copy of it, which may grab a transient state of
 181   the repository and freeze it into the repository used for testing,
 182   which then may cause Git operations to fail.  Single out "the index
 183   being locked" case and forcibly drop the lock from the copy.
 184
 185 * Three instances of the same helper function have been consolidated
 186   to one.
 187
 188 * "fast-import" uses a default pack chain depth that is consistent
 189   with other parts of the system.
 190
 191 * A new test to show the interaction between the pattern [^a-z]
 192   (which matches '/') and a slash in a path has been added.  The
 193   pattern should not match the slash with "pathmatch", but should
 194   with "wildmatch".
 195
 196 * The 'diff-highlight' program (in contrib/) has been restructured
 197   for easier reuse by an external project 'diff-so-fancy'.
 198   (merge 0c977dbc81 jk/diff-highlight-module later to maint).
 199
 200 * A common pattern to free a piece of memory and assign NULL to the
 201   pointer that used to point at it has been replaced with a new
 202   FREE_AND_NULL() macro.
 203
 204 * Traditionally, the default die() routine had a code to prevent it
 205   from getting called multiple times, which interacted badly when a
 206   threaded program used it (one downside is that the real error may
 207   be hidden and instead the only error message given to the user may
 208   end up being "die recursion detected", which is not very useful).
 209
 210 * Introduce a "repository" object to eventually make it easier to
 211   work in multiple repositories (the primary focus is to work with
 212   the superproject and its submodules) in a single process.
 213
 214 * Optimize "what are the object names already taken in an alternate
 215   object database?" query that is used to derive the length of prefix
 216   an object name is uniquely abbreviated to.
 217
 218
 219Also contains various documentation updates and code clean-ups.
 220
 221
 222Fixes since v2.13
 223-----------------
 224
 225Unless otherwise noted, all the fixes since v2.13 in the maintenance
 226track are contained in this release (see the maintenance releases'
 227notes for details).
 228
 229 * "git gc" did not interact well with "git worktree"-managed
 230   per-worktree refs.
 231
 232 * "git cherry-pick" and other uses of the sequencer machinery
 233   mishandled a trailer block whose last line is an incomplete line.
 234   This has been fixed so that an additional sign-off etc. are added
 235   after completing the existing incomplete line.
 236
 237 * The codepath in "git am" that is used when running "git rebase"
 238   leaked memory held for the log message of the commits being rebased.
 239
 240 * "git clone --config var=val" is a way to populate the
 241   per-repository configuration file of the new repository, but it did
 242   not work well when val is an empty string.  This has been fixed.
 243
 244 * Setting "log.decorate=false" in the configuration file did not take
 245   effect in v2.13, which has been corrected.
 246
 247 * A few codepaths in "checkout" and "am" working on an unborn branch
 248   tried to access an uninitialized piece of memory.
 249
 250 * The Web interface to gmane news archive is long gone, even though
 251   the articles are still accessible via NTTP.  Replace the links with
 252   ones to public-inbox.org.  Because their message identification is
 253   based on the actual message-id, it is likely that it will be easier
 254   to migrate away from it if/when necessary.
 255
 256 * The receive-pack program now makes sure that the push certificate
 257   records the same set of push options used for pushing.
 258
 259 * Tests have been updated to pass under GETTEXT_POISON (a mechanism
 260   to ensure that output strings that should not be translated are
 261   not translated by mistake), and TravisCI is told to run them.
 262
 263 * "git checkout --recurse-submodules" did not quite work with a
 264   submodule that itself has submodules.
 265
 266 * "pack-objects" can stream a slice of an existing packfile out when
 267   the pack bitmap can tell that the reachable objects are all needed
 268   in the output, without inspecting individual objects.  This
 269   strategy however would not work well when "--local" and other
 270   options are in use, and need to be disabled.
 271
 272 * Fix memory leaks pointed out by Coverity (and people).
 273
 274 * "git read-tree -m" (no tree-ish) gave a nonsense suggestion "use
 275   --empty if you want to clear the index".  With "-m", such a request
 276   will still fail anyway, as you'd need to name at least one tree-ish
 277   to be merged.
 278
 279 * Make sure our tests would pass when the sources are checked out
 280   with "platform native" line ending convention by default on
 281   Windows.  Some "text" files out tests use and the test scripts
 282   themselves that are meant to be run with /bin/sh, ought to be
 283   checked out with eol=LF even on Windows.
 284
 285 * Introduce the BUG() macro to improve die("BUG: ...").
 286
 287 * Clarify documentation for include.path and includeIf.<condition>.path
 288   configuration variables.
 289
 290 * Git sometimes gives an advice in a rhetorical question that does
 291   not require an answer, which can confuse new users and non native
 292   speakers.  Attempt to rephrase them.
 293
 294 * A few http:// links that are redirected to https:// in the
 295   documentation have been updated to https:// links.
 296
 297 * "git for-each-ref --format=..." with %(HEAD) in the format used to
 298   resolve the HEAD symref as many times as it had processed refs,
 299   which was wasteful, and "git branch" shared the same problem.
 300
 301 * Regression fix to topic recently merged to 'master'.
 302
 303 * The shell completion script (in contrib/) learned "git stash" has
 304   a new "push" subcommand.
 305
 306 * "git interpret-trailers", when used as GIT_EDITOR for "git commit
 307   -v", looked for and appended to a trailer block at the very end,
 308   i.e. at the end of the "diff" output.  The command has been
 309   corrected to pay attention to the cut-mark line "commit -v" adds to
 310   the buffer---the real trailer block should appear just before it.
 311
 312 * A test allowed both "git push" and "git receive-pack" on the other
 313   end write their traces into the same file.  This is OK on platforms
 314   that allows atomically appending to a file opened with O_APPEND,
 315   but on other platforms led to a mangled output, causing
 316   intermittent test failures.  This has been fixed by disabling
 317   traces from "receive-pack" in the test.
 318
 319 * Tag objects, which are not reachable from any ref, that point at
 320   missing objects were mishandled by "git gc" and friends (they
 321   should silently be ignored instead)
 322
 323 * "git describe --contains" penalized light-weight tags so much that
 324   they were almost never considered.  Instead, give them about the
 325   same chance to be considered as an annotated tag that is the same
 326   age as the underlying commit would.
 327
 328 * The "run-command" API implementation has been made more robust
 329   against dead-locking in a threaded environment.
 330
 331 * A recent update to t5545-push-options.sh started skipping all the
 332   tests in the script when a web server testing is disabled or
 333   unavailable, not just the ones that require a web server.  Non HTTP
 334   tests have been salvaged to always run in this script.
 335
 336 * "git send-email" now uses Net::SMTP::SSL, which is obsolete, only
 337   when needed.  Recent versions of Net::SMTP can do TLS natively.
 338
 339 * "foo\bar\baz" in "git fetch foo\bar\baz", even though there is no
 340   slashes in it, cannot be a nickname for a remote on Windows, as
 341   that is likely to be a pathname on a local filesystem.
 342
 343 * "git clean -d" used to clean directories that has ignored files,
 344   even though the command should not lose ignored ones without "-x".
 345   "git status --ignored"  did not list ignored and untracked files
 346   without "-uall".  These have been corrected.
 347
 348 * The result from "git diff" that compares two blobs, e.g. "git diff
 349   $commit1:$path $commit2:$path", used to be shown with the full
 350   object name as given on the command line, but it is more natural to
 351   use the $path in the output and use it to look up .gitattributes.
 352
 353 * The "collision detecting" SHA-1 implementation shipped with 2.13
 354   was quite broken on some big-endian platforms and/or platforms that
 355   do not like unaligned fetches.  Update to the upstream code which
 356   has already fixed these issues.
 357
 358 * "git am -h" triggered a BUG().
 359
 360 * The interaction of "url.*.insteadOf" and custom URL scheme's
 361   whitelisting is now documented better.
 362
 363 * The timestamp of the index file is now taken after the file is
 364   closed, to help Windows, on which a stale timestamp is reported by
 365   fstat() on a file that is opened for writing and data was written
 366   but not yet closed.
 367
 368 * "git pull --rebase --autostash" didn't auto-stash when the local history
 369   fast-forwards to the upstream.
 370
 371 * A flaky test has been corrected.
 372
 373 * "git $cmd -h" for builtin commands calls the implementation of the
 374   command (i.e. cmd_$cmd() function) without doing any repository
 375   set-up, and the commands that expect RUN_SETUP is done by the Git
 376   potty needs to be prepared to show the help text without barfing.
 377   (merge d691551192 jk/consistent-h later to maint).
 378
 379 * Help contributors that visit us at GitHub.
 380
 381 * "git stash push <pathspec>" did not work from a subdirectory at all.
 382   Bugfix for a topic in v2.13
 383
 384 * As there is no portable way to pass timezone information to
 385   strftime, some output format from "git log" and friends are
 386   impossible to produce.  Teach our own strbuf_addftime to replace %z
 387   and %Z with caller-supplied values to help working around this.
 388   (merge 6eced3ec5e rs/strbuf-addftime-zZ later to maint).
 389
 390 * "git mergetool" learned to work around a wrapper MacOS X adds
 391   around underlying meld.
 392   (merge 0af85f84bd da/mergetools-meld-output-opt-on-macos later to maint).
 393
 394 * An example in documentation that does not work in multi worktree
 395   configuration has been corrected.
 396   (merge 773a88914f ah/doc-gitattributes-empty-index later to maint).
 397
 398 * The pretty-format specifiers like '%h', '%t', etc. had an
 399   optimization that no longer works correctly.  In preparation/hope
 400   of getting it correctly implemented, first discard the optimization
 401   that is broken.
 402   (merge fe9e2aefd4 rs/pretty-add-again later to maint).
 403
 404 * The code to pick up and execute command alias definition from the
 405   configuration used to switch to the top of the working tree and
 406   then come back when the expanded alias was executed, which was
 407   unnecessarilyl complex.  Attempt to simplify the logic by using the
 408   early-config mechanism that does not chdir around.
 409   (merge a9bcf6586d js/alias-early-config later to maint).
 410
 411 * Fix configuration codepath to pay proper attention to commondir
 412   that is used in multi-worktree situation, and isolate config API
 413   into its own header file.
 414   (merge dc8441fdb4 bw/config-h later to maint).
 415
 416 * "git add -p" were updated in 2.12 timeframe to cope with custom
 417   core.commentchar but the implementation was buggy and a
 418   metacharacter like $ and * did not work.
 419   (merge d85d7ecb80 jk/add-p-commentchar-fix later to maint).
 420
 421 * A recent regression in "git rebase -i" has been fixed and tests
 422   that would have caught it and others have been added.
 423   (merge adf16c08cb pw/rebase-i-regression-fix-tests later to maint).
 424
 425 * An unaligned 32-bit access in pack-bitmap code ahs been corrected.
 426   (merge da41c942b3 jc/pack-bitmap-unaligned later to maint).
 427
 428 * Tighten error checks for invalid "git apply" input.
 429   (merge d70e9c5c8c rs/apply-validate-input later to maint).
 430
 431 * The split index code did not honor core.sharedrepository setting
 432   correctly.
 433   (merge 3ee83f48e5 cc/shared-index-permfix later to maint).
 434
 435 * The Makefile rule in contrib/subtree for building documentation
 436   learned to honour USE_ASCIIDOCTOR just like the main documentation
 437   set does.
 438   (merge fdc1ad97c1 aw/contrib-subtree-doc-asciidoctor later to maint).
 439
 440 * Update the sha1dc again to fix portability glitches.
 441   (merge 9936c1b52a ab/sha1dc-maint later to maint).
 442
 443 * Code clean-up to fix possible buffer over-reading.
 444   (merge 8bc172e5f2 rs/apply-avoid-over-reading later to maint).
 445
 446 * A few tests that tried to verify the contents of push certificates
 447   did not use 'git rev-parse' to formulate the line to look for in
 448   the certificate correctly.
 449   (merge 8722947e5c js/t5534-rev-parse-gives-multi-line-output-fix later to maint).
 450
 451 * Other minor doc, test and build updates and code cleanups.
 452   (merge 68241cb9dd sb/t4005-modernize later to maint).
 453   (merge 4fced24712 ks/t7508-indent-fix later to maint).
 454   (merge 968b1fe263 mb/reword-autocomplete-message later to maint).
 455   (merge 8592c95cdf ah/doc-pretty-color-auto-prefix later to maint).
 456   (merge 73fc2aadc7 js/fsck-name-object later to maint).
 457   (merge dc4b4a61ba jc/utf8-fprintf later to maint).
 458   (merge c2d4b4cd06 sb/merge-recursive-code-cleanup later to maint).