Documentation / RelNotes / 2.21.0.txton commit sha1dc: update from upstream (4125f78)
   1Git 2.21 Release Notes
   2======================
   3
   4Backward Compatibility Notes
   5----------------------------
   6
   7 * Historically, the "-m" (mainline) option can only be used for "git
   8   cherry-pick" and "git revert" when working with a merge commit.
   9   This version of Git no longer warns or errors out when working with
  10   a single-parent commit, as long as the argument to the "-m" option
  11   is 1 (i.e. it has only one parent, and the request is to pick or
  12   revert relative to that first parent).  Scripts that relied on the
  13   behaviour may get broken with this change.
  14
  15
  16Updates since v2.20
  17-------------------
  18
  19UI, Workflows & Features
  20
  21 * The "http.version" configuration variable can be used with recent
  22   enough versions of cURL library to force the version of HTTP used
  23   to talk when fetching and pushing.
  24
  25 * Small fixes and features for fast-export and fast-import, mostly on
  26   the fast-export side has been made.
  27
  28 * "git push $there $src:$dst" rejects when $dst is not a fully
  29   qualified refname and it is not clear what the end user meant.  The
  30   codepath has been taught to give a clearer error message, and also
  31   guess where the push should go by taking the type of the pushed
  32   object into account (e.g. a tag object would want to go under
  33   refs/tags/).
  34
  35 * "git checkout [<tree-ish>] path..." learned to report the number of
  36   paths that have been checked out of the index or the tree-ish,
  37   which gives it the same degree of noisy-ness as the case in which
  38   the command checks out a branch.  "git checkout -m <pathspec>" to
  39   undo conflict resolution gives a similar message.
  40
  41 * "git quiltimport" learned "--keep-non-patch" option.
  42
  43 * "git worktree remove" and "git worktree move" refused to work when
  44   there is a submodule involved.  This has been loosened to ignore
  45   uninitialized submodules.
  46
  47 * "git cherry-pick -m1" was forbidden when picking a non-merge
  48   commit, even though there _is_ parent number 1 for such a commit.
  49   This was done to avoid mistakes back when "cherry-pick" was about
  50   picking a single commit, but is no longer useful with "cherry-pick"
  51   that can pick a range of commits.  Now the "-m$num" option is
  52   allowed when picking any commit, as long as $num names an existing
  53   parent of the commit.
  54
  55 * Update "git multimail" from the upstream.
  56
  57 * "git p4" update.
  58
  59 * The "--format=<placeholder>" option of for-each-ref, branch and tag
  60   learned to show a few more traits of objects that can be learned by
  61   the object_info API.
  62
  63 * "git rebase -i" learned to re-execute a command given with 'exec'
  64   to run after it failed the last time.
  65
  66 * "git diff --color-moved-ws" updates.
  67
  68 * Custom userformat "log --format" learned %S atom that stands for
  69   the tip the traversal reached the commit from, i.e. --source.
  70
  71 * "git instaweb" learned to drive http.server that comes with
  72   "batteries included" Python installation (both Python2 & 3).
  73
  74 * A new encoding UTF-16LE-BOM has been invented to force encoding to
  75   UTF-16 with BOM in little endian byte order, which cannot be directly
  76   generated by using iconv.
  77
  78 * A new date format "--date=human" that morphs its output depending
  79   on how far the time is from the current time has been introduced.
  80   "--date=auto:human" can be used to use this new format (or any
  81   existing format) when the output is going to the pager or to the
  82   terminal, and otherwise the default format.
  83
  84
  85Performance, Internal Implementation, Development Support etc.
  86
  87 * Code clean-up with optimization for the codepath that checks
  88   (non-)existence of loose objects.
  89
  90 * More codepaths have become aware of working with in-core repository
  91   instances other than the default "the_repository".
  92
  93 * The "strncat()" function is now among the banned functions.
  94
  95 * Portability updates for the HPE NonStop platform.
  96
  97 * Earlier we added "-Wformat-security" to developer builds, assuming
  98   that "-Wall" (which includes "-Wformat" which in turn is required
  99   to use "-Wformat-security") is always in effect.  This is not true
 100   when config.mak.autogen is in use, unfortunately.  This has been
 101   fixed by unconditionally adding "-Wall" to developer builds.
 102
 103 * The loose object cache used to optimize existence look-up has been
 104   updated.
 105
 106 * Flaky tests can now be repeatedly run under load with the
 107   "--stress" option.
 108
 109 * Documentation/Makefile is getting prepared for manpage
 110   localization.
 111
 112 * "git fetch-pack" now can talk the version 2 protocol.
 113
 114 * sha-256 hash has been added and plumbed through the code to allow
 115   building Git with the "NewHash".
 116
 117 * Debugging help for http transport.
 118
 119 * "git fetch --deepen=<more>" has been corrected to work over v2
 120   protocol.
 121
 122 * The code to walk tree objects has been taught that we may be
 123   working with object names that are not computed with SHA-1.
 124
 125 * The in-core repository instances are passed through more codepaths.
 126
 127 * Update the protocol message specification to allow only the limited
 128   use of scaled quantities.  This is to ensure potential compatibility
 129   issues will not get out of hand.
 130
 131 * Micro-optimize the code that prepares commit objects to be walked
 132   by "git rev-list" when the commit-graph is available.
 133
 134 * "git fetch" and "git upload-pack" learned to send all exchanges over
 135   the sideband channel while talking the v2 protocol.
 136
 137 * The codepath to write out commit-graph has been optimized by
 138   following the usual pattern of visiting objects in in-pack order.
 139
 140 * The codepath to show progress meter while writing out commit-graph
 141   file has been improved.
 142
 143 * Cocci rules have been updated to encourage use of strbuf_addbuf().
 144
 145 * "git rebase --merge" has been reimplemented by reusing the internal
 146   machinery used for "git rebase -i".
 147
 148 * More code in "git bisect" has been rewritten in C.
 149
 150 * Instead of going through "git-rebase--am" scriptlet to use the "am"
 151   backend, the built-in version of "git rebase" learned to drive the
 152   "am" backend directly.
 153
 154 * The assumption to work on the single "in-core index" instance has
 155   been reduced from the library-ish part of the codebase.
 156
 157 * The test lint learned to catch non-portable "sed" options.
 158
 159 * "git pack-objects" learned another algorithm to compute the set of
 160   objects to send, that trades the resulting packfile off to save
 161   traversal cost to favor small pushes.
 162
 163 * The travis CI scripts have been corrected to build Git with the
 164   compiler(s) of our choice.
 165
 166 * "git submodule update" learned to abort early when core.worktree
 167   for the submodule is not set correctly to prevent spreading damage.
 168
 169 * Test suite has been adjusted to run on Azure Pipeline.
 170
 171 * Running "Documentation/doc-diff x" from anywhere other than the
 172   top-level of the working tree did not show the usage string
 173   correctly, which has been fixed.
 174
 175 * Use of the sparse tool got easier to customize from the command
 176   line to help developers.
 177
 178 * A new target "coverage-prove" to run the coverage test under
 179   "prove" has been added.
 180
 181 * A flakey "p4" test has been removed.
 182
 183 * The code and tests assume that the system supplied iconv() would
 184   always use BOM in its output when asked to encode to UTF-16 (or
 185   UTF-32), but apparently some implementations output big-endian
 186   without BOM.  A compile-time knob has been added to help such
 187   systems (e.g. NonStop) to add BOM to the output to increase
 188   portability.
 189
 190
 191Fixes since v2.20
 192-----------------
 193
 194 * Updates for corner cases in merge-recursive.
 195   (merge cc4cb0902c en/merge-path-collision later to maint).
 196
 197 * "git checkout frotz" (without any double-dash) avoids ambiguity by
 198   making sure 'frotz' cannot be interpreted as a revision and as a
 199   path at the same time.  This safety has been updated to check also
 200   a unique remote-tracking branch 'frotz' in a remote, when dwimming
 201   to create a local branch 'frotz' out of a remote-tracking branch
 202   'frotz' from a remote.
 203   (merge be4908f103 nd/checkout-dwim-fix later to maint).
 204
 205 * Refspecs configured with "git -c var=val clone" did not propagate
 206   to the resulting repository, which has been corrected.
 207   (merge 7eae4a3ac4 sg/clone-initial-fetch-configuration later to maint).
 208
 209 * A properly configured username/email is required under
 210   user.useConfigOnly in order to create commits; now "git stash"
 211   (even though it creates commit objects to represent stash entries)
 212   command is exempt from the requirement.
 213   (merge 3bc2111fc2 sd/stash-wo-user-name later to maint).
 214
 215 * The http-backend CGI process did not correctly clean up the child
 216   processes it spawns to run upload-pack etc. when it dies itself,
 217   which has been corrected.
 218   (merge 02818a98d7 mk/http-backend-kill-children-before-exit later to maint).
 219
 220 * "git rev-list --exclude-promisor-objects" had to take an object
 221   that does not exist locally (and is lazily available) from the
 222   command line without barfing, but the code dereferenced NULL.
 223   (merge 4cf67869b2 md/list-lazy-objects-fix later to maint).
 224
 225 * The traversal over tree objects has learned to honor
 226   ":(attr:label)" pathspec match, which has been implemented only for
 227   enumerating paths on the filesystem.
 228   (merge 5a0b97b34c nd/attr-pathspec-in-tree-walk later to maint).
 229
 230 * BSD port updates.
 231   (merge 4e3ecbd439 cb/openbsd-allows-reading-directory later to maint).
 232   (merge b6bdc2a0f5 cb/t5004-empty-tar-archive-fix later to maint).
 233   (merge 82cbc8cde2 cb/test-lint-cp-a later to maint).
 234
 235 * Lines that begin with a certain keyword that come over the wire, as
 236   well as lines that consist only of one of these keywords, ought to
 237   be painted in color for easier eyeballing, but the latter was
 238   broken ever since the feature was introduced in 2.19, which has
 239   been corrected.
 240   (merge 1f67290450 hn/highlight-sideband-keywords later to maint).
 241
 242 * "git log -G<regex>" looked for a hunk in the "git log -p" patch
 243   output that contained a string that matches the given pattern.
 244   Optimize this code to ignore binary files, which by default will
 245   not show any hunk that would match any pattern (unless textconv or
 246   the --text option is in effect, that is).
 247   (merge e0e7cb8080 tb/log-G-binary later to maint).
 248
 249 * "git submodule update" ought to use a single job unless asked, but
 250   by mistake used multiple jobs, which has been fixed.
 251   (merge e3a9d1aca9 sb/submodule-fetchjobs-default-to-one later to maint).
 252
 253 * "git stripspace" should be usable outside a git repository, but
 254   under the "-s" or "-c" mode, it didn't.
 255   (merge 957da75802 jn/stripspace-wo-repository later to maint).
 256
 257 * Some of the documentation pages formatted incorrectly with
 258   Asciidoctor, which have been fixed.
 259   (merge b62eb1d2f4 ma/asciidoctor later to maint).
 260
 261 * The core.worktree setting in a submodule repository should not be
 262   pointing at a directory when the submodule loses its working tree
 263   (e.g. getting deinit'ed), but the code did not properly maintain
 264   this invariant.
 265
 266 * With zsh, "git cmd path<TAB>" was completed to "git cmd path name"
 267   when the completed path has a special character like SP in it,
 268   without any attempt to keep "path name" a single filename.  This
 269   has been fixed to complete it to "git cmd path\ name" just like
 270   Bash completion does.
 271
 272 * The test suite tried to see if it is run under bash, but the check
 273   itself failed under some other implementations of shell (notably
 274   under NetBSD).  This has been corrected.
 275   (merge 54ea72f09c sg/test-bash-version-fix later to maint).
 276
 277 * "git gc" and "git repack" did not close the open packfiles that
 278   they found unneeded before removing them, which didn't work on a
 279   platform incapable of removing an open file.  This has been
 280   corrected.
 281   (merge 5bdece0d70 js/gc-repack-close-before-remove later to maint).
 282
 283 * The code to drive GIT_EXTERNAL_DIFF command relied on the string
 284   returned from getenv() to be non-volatile, which is not true, that
 285   has been corrected.
 286   (merge 6776a84dae kg/external-diff-save-env later to maint).
 287
 288 * There were many places the code relied on the string returned from
 289   getenv() to be non-volatile, which is not true, that have been
 290   corrected.
 291   (merge 0da0e9268b jk/save-getenv-result later to maint).
 292
 293 * The v2 upload-pack protocol implementation failed to honor
 294   hidden-ref configuration, which has been corrected.
 295   (merge e20b4192a3 jk/proto-v2-hidden-refs-fix later to maint).
 296
 297 * "git fetch --recurse-submodules" may not fetch the necessary commit
 298   that is bound to the superproject, which is getting corrected.
 299   (merge be76c21282 sb/submodule-recursive-fetch-gets-the-tip later to maint).
 300
 301 * "git rebase" internally runs "checkout" to switch between branches,
 302   and the command used to call the post-checkout hook, but the
 303   reimplementation stopped doing so, which is getting fixed.
 304
 305 * "git add -e" got confused when the change it wants to let the user
 306   edit is smaller than the previous change that was left over in a
 307   temporary file.
 308   (merge fa6f225e01 js/add-e-clear-patch-before-stating later to maint).
 309
 310 * "git p4" failed to update a shelved change when there were moved
 311   files, which has been corrected.
 312   (merge 7a10946ab9 ld/git-p4-shelve-update-fix later to maint).
 313
 314 * The codepath to read from the commit-graph file attempted to read
 315   past the end of it when the file's table-of-contents was corrupt.
 316
 317 * The compat/obstack code had casts that -Wcast-function-type
 318   compilation option found questionable.
 319   (merge 764473d257 sg/obstack-cast-function-type-fix later to maint).
 320
 321 * An obvious typo in an assertion error message has been fixed.
 322   (merge 3c27e2e059 cc/test-ref-store-typofix later to maint).
 323
 324 * In Git for Windows, "git clone \\server\share\path" etc. that uses
 325   UNC paths from command line had bad interaction with its shell
 326   emulation.
 327
 328 * "git add --ignore-errors" did not work as advertised and instead
 329   worked as an unintended synonym for "git add --renormalize", which
 330   has been fixed.
 331   (merge e2c2a37545 jk/add-ignore-errors-bit-assignment-fix later to maint).
 332
 333 * On a case-insensitive filesystem, we failed to compare the part of
 334   the path that is above the worktree directory in an absolute
 335   pathname, which has been corrected.
 336
 337 * Asking "git check-attr" about a macro (e.g. "binary") on a specific
 338   path did not work correctly, even though "git check-attr -a" listed
 339   such a macro correctly.  This has been corrected.
 340   (merge 7b95849be4 jk/attr-macro-fix later to maint).
 341
 342 * "git pack-objects" incorrectly used uninitialized mutex, which has
 343   been corrected.
 344   (merge edb673cf10 ph/pack-objects-mutex-fix later to maint).
 345
 346 * "git checkout -b <new> [HEAD]" to create a new branch from the
 347   current commit and check it out ought to be a no-op in the index
 348   and the working tree in normal cases, but there are corner cases
 349   that do require updates to the index and the working tree.  Running
 350   it immediately after "git clone --no-checkout" is one of these
 351   cases that an earlier optimization kicked in incorrectly, which has
 352   been fixed.
 353   (merge 8424bfd45b bp/checkout-new-branch-optim later to maint).
 354
 355 * "git diff --color-moved --cc --stat -p" did not work well due to
 356   funny interaction between a bug in color-moved and the rest, which
 357   has been fixed.
 358   (merge dac03b5518 jk/diff-cc-stat-fixes later to maint).
 359
 360 * When GIT_SEQUENCE_EDITOR is set, the command was incorrectly
 361   started when modes of "git rebase" that implicitly uses the
 362   machinery for the interactive rebase are run, which has been
 363   corrected.
 364   (merge 891d4a0313 pw/no-editor-in-rebase-i-implicit later to maint).
 365
 366 * The commit-graph facility did not work when in-core objects that
 367   are promoted from unknown type to commit (e.g. a commit that is
 368   accessed via a tag that refers to it) were involved, which has been
 369   corrected.
 370   (merge 4468d4435c sg/object-as-type-commit-graph-fix later to maint).
 371
 372 * "git fetch" output cleanup.
 373   (merge dc40b24df4 nd/fetch-compact-update later to maint).
 374
 375 * "git cat-file --batch" reported a dangling symbolic link by
 376   mistake, when it wanted to report that a given name is ambiguous.
 377
 378 * Documentation around core.crlf has been updated.
 379   (merge c9446f0504 jk/autocrlf-overrides-eol-doc later to maint).
 380
 381 * The documentation of "git commit-tree" said that the command
 382   understands "--gpg-sign" in addition to "-S", but the command line
 383   parser did not know about the longhand, which has been corrected.
 384
 385 * "git rebase -x $cmd" did not reject multi-line command, even though
 386   the command is incapable of handling such a command.  It now is
 387   rejected upfront.
 388   (merge c762aada1a pw/rebase-x-sanity-check later to maint).
 389
 390 * Output from "git help" was not correctly aligned, which has been
 391   fixed.
 392   (merge 6195a76da4 nd/help-align-command-desc later to maint).
 393
 394 * The "git submodule summary" subcommand showed shortened commit
 395   object names by mechanically truncating them at 7-hexdigit, which
 396   has been improved to let "rev-parse --short" scale the length of
 397   the abbreviation with the size of the repository.
 398   (merge 0586a438f6 sh/submodule-summary-abbrev-fix later to maint).
 399
 400 * The way the OSX build jobs updates its build environment used the
 401   "--quiet" option to "brew update" command, but it wasn't all that
 402   quiet to be useful.  The use of the option has been replaced with
 403   an explicit redirection to the /dev/null (which incidentally would
 404   have worked around a breakage by recent updates to homebrew, which
 405   has fixed itself already).
 406   (merge a1ccaedd62 sg/travis-osx-brew-breakage-workaround later to maint).
 407
 408 * "git --work-tree=$there --git-dir=$here describe --dirty" did not
 409   work correctly as it did not pay attention to the location of the
 410   worktree specified by the user by mistake, which has been
 411   corrected.
 412   (merge c801170b0c ss/describe-dirty-in-the-right-directory later to maint).
 413
 414 * "git fetch" over protocol v2 that needs to make a second connection
 415   to backfill tags did not clear a variable that holds shallow
 416   repository information correctly, leading to an access of freed
 417   piece of memory.
 418
 419 * Some errors from the other side coming over smart HTTP transport
 420   were not noticed, which has been corrected.
 421
 422 * Code cleanup, docfix, build fix, etc.
 423   (merge 89ba9a79ae hb/t0061-dot-in-path-fix later to maint).
 424   (merge d173e799ea sb/diff-color-moved-config-option-fixup later to maint).
 425   (merge a8f5a59067 en/directory-renames-nothanks-doc-update later to maint).
 426   (merge ec36c42a63 nd/indentation-fix later to maint).
 427   (merge f116ee21cd do/gitweb-strict-export-conf-doc later to maint).
 428   (merge 112ea42663 fd/gitweb-snapshot-conf-doc-fix later to maint).
 429   (merge 1cadad6f65 tb/use-common-win32-pathfuncs-on-cygwin later to maint).
 430   (merge 57e9dcaa65 km/rebase-doc-typofix later to maint).
 431   (merge b8b4cb27e6 ds/gc-doc-typofix later to maint).
 432   (merge 3b3357626e nd/style-opening-brace later to maint).
 433   (merge b4583d5595 es/doc-worktree-guessremote-config later to maint).
 434   (merge cce99cd8c6 ds/commit-graph-assert-missing-parents later to maint).
 435   (merge 0650614982 cy/completion-typofix later to maint).
 436   (merge 6881925ef5 rs/sha1-file-close-mapped-file-on-error later to maint).
 437   (merge bd8d6f0def en/show-ref-doc-fix later to maint).
 438   (merge 1747125e2c cc/partial-clone-doc-typofix later to maint).
 439   (merge e01378753d cc/fetch-error-message-fix later to maint).
 440   (merge 54e8c11215 jk/remote-insteadof-cleanup later to maint).
 441   (merge d609615f48 js/test-git-installed later to maint).
 442   (merge ba170517be ja/doc-style-fix later to maint).
 443   (merge 86fb1c4e77 km/init-doc-typofix later to maint).
 444   (merge 5cfd4a9d10 nd/commit-doc later to maint).
 445   (merge 9fce19a431 ab/diff-tree-doc-fix later to maint).
 446   (merge 2e285e7803 tz/gpg-test-fix later to maint).
 447   (merge 5427de960b kl/pretty-doc-markup-fix later to maint).
 448   (merge 3815f64b0d js/mingw-host-cpu later to maint).
 449   (merge 5fe81438b5 rj/sequencer-sign-off-header-static later to maint).
 450   (merge 18a4f6be6b nd/fileno-may-be-macro later to maint).
 451   (merge 99e9ab54ab kd/t0028-octal-del-is-377-not-777 later to maint).