Merge branch 'ds/midx-too-many-packs'
[git/git.git] / Documentation / RelNotes / 2.22.0.txt
1 Git 2.22 Release Notes
2 ======================
3
4 Updates since v2.21
5 -------------------
6
7 UI, Workflows & Features
8
9 * "git checkout --no-overlay" can be used to trigger a new mode of
10 checking out paths out of the tree-ish, that allows paths that
11 match the pathspec that are in the current index and working tree
12 and are not in the tree-ish.
13
14 * The %(trailers) formatter in "git log --format=..." now allows to
15 optionally pick trailers selectively by keyword, show only values,
16 etc.
17
18 * Four new configuration variables {author,committer}.{name,email}
19 have been introduced to override user.{name,email} in more specific
20 cases.
21
22 * Command-line completion (in contrib/) learned to tab-complete the
23 "git submodule absorbgitdirs" subcommand.
24
25 * "git branch" learned a new subcommand "--show-current".
26
27 * Output from "diff --cc" did not show the original paths when the
28 merge involved renames. A new option adds the paths in the
29 original trees to the output.
30
31 * The command line completion (in contrib/) has been taught to
32 complete more subcommand parameters.
33
34 * The final report from "git bisect" used to show the suspected
35 culprit using a raw "diff-tree", with which there is no output for
36 a merge commit. This has been updated to use a more modern and
37 human readable output that still is concise enough.
38
39 * "git rebase --rebase-merges" replaces its old "--preserve-merges"
40 option; the latter is now marked as deprecated.
41
42 * Error message given while cloning with --recurse-submodules has
43 been updated.
44
45 * The completion helper code now pays attention to repository-local
46 configuration (when available), which allows --list-cmds to honour
47 a repository specific setting of completion.commands, for example.
48
49 * "git mergetool" learned to offer Sublime Merge (smerge) as one of
50 its backends.
51
52 * A new hook "post-index-change" is called when the on-disk index
53 file changes, which can help e.g. a virtualized working tree
54 implementation.
55
56 * "git difftool" can now run outside a repository.
57
58 * "git checkout -m <other>" was about carrying the differences
59 between HEAD and the working-tree files forward while checking out
60 another branch, and ignored the differences between HEAD and the
61 index. The command has been taught to abort when the index and the
62 HEAD are different.
63
64 * A progress indicator has been added to the "index-pack" step, which
65 often makes users wait for completion during "git clone".
66
67 * "git submodule" learns "set-branch" subcommand that allows the
68 submodule.*.branch settings to be modified.
69
70 * "git merge-recursive" backend recently learned a new heuristics to
71 infer file movement based on how other files in the same directory
72 moved. As this is inherently less robust heuristics than the one
73 based on the content similarity of the file itself (rather than
74 based on what its neighbours are doing), it sometimes gives an
75 outcome unexpected by the end users. This has been toned down to
76 leave the renamed paths in higher/conflicted stages in the index so
77 that the user can examine and confirm the result.
78
79 * "git tag" learned to give an advice suggesting it might be a
80 mistake when creating an annotated or signed tag that points at
81 another tag.
82
83 * The "git pack-objects" command learned to report the number of
84 objects it packed via the trace2 mechanism.
85
86 * The list of conflicted paths shown in the editor while concluding a
87 conflicted merge was shown above the scissors line when the
88 clean-up mode is set to "scissors", even though it was commented
89 out just like the list of updated paths and other information to
90 help the user explain the merge better.
91
92 * The trace2 tracing facility learned to auto-generate a filename
93 when told to log to a directory.
94
95 * "git clone" learned a new --server-option option when talking over
96 the protocol version 2.
97
98 * The connectivity bitmaps are created by default in bare
99 repositories now; also the pathname hash-cache is created by
100 default to avoid making crappy deltas when repacking.
101
102
103 Performance, Internal Implementation, Development Support etc.
104
105 * The diff machinery, one of the oldest parts of the system, which
106 long predates the parse-options API, uses fairly long and complex
107 handcrafted option parser. This is being rewritten to use the
108 parse-options API.
109
110 * The implementation of pack-redundant has been updated for
111 performance in a repository with many packfiles.
112
113 * A more structured way to obtain execution trace has been added.
114
115 * "git prune" has been taught to take advantage of reachability
116 bitmap when able.
117
118 * The command line parser of "git commit-tree" has been rewritten to
119 use the parse-options API.
120
121 * Suggest GitGitGadget instead of submitGit as a way to submit
122 patches based on GitHub PR to us.
123
124 * The test framework has been updated to help developers by making it
125 easier to run most of the tests under different versions of
126 over-the-wire protocols.
127
128 * Dev support update to make it easier to compare two formatted
129 results from our documentation.
130
131 * The scripted "git rebase" implementation has been retired.
132
133 * "git multi-pack-index verify" did not scale well with the number of
134 packfiles, which is being improved.
135
136 * "git stash" has been rewritten in C.
137
138 * The "check-docs" Makefile target to support developers has been
139 updated.
140
141 * The tests have been updated not to rely on the abbreviated option
142 names the parse-options API offers, to protect us from an
143 abbreviated form of an option that used to be unique within the
144 command getting non-unique when a new option that share the same
145 prefix is added.
146
147 * The scripted version of "git rebase -i" wrote and rewrote the todo
148 list many times during a single step of its operation, and the
149 recent C-rewrite made a faithful conversion of the logic to C. The
150 implementation has been updated to carry necessary information
151 around in-core to avoid rewriting the same file over and over
152 unnecessarily.
153
154 * Test framework update to more robustly clean up leftover files and
155 processes after tests are done.
156
157 * Conversion from unsigned char[20] to struct object_id continues.
158
159 * While running "git diff" in a lazy clone, we can upfront know which
160 missing blobs we will need, instead of waiting for the on-demand
161 machinery to discover them one by one. The code learned to aim to
162 achieve better performance by batching the request for these
163 promised blobs.
164
165 * During an initial "git clone --depth=..." partial clone, it is
166 pointless to spend cycles for a large portion of the connectivity
167 check that enumerates and skips promisor objects (which by
168 definition is all objects fetched from the other side). This has
169 been optimized out.
170
171 * Mechanically and systematically drop "extern" from function
172 declarlation.
173
174 * The script to aggregate perf result unconditionally depended on
175 libjson-perl even though it did not have to, which has been
176 corrected.
177
178 * The internal implementation of "git rebase -i" has been updated to
179 avoid forking a separate "rebase--interactive" process.
180
181
182 Fixes since v2.21
183 -----------------
184
185 * "git prune-packed" did not notice and complain against excess
186 arguments given from the command line, which now it does.
187 (merge 9b0bd87ed2 rj/prune-packed-excess-args later to maint).
188
189 * Split-index fix.
190 (merge 6e37c8ed3c nd/split-index-null-base-fix later to maint).
191
192 * "git diff --no-index" may still want to access Git goodies like
193 --ext-diff and --textconv, but so far these have been ignored,
194 which has been corrected.
195 (merge 287ab28bfa jk/diff-no-index-initialize later to maint).
196
197 * Unify RPC code for smart http in protocol v0/v1 and v2, which fixes
198 a bug in the latter (lack of authentication retry) and generally
199 improves the code base.
200 (merge a97d00799a jt/http-auth-proto-v2-fix later to maint).
201
202 * The include file compat/bswap.h has been updated so that it is safe
203 to (accidentally) include it more than once.
204 (merge 33aa579a55 jk/guard-bswap-header later to maint).
205
206 * The set of header files used by "make hdr-check" unconditionally
207 included sha256/gcrypt.h, even when it is not used, causing the
208 make target to fail. We now skip it when GCRYPT_SHA256 is not in
209 use.
210 (merge f23aa18e7f rj/hdr-check-gcrypt-fix later to maint).
211
212 * The Makefile uses 'find' utility to enumerate all the *.h header
213 files, which is expensive on platforms with slow filesystems; it
214 now optionally uses "ls-files" if working within a repository,
215 which is a trick similar to how all sources are enumerated to run
216 ETAGS on.
217 (merge 92b88eba9f js/find-lib-h-with-ls-files-when-possible later to maint).
218
219 * "git rebase" that was reimplemented in C did not set ORIG_HEAD
220 correctly, which has been corrected.
221 (merge cbd29ead92 js/rebase-orig-head-fix later to maint).
222
223 * Dev support.
224 (merge f545737144 js/stress-test-ui-tweak later to maint).
225
226 * CFLAGS now can be tweaked when invoking Make while using
227 DEVELOPER=YesPlease; this did not work well before.
228 (merge 6d5d4b4e93 ab/makefile-help-devs-more later to maint).
229
230 * "git fsck --connectivity-only" omits computation necessary to sift
231 the objects that are not reachable from any of the refs into
232 unreachable and dangling. This is now enabled when dangling
233 objects are requested (which is done by default, but can be
234 overridden with the "--no-dangling" option).
235 (merge 8d8c2a5aef jk/fsck-doc later to maint).
236
237 * On platforms where "git fetch" is killed with SIGPIPE (e.g. OSX),
238 the upload-pack that runs on the other end that hangs up after
239 detecting an error could cause "git fetch" to die with a signal,
240 which led to a flakey test. "git fetch" now ignores SIGPIPE during
241 the network portion of its operation (this is not a problem as we
242 check the return status from our write(2)s).
243 (merge 143588949c jk/no-sigpipe-during-network-transport later to maint).
244
245 * A recent update broke "is this object available to us?" check for
246 well-known objects like an empty tree (which should yield "yes",
247 even when there is no on-disk object for an empty tree), which has
248 been corrected.
249 (merge f06ab027ef jk/virtual-objects-do-exist later to maint).
250
251 * The setup code has been cleaned up to avoid leaks around the
252 repository_format structure.
253 (merge e8805af1c3 ma/clear-repository-format later to maint).
254
255 * "git config --type=color ..." is meant to replace "git config --get-color"
256 but there is a slight difference that wasn't documented, which is
257 now fixed.
258 (merge cd8e7593b9 jk/config-type-color-ends-with-lf later to maint).
259
260 * When the "clean" filter can reduce the size of a huge file in the
261 working tree down to a small "token" (a la Git LFS), there is no
262 point in allocating a huge scratch area upfront, but the buffer is
263 sized based on the original file size. The convert mechanism now
264 allocates very minimum and reallocates as it receives the output
265 from the clean filter process.
266 (merge 02156ab031 jh/resize-convert-scratch-buffer later to maint).
267
268 * "git rebase" uses the refs/rewritten/ hierarchy to store its
269 intermediate states, which inherently makes the hierarchy per
270 worktree, but it didn't quite work well.
271 (merge b9317d55a3 nd/rewritten-ref-is-per-worktree later to maint).
272
273 * "git log -L<from>,<to>:<path>" with "-s" did not suppress the patch
274 output as it should. This has been corrected.
275 (merge 05314efaea jk/line-log-with-patch later to maint).
276
277 * "git worktree add" used to do a "find an available name with stat
278 and then mkdir", which is race-prone. This has been fixed by using
279 mkdir and reacting to EEXIST in a loop.
280 (merge 7af01f2367 ms/worktree-add-atomic-mkdir later to maint).
281
282 * Build update for SHA-1 with collision detection.
283 (merge 07a20f569b jk/sha1dc later to maint).
284
285 * Build procedure has been fixed around use of asciidoctor instead of
286 asciidoc.
287 (merge 185f9a0ea0 ma/asciidoctor-fixes later to maint).
288
289 * remote-http transport did not anonymize URLs reported in its error
290 messages at places.
291 (merge c1284b21f2 js/anonymize-remote-curl-diag later to maint).
292
293 * Error messages given from the http transport have been updated so
294 that they can be localized.
295 (merge ed8b4132c8 js/remote-curl-i18n later to maint).
296
297 * "git init" forgot to read platform-specific repository
298 configuration, which made Windows port to ignore settings of
299 core.hidedotfiles, for example.
300
301 * A corner-case object name ambiguity while the sequencer machinery
302 is working (e.g. "rebase -i -x") has been fixed.
303
304 * "git format-patch" did not diagnose an error while opening the
305 output file for the cover-letter, which has been corrected.
306 (merge 2fe95f494c jc/format-patch-error-check later to maint).
307
308 * "git checkout -f <branch>" while the index has an unmerged path
309 incorrectly left some paths in an unmerged state, which has been
310 corrected.
311
312 * A corner case bug in the refs API has been corrected.
313 (merge d3322eb28b jk/refs-double-abort later to maint).
314
315 * Unicode update.
316 (merge 584b62c37b bb/unicode-12 later to maint).
317
318 * dumb-http walker has been updated to share more error recovery
319 strategy with the normal codepath.
320
321 * A buglet in configuration parser has been fixed.
322 (merge 19e7fdaa58 nd/include-if-wildmatch later to maint).
323
324 * The documentation for "git read-tree --reset -u" has been updated.
325 (merge b5a0bd694c nd/read-tree-reset-doc later to maint).
326
327 * Code clean-up around a much-less-important-than-it-used-to-be
328 update_server_info() funtion.
329 (merge b3223761c8 jk/server-info-rabbit-hole later to maint).
330
331 * The message given when "git commit -a <paths>" errors out has been
332 updated.
333 (merge 5a1dbd48bc nd/commit-a-with-paths-msg-update later to maint).
334
335 * "git cherry-pick --options A..B", after giving control back to the
336 user to ask help resolving a conflicted step, did not honor the
337 options it originally received, which has been corrected.
338
339 * Various glitches in "git gc" around reflog handling have been fixed.
340
341 * The code to read from commit-graph file has been cleanup with more
342 careful error checking before using data read from it.
343
344 * Performance fix around "git fetch" that grabs many refs.
345 (merge b764300912 jt/fetch-pack-wanted-refs-optim later to maint).
346
347 * Protocol v2 support in "git fetch-pack" of shallow clones has been
348 corrected.
349
350 * Performance fix around "git blame", especially in a linear history
351 (which is the norm we should optimize for).
352 (merge f892014943 dk/blame-keep-origin-blob later to maint).
353
354 * Performance fix for "rev-list --parents -- pathspec".
355 (merge 8320b1dbe7 jk/revision-rewritten-parents-in-prio-queue later to maint).
356
357 * Updating the display with progress message has been cleaned up to
358 deal better with overlong messages.
359 (merge 545dc345eb sg/overlong-progress-fix later to maint).
360
361 * "git blame -- path" in a non-bare repository starts blaming from
362 the working tree, and the same command in a bare repository errors
363 out because there is no working tree by definition. The command
364 has been taught to instead start blaming from the commit at HEAD,
365 which is more useful.
366 (merge a544fb08f8 sg/blame-in-bare-start-at-head later to maint).
367
368 * An underallocation in the code to read the untracked cache
369 extension has been corrected.
370 (merge 3a7b45a623 js/untracked-cache-allocfix later to maint).
371
372 * The code is updated to check the result of memory allocation before
373 it is used in more places, by using xmalloc and/or xcalloc calls.
374 (merge 999b951b28 jk/xmalloc later to maint).
375
376 * The GETTEXT_POISON test option has been quite broken ever since it
377 was made runtime-tunable, which has been fixed.
378 (merge f88b9cb603 jc/gettext-test-fix later to maint).
379
380 * Test fix on APFS that is incapable of store paths in Latin-1.
381 (merge 3889149619 js/iso8895-test-on-apfs later to maint).
382
383 * "git submodule foreach <command> --quiet" did not pass the option
384 down correctly, which has been corrected.
385 (merge a282f5a906 nd/submodule-foreach-quiet later to maint).
386
387 * "git send-email" has been taught to use quoted-printable when the
388 payload contains carriage-return. The use of the mechanism is in
389 line with the design originally added the codepath that chooses QP
390 when the payload has overly long lines.
391 (merge 74d76a1701 bc/send-email-qp-cr later to maint).
392
393 * The recently added feature to add addresses that are on
394 anything-by: trailers in 'git send-email' was found to be way too
395 eager and considered nonsense strings as if they can be legitimate
396 beginning of *-by: trailer. This has been tightened.
397
398 * Builds with gettext broke on recent macOS w/ Homebrew, which
399 seems to have stopped including from /usr/local/include; this
400 has been corrected.
401 (merge 92a1377a2a js/macos-gettext-build later to maint).
402
403 * Running "git add" on a repository created inside the current
404 repository is an explicit indication that the user wants to add it
405 as a submodule, but when the HEAD of the inner repository is on an
406 unborn branch, it cannot be added as a submodule. Worse, the files
407 in its working tree can be added as if they are a part of the outer
408 repository, which is not what the user wants. These problems are
409 being addressed.
410 (merge f937bc2f86 km/empty-repo-is-still-a-repo later to maint).
411
412 * "git cherry-pick" run with the "-x" or the "--signoff" option used
413 to (and more importantly, ought to) clean up the commit log message
414 with the --cleanup=space option by default, but this has been
415 broken since late 2017. This has been fixed.
416
417 * When given a tag that points at a commit-ish, "git replace --graft"
418 failed to peel the tag before writing a replace ref, which did not
419 make sense because the old graft mechanism the feature wants to
420 mimick only allowed to replace one commit object with another.
421 This has been fixed.
422 (merge ee521ec4cb cc/replace-graft-peel-tags later to maint).
423
424 * Code tightening against a "wrong" object appearing where an object
425 of a different type is expected, instead of blindly assuming that
426 the connection between objects are correctly made.
427 (merge 97dd512af7 tb/unexpected later to maint).
428
429 * An earlier update for MinGW and Cygwin accidentally broke MSVC build,
430 which has been fixed.
431 (merge 22c3634c0f ss/msvc-path-utils-fix later to maint).
432
433 * %(push:track) token used in the --format option to "git
434 for-each-ref" and friends was not showing the right branch, which
435 has been fixed.
436 (merge c646d0934e dr/ref-filter-push-track-fix later to maint).
437
438 * "make check-docs", "git help -a", etc. did not account for cases
439 where a particular build may deliberately omit some subcommands,
440 which has been corrected.
441
442 * The logic to tell if a Git repository has a working tree protects
443 "git branch -D" from removing the branch that is currently checked
444 out by mistake. The implementation of this logic was broken for
445 repositories with unusual name, which unfortunately is the norm for
446 submodules these days. This has been fixed.
447 (merge f3534c98e4 jt/submodule-repo-is-with-worktree later to maint).
448
449 * AIX shared the same build issues with other BSDs around fileno(fp),
450 which has been corrected.
451 (merge ee662bf5c6 cc/aix-has-fileno-as-a-macro later to maint).
452
453 * The autoconf generated configure script failed to use the right
454 gettext() implementations from -libintl by ignoring useless stub
455 implementations shipped in some C library, which has been
456 corrected.
457 (merge b71e56a683 vk/autoconf-gettext later to maint).
458
459 * Fix index-pack perf test so that the repeated invocations always
460 run in an empty repository, which emulates the initial clone
461 situation better.
462 (merge 775c71e16d jk/p5302-avoid-collision-check-cost later to maint).
463
464 * A "ls-files" that emulates "find" to enumerate files in the working
465 tree resulted in duplicated Makefile rules that caused the build to
466 issue an unnecessary warning during a trial build after merge
467 conflicts are resolved in working tree *.h files but before the
468 resolved results are added to the index. This has been corrected.
469
470 * "git chery-pick" (and "revert" that shares the same runtime engine)
471 that deals with multiple commits got confused when the final step
472 gets stopped with a conflict and the user concluded the sequence
473 with "git commit". Attempt to fix it by cleaning up the state
474 files used by these commands in such a situation.
475 (merge 4a72486de9 pw/clean-sequencer-state-upon-final-commit later to maint).
476
477 * Code cleanup, docfix, build fix, etc.
478 (merge 11f470aee7 jc/test-yes-doc later to maint).
479 (merge 90503a240b js/doc-symref-in-proto-v1 later to maint).
480 (merge 5c326d1252 jk/unused-params later to maint).
481 (merge 68cabbfda3 dl/doc-submodule-wo-subcommand later to maint).
482 (merge 9903623761 ab/receive-pack-use-after-free-fix later to maint).
483 (merge 1ede45e44b en/merge-options-doc later to maint).
484 (merge 3e14dd2c8e rd/doc-hook-used-in-sample later to maint).
485 (merge c271dc28fd nd/no-more-check-racy later to maint).
486 (merge e6e15194a8 yb/utf-16le-bom-spellfix later to maint).
487 (merge bb101aaf0c rd/attr.c-comment-typofix later to maint).
488 (merge 716a5af812 rd/gc-prune-doc-fix later to maint).
489 (merge 50b206371d js/untravis-windows later to maint).
490 (merge dbf47215e3 js/rebase-recreate-merge later to maint).
491 (merge 56cb2d30f8 dl/reset-doc-no-wrt-abbrev later to maint).
492 (merge 64eca306a2 ja/dir-rename-doc-markup-fix later to maint).
493 (merge af91b0230c dl/ignore-docs later to maint).
494 (merge 59a06e947b ra/t3600-test-path-funcs later to maint).
495 (merge e041d0781b ar/t4150-remove-cruft later to maint).
496 (merge 8d75a1d183 ma/asciidoctor-fixes-more later to maint).
497 (merge 74cc547b0f mh/pack-protocol-doc-fix later to maint).
498 (merge ed31851fa6 ab/doc-misc-typofixes later to maint).
499 (merge a7256debd4 nd/checkout-m-doc-update later to maint).
500 (merge 3a9e1ad78d jt/t5551-protocol-v2-does-not-have-half-auth later to maint).
501 (merge 0b918b75af sg/t5318-cleanup later to maint).
502 (merge 68ed71b53c cb/doco-mono later to maint).
503 (merge a34dca2451 nd/interpret-trailers-docfix later to maint).
504 (merge cf7b857a77 en/fast-import-parsing-fix later to maint).
505 (merge fe61ccbc35 po/rerere-doc-fmt later to maint).
506 (merge ffea0248bf po/describe-not-necessarily-7 later to maint).
507 (merge 7cb7283adb tg/ls-files-debug-format-fix later to maint).
508 (merge f64a21bd82 tz/doc-apostrophe-no-longer-needed later to maint).
509 (merge dbe7b41019 js/t3301-unbreak-notes-test later to maint).
510 (merge d8083e4180 km/t3000-retitle later to maint).
511 (merge 9e4cbccbd7 tz/git-svn-doc-markup-fix later to maint).
512 (merge da9ca955a7 jk/ls-files-doc-markup-fix later to maint).