Merge branch 'rj/sequencer-sign-off-header-static'
[git] / Documentation / RelNotes / 2.21.0.txt
1 Git 2.21 Release Notes
2 ======================
3
4 Backward 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
16 Updates since v2.20
17 -------------------
18
19 UI, 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
85 Performance, 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
184 Fixes since v2.20
185 -----------------
186
187  * Updates for corner cases in merge-recursive.
188    (merge cc4cb0902c en/merge-path-collision later to maint).
189
190  * "git checkout frotz" (without any double-dash) avoids ambiguity by
191    making sure 'frotz' cannot be interpreted as a revision and as a
192    path at the same time.  This safety has been updated to check also
193    a unique remote-tracking branch 'frotz' in a remote, when dwimming
194    to create a local branch 'frotz' out of a remote-tracking branch
195    'frotz' from a remote.
196    (merge be4908f103 nd/checkout-dwim-fix later to maint).
197
198  * Refspecs configured with "git -c var=val clone" did not propagate
199    to the resulting repository, which has been corrected.
200    (merge 7eae4a3ac4 sg/clone-initial-fetch-configuration later to maint).
201
202  * A properly configured username/email is required under
203    user.useConfigOnly in order to create commits; now "git stash"
204    (even though it creates commit objects to represent stash entries)
205    command is exempt from the requirement.
206    (merge 3bc2111fc2 sd/stash-wo-user-name later to maint).
207
208  * The http-backend CGI process did not correctly clean up the child
209    processes it spawns to run upload-pack etc. when it dies itself,
210    which has been corrected.
211    (merge 02818a98d7 mk/http-backend-kill-children-before-exit later to maint).
212
213  * "git rev-list --exclude-promisor-objects" had to take an object
214    that does not exist locally (and is lazily available) from the
215    command line without barfing, but the code dereferenced NULL.
216    (merge 4cf67869b2 md/list-lazy-objects-fix later to maint).
217
218  * The traversal over tree objects has learned to honor
219    ":(attr:label)" pathspec match, which has been implemented only for
220    enumerating paths on the filesystem.
221    (merge 5a0b97b34c nd/attr-pathspec-in-tree-walk later to maint).
222
223  * BSD port updates.
224    (merge 4e3ecbd439 cb/openbsd-allows-reading-directory later to maint).
225    (merge b6bdc2a0f5 cb/t5004-empty-tar-archive-fix later to maint).
226    (merge 82cbc8cde2 cb/test-lint-cp-a later to maint).
227
228  * Lines that begin with a certain keyword that come over the wire, as
229    well as lines that consist only of one of these keywords, ought to
230    be painted in color for easier eyeballing, but the latter was
231    broken ever since the feature was introduced in 2.19, which has
232    been corrected.
233    (merge 1f67290450 hn/highlight-sideband-keywords later to maint).
234
235  * "git log -G<regex>" looked for a hunk in the "git log -p" patch
236    output that contained a string that matches the given pattern.
237    Optimize this code to ignore binary files, which by default will
238    not show any hunk that would match any pattern (unless textconv or
239    the --text option is in effect, that is).
240    (merge e0e7cb8080 tb/log-G-binary later to maint).
241
242  * "git submodule update" ought to use a single job unless asked, but
243    by mistake used multiple jobs, which has been fixed.
244    (merge e3a9d1aca9 sb/submodule-fetchjobs-default-to-one later to maint).
245
246  * "git stripspace" should be usable outside a git repository, but
247    under the "-s" or "-c" mode, it didn't.
248    (merge 957da75802 jn/stripspace-wo-repository later to maint).
249
250  * Some of the documentation pages formatted incorrectly with
251    Asciidoctor, which have been fixed.
252    (merge b62eb1d2f4 ma/asciidoctor later to maint).
253
254  * The core.worktree setting in a submodule repository should not be
255    pointing at a directory when the submodule loses its working tree
256    (e.g. getting deinit'ed), but the code did not properly maintain
257    this invariant.
258
259  * With zsh, "git cmd path<TAB>" was completed to "git cmd path name"
260    when the completed path has a special character like SP in it,
261    without any attempt to keep "path name" a single filename.  This
262    has been fixed to complete it to "git cmd path\ name" just like
263    Bash completion does.
264
265  * The test suite tried to see if it is run under bash, but the check
266    itself failed under some other implementations of shell (notably
267    under NetBSD).  This has been corrected.
268    (merge 54ea72f09c sg/test-bash-version-fix later to maint).
269
270  * "git gc" and "git repack" did not close the open packfiles that
271    they found unneeded before removing them, which didn't work on a
272    platform incapable of removing an open file.  This has been
273    corrected.
274    (merge 5bdece0d70 js/gc-repack-close-before-remove later to maint).
275
276  * The code to drive GIT_EXTERNAL_DIFF command relied on the string
277    returned from getenv() to be non-volatile, which is not true, that
278    has been corrected.
279    (merge 6776a84dae kg/external-diff-save-env later to maint).
280
281  * There were many places the code relied on the string returned from
282    getenv() to be non-volatile, which is not true, that have been
283    corrected.
284    (merge 0da0e9268b jk/save-getenv-result later to maint).
285
286  * The v2 upload-pack protocol implementation failed to honor
287    hidden-ref configuration, which has been corrected.
288    (merge e20b4192a3 jk/proto-v2-hidden-refs-fix later to maint).
289
290  * "git fetch --recurse-submodules" may not fetch the necessary commit
291    that is bound to the superproject, which is getting corrected.
292    (merge be76c21282 sb/submodule-recursive-fetch-gets-the-tip later to maint).
293
294  * "git rebase" internally runs "checkout" to switch between branches,
295    and the command used to call the post-checkout hook, but the
296    reimplementation stopped doing so, which is getting fixed.
297
298  * "git add -e" got confused when the change it wants to let the user
299    edit is smaller than the previous change that was left over in a
300    temporary file.
301    (merge fa6f225e01 js/add-e-clear-patch-before-stating later to maint).
302
303  * "git p4" failed to update a shelved change when there were moved
304    files, which has been corrected.
305    (merge 7a10946ab9 ld/git-p4-shelve-update-fix later to maint).
306
307  * The codepath to read from the commit-graph file attempted to read
308    past the end of it when the file's table-of-contents was corrupt.
309
310  * The compat/obstack code had casts that -Wcast-function-type
311    compilation option found questionable.
312    (merge 764473d257 sg/obstack-cast-function-type-fix later to maint).
313
314  * An obvious typo in an assertion error message has been fixed.
315    (merge 3c27e2e059 cc/test-ref-store-typofix later to maint).
316
317  * In Git for Windows, "git clone \\server\share\path" etc. that uses
318    UNC paths from command line had bad interaction with its shell
319    emulation.
320
321  * "git add --ignore-errors" did not work as advertised and instead
322    worked as an unintended synonym for "git add --renormalize", which
323    has been fixed.
324    (merge e2c2a37545 jk/add-ignore-errors-bit-assignment-fix later to maint).
325
326  * On a case-insensitive filesystem, we failed to compare the part of
327    the path that is above the worktree directory in an absolute
328    pathname, which has been corrected.
329
330  * Asking "git check-attr" about a macro (e.g. "binary") on a specific
331    path did not work correctly, even though "git check-attr -a" listed
332    such a macro correctly.  This has been corrected.
333    (merge 7b95849be4 jk/attr-macro-fix later to maint).
334
335  * "git pack-objects" incorrectly used uninitialized mutex, which has
336    been corrected.
337    (merge edb673cf10 ph/pack-objects-mutex-fix later to maint).
338
339  * "git checkout -b <new> [HEAD]" to create a new branch from the
340    current commit and check it out ought to be a no-op in the index
341    and the working tree in normal cases, but there are corner cases
342    that do require updates to the index and the working tree.  Running
343    it immediately after "git clone --no-checkout" is one of these
344    cases that an earlier optimization kicked in incorrectly, which has
345    been fixed.
346    (merge 8424bfd45b bp/checkout-new-branch-optim later to maint).
347
348  * "git diff --color-moved --cc --stat -p" did not work well due to
349    funny interaction between a bug in color-moved and the rest, which
350    has been fixed.
351    (merge dac03b5518 jk/diff-cc-stat-fixes later to maint).
352
353  * When GIT_SEQUENCE_EDITOR is set, the command was incorrectly
354    started when modes of "git rebase" that implicitly uses the
355    machinery for the interactive rebase are run, which has been
356    corrected.
357    (merge 891d4a0313 pw/no-editor-in-rebase-i-implicit later to maint).
358
359  * The commit-graph facility did not work when in-core objects that
360    are promoted from unknown type to commit (e.g. a commit that is
361    accessed via a tag that refers to it) were involved, which has been
362    corrected.
363    (merge 4468d4435c sg/object-as-type-commit-graph-fix later to maint).
364
365  * "git fetch" output cleanup.
366    (merge dc40b24df4 nd/fetch-compact-update later to maint).
367
368  * "git cat-file --batch" reported a dangling symbolic link by
369    mistake, when it wanted to report that a given name is ambiguous.
370
371  * Documentation around core.crlf has been updated.
372    (merge c9446f0504 jk/autocrlf-overrides-eol-doc later to maint).
373
374  * The documentation of "git commit-tree" said that the command
375    understands "--gpg-sign" in addition to "-S", but the command line
376    parser did not know about the longhand, which has been corrected.
377
378  * "git rebase -x $cmd" did not reject multi-line command, even though
379    the command is incapable of handling such a command.  It now is
380    rejected upfront.
381    (merge c762aada1a pw/rebase-x-sanity-check later to maint).
382
383  * Output from "git help" was not correctly aligned, which has been
384    fixed.
385    (merge 6195a76da4 nd/help-align-command-desc later to maint).
386
387  * The "git submodule summary" subcommand showed shortened commit
388    object names by mechanically truncating them at 7-hexdigit, which
389    has been improved to let "rev-parse --short" scale the length of
390    the abbreviation with the size of the repository.
391    (merge 0586a438f6 sh/submodule-summary-abbrev-fix later to maint).
392
393  * The way the OSX build jobs updates its build environment used the
394    "--quiet" option to "brew update" command, but it wasn't all that
395    quiet to be useful.  The use of the option has been replaced with
396    an explicit redirection to the /dev/null (which incidentally would
397    have worked around a breakage by recent updates to homebrew, which
398    has fixed itself already).
399    (merge a1ccaedd62 sg/travis-osx-brew-breakage-workaround later to maint).
400
401  * "git --work-tree=$there --git-dir=$here describe --dirty" did not
402    work correctly as it did not pay attention to the location of the
403    worktree specified by the user by mistake, which has been
404    corrected.
405    (merge c801170b0c ss/describe-dirty-in-the-right-directory later to maint).
406
407  * "git fetch" over protocol v2 that needs to make a second connection
408    to backfill tags did not clear a variable that holds shallow
409    repository information correctly, leading to an access of freed
410    piece of memory.
411
412  * Some errors from the other side coming over smart HTTP transport
413    were not noticed, which has been corrected.
414
415  * Code cleanup, docfix, build fix, etc.
416    (merge 89ba9a79ae hb/t0061-dot-in-path-fix later to maint).
417    (merge d173e799ea sb/diff-color-moved-config-option-fixup later to maint).
418    (merge a8f5a59067 en/directory-renames-nothanks-doc-update later to maint).
419    (merge ec36c42a63 nd/indentation-fix later to maint).
420    (merge f116ee21cd do/gitweb-strict-export-conf-doc later to maint).
421    (merge 112ea42663 fd/gitweb-snapshot-conf-doc-fix later to maint).
422    (merge 1cadad6f65 tb/use-common-win32-pathfuncs-on-cygwin later to maint).
423    (merge 57e9dcaa65 km/rebase-doc-typofix later to maint).
424    (merge b8b4cb27e6 ds/gc-doc-typofix later to maint).
425    (merge 3b3357626e nd/style-opening-brace later to maint).
426    (merge b4583d5595 es/doc-worktree-guessremote-config later to maint).
427    (merge cce99cd8c6 ds/commit-graph-assert-missing-parents later to maint).
428    (merge 0650614982 cy/completion-typofix later to maint).
429    (merge 6881925ef5 rs/sha1-file-close-mapped-file-on-error later to maint).
430    (merge bd8d6f0def en/show-ref-doc-fix later to maint).
431    (merge 1747125e2c cc/partial-clone-doc-typofix later to maint).
432    (merge e01378753d cc/fetch-error-message-fix later to maint).
433    (merge 54e8c11215 jk/remote-insteadof-cleanup later to maint).
434    (merge d609615f48 js/test-git-installed later to maint).
435    (merge ba170517be ja/doc-style-fix later to maint).
436    (merge 86fb1c4e77 km/init-doc-typofix later to maint).
437    (merge 5cfd4a9d10 nd/commit-doc later to maint).
438    (merge 9fce19a431 ab/diff-tree-doc-fix later to maint).
439    (merge 2e285e7803 tz/gpg-test-fix later to maint).
440    (merge 5427de960b kl/pretty-doc-markup-fix later to maint).
441    (merge 3815f64b0d js/mingw-host-cpu later to maint).