7 Backward compatibility note
9 * The filter specification "--filter=sparse:path=<path>" used to
10 create a lazy/partial clone has been removed. Using a blob that is
11 part of the project as sparse specification is still supported with
12 the "--filter=sparse:oid=<blob>" option.
14 UI, Workflows & Features
16 * "git checkout --no-overlay" can be used to trigger a new mode of
17 checking out paths out of the tree-ish, that allows paths that
18 match the pathspec that are in the current index and working tree
19 and are not in the tree-ish.
21 * The %(trailers) formatter in "git log --format=..." now allows to
22 optionally pick trailers selectively by keyword, show only values,
25 * Four new configuration variables {author,committer}.{name,email}
26 have been introduced to override user.{name,email} in more specific
29 * Command-line completion (in contrib/) learned to tab-complete the
30 "git submodule absorbgitdirs" subcommand.
32 * "git branch" learned a new subcommand "--show-current".
34 * Output from "diff --cc" did not show the original paths when the
35 merge involved renames. A new option adds the paths in the
36 original trees to the output.
38 * The command line completion (in contrib/) has been taught to
39 complete more subcommand parameters.
41 * The final report from "git bisect" used to show the suspected
42 culprit using a raw "diff-tree", with which there is no output for
43 a merge commit. This has been updated to use a more modern and
44 human readable output that still is concise enough.
46 * "git rebase --rebase-merges" replaces its old "--preserve-merges"
47 option; the latter is now marked as deprecated.
49 * Error message given while cloning with --recurse-submodules has
52 * The completion helper code now pays attention to repository-local
53 configuration (when available), which allows --list-cmds to honour
54 a repository specific setting of completion.commands, for example.
56 * "git mergetool" learned to offer Sublime Merge (smerge) as one of
59 * A new hook "post-index-change" is called when the on-disk index
60 file changes, which can help e.g. a virtualized working tree
63 * "git difftool" can now run outside a repository.
65 * "git checkout -m <other>" was about carrying the differences
66 between HEAD and the working-tree files forward while checking out
67 another branch, and ignored the differences between HEAD and the
68 index. The command has been taught to abort when the index and the
71 * A progress indicator has been added to the "index-pack" step, which
72 often makes users wait for completion during "git clone".
74 * "git submodule" learns "set-branch" subcommand that allows the
75 submodule.*.branch settings to be modified.
77 * "git merge-recursive" backend recently learned a new heuristics to
78 infer file movement based on how other files in the same directory
79 moved. As this is inherently less robust heuristics than the one
80 based on the content similarity of the file itself (rather than
81 based on what its neighbours are doing), it sometimes gives an
82 outcome unexpected by the end users. This has been toned down to
83 leave the renamed paths in higher/conflicted stages in the index so
84 that the user can examine and confirm the result.
86 * "git tag" learned to give an advice suggesting it might be a
87 mistake when creating an annotated or signed tag that points at
90 * The "git pack-objects" command learned to report the number of
91 objects it packed via the trace2 mechanism.
93 * The list of conflicted paths shown in the editor while concluding a
94 conflicted merge was shown above the scissors line when the
95 clean-up mode is set to "scissors", even though it was commented
96 out just like the list of updated paths and other information to
97 help the user explain the merge better.
99 * The trace2 tracing facility learned to auto-generate a filename
100 when told to log to a directory.
102 * "git clone" learned a new --server-option option when talking over
103 the protocol version 2.
105 * The connectivity bitmaps are created by default in bare
106 repositories now; also the pathname hash-cache is created by
107 default to avoid making crappy deltas when repacking.
109 * "git branch new A...B" and "git checkout -b new A...B" have been
110 taught that in their contexts, the notation A...B means "the merge
111 base between these two commits", just like "git checkout A...B"
112 detaches HEAD at that commit.
114 * Update "git difftool" and "git mergetool" so that the combinations
115 of {diff,merge}.{tool,guitool} configuration variables serve as
116 fallback settings of each other in a sensible order.
118 * The "--dir-diff" mode of "git difftool" is not useful in "--no-index"
119 mode; they are now explicitly marked as mutually incompatible.
122 Performance, Internal Implementation, Development Support etc.
124 * The diff machinery, one of the oldest parts of the system, which
125 long predates the parse-options API, uses fairly long and complex
126 handcrafted option parser. This is being rewritten to use the
129 * The implementation of pack-redundant has been updated for
130 performance in a repository with many packfiles.
132 * A more structured way to obtain execution trace has been added.
134 * "git prune" has been taught to take advantage of reachability
137 * The command line parser of "git commit-tree" has been rewritten to
138 use the parse-options API.
140 * Suggest GitGitGadget instead of submitGit as a way to submit
141 patches based on GitHub PR to us.
143 * The test framework has been updated to help developers by making it
144 easier to run most of the tests under different versions of
145 over-the-wire protocols.
147 * Dev support update to make it easier to compare two formatted
148 results from our documentation.
150 * The scripted "git rebase" implementation has been retired.
152 * "git multi-pack-index verify" did not scale well with the number of
153 packfiles, which is being improved.
155 * "git stash" has been rewritten in C.
157 * The "check-docs" Makefile target to support developers has been
160 * The tests have been updated not to rely on the abbreviated option
161 names the parse-options API offers, to protect us from an
162 abbreviated form of an option that used to be unique within the
163 command getting non-unique when a new option that share the same
166 * The scripted version of "git rebase -i" wrote and rewrote the todo
167 list many times during a single step of its operation, and the
168 recent C-rewrite made a faithful conversion of the logic to C. The
169 implementation has been updated to carry necessary information
170 around in-core to avoid rewriting the same file over and over
173 * Test framework update to more robustly clean up leftover files and
174 processes after tests are done.
176 * Conversion from unsigned char[20] to struct object_id continues.
178 * While running "git diff" in a lazy clone, we can upfront know which
179 missing blobs we will need, instead of waiting for the on-demand
180 machinery to discover them one by one. The code learned to aim to
181 achieve better performance by batching the request for these
184 * During an initial "git clone --depth=..." partial clone, it is
185 pointless to spend cycles for a large portion of the connectivity
186 check that enumerates and skips promisor objects (which by
187 definition is all objects fetched from the other side). This has
190 * Mechanically and systematically drop "extern" from function
193 * The script to aggregate perf result unconditionally depended on
194 libjson-perl even though it did not have to, which has been
197 * The internal implementation of "git rebase -i" has been updated to
198 avoid forking a separate "rebase--interactive" process.
200 * Allow DEP and ASLR for Windows build to for security hardening.
202 * Performance test framework has been broken and measured the version
203 of Git that happens to be on $PATH, not the specified one to
204 measure, for a while, which has been corrected.
206 * Optionally "make coccicheck" can feed multiple source files to
207 spatch, gaining performance while spending more memory.
209 * Attempt to use an abbreviated option in "git clone --recurs" is
210 responded by a request to disambiguate between --recursive and
211 --recurse-submodules, which is bad because these two are synonyms.
212 The parse-options API has been extended to define such synonyms
213 more easily and not produce an unnecessary failure.
215 * A pair of private functions in http.c that had names similar to
216 fread/fwrite did not return the number of elements, which was found
219 * Update collision-detecting SHA-1 code to build properly on HP-UX.
225 * "git prune-packed" did not notice and complain against excess
226 arguments given from the command line, which now it does.
227 (merge 9b0bd87ed2 rj/prune-packed-excess-args later to maint).
230 (merge 6e37c8ed3c nd/split-index-null-base-fix later to maint).
232 * "git diff --no-index" may still want to access Git goodies like
233 --ext-diff and --textconv, but so far these have been ignored,
234 which has been corrected.
235 (merge 287ab28bfa jk/diff-no-index-initialize later to maint).
237 * Unify RPC code for smart http in protocol v0/v1 and v2, which fixes
238 a bug in the latter (lack of authentication retry) and generally
239 improves the code base.
240 (merge a97d00799a jt/http-auth-proto-v2-fix later to maint).
242 * The include file compat/bswap.h has been updated so that it is safe
243 to (accidentally) include it more than once.
244 (merge 33aa579a55 jk/guard-bswap-header later to maint).
246 * The set of header files used by "make hdr-check" unconditionally
247 included sha256/gcrypt.h, even when it is not used, causing the
248 make target to fail. We now skip it when GCRYPT_SHA256 is not in
250 (merge f23aa18e7f rj/hdr-check-gcrypt-fix later to maint).
252 * The Makefile uses 'find' utility to enumerate all the *.h header
253 files, which is expensive on platforms with slow filesystems; it
254 now optionally uses "ls-files" if working within a repository,
255 which is a trick similar to how all sources are enumerated to run
257 (merge 92b88eba9f js/find-lib-h-with-ls-files-when-possible later to maint).
259 * "git rebase" that was reimplemented in C did not set ORIG_HEAD
260 correctly, which has been corrected.
261 (merge cbd29ead92 js/rebase-orig-head-fix later to maint).
264 (merge f545737144 js/stress-test-ui-tweak later to maint).
266 * CFLAGS now can be tweaked when invoking Make while using
267 DEVELOPER=YesPlease; this did not work well before.
268 (merge 6d5d4b4e93 ab/makefile-help-devs-more later to maint).
270 * "git fsck --connectivity-only" omits computation necessary to sift
271 the objects that are not reachable from any of the refs into
272 unreachable and dangling. This is now enabled when dangling
273 objects are requested (which is done by default, but can be
274 overridden with the "--no-dangling" option).
275 (merge 8d8c2a5aef jk/fsck-doc later to maint).
277 * On platforms where "git fetch" is killed with SIGPIPE (e.g. OSX),
278 the upload-pack that runs on the other end that hangs up after
279 detecting an error could cause "git fetch" to die with a signal,
280 which led to a flaky test. "git fetch" now ignores SIGPIPE during
281 the network portion of its operation (this is not a problem as we
282 check the return status from our write(2)s).
283 (merge 143588949c jk/no-sigpipe-during-network-transport later to maint).
285 * A recent update broke "is this object available to us?" check for
286 well-known objects like an empty tree (which should yield "yes",
287 even when there is no on-disk object for an empty tree), which has
289 (merge f06ab027ef jk/virtual-objects-do-exist later to maint).
291 * The setup code has been cleaned up to avoid leaks around the
292 repository_format structure.
293 (merge e8805af1c3 ma/clear-repository-format later to maint).
295 * "git config --type=color ..." is meant to replace "git config --get-color"
296 but there is a slight difference that wasn't documented, which is
298 (merge cd8e7593b9 jk/config-type-color-ends-with-lf later to maint).
300 * When the "clean" filter can reduce the size of a huge file in the
301 working tree down to a small "token" (a la Git LFS), there is no
302 point in allocating a huge scratch area upfront, but the buffer is
303 sized based on the original file size. The convert mechanism now
304 allocates very minimum and reallocates as it receives the output
305 from the clean filter process.
306 (merge 02156ab031 jh/resize-convert-scratch-buffer later to maint).
308 * "git rebase" uses the refs/rewritten/ hierarchy to store its
309 intermediate states, which inherently makes the hierarchy per
310 worktree, but it didn't quite work well.
311 (merge b9317d55a3 nd/rewritten-ref-is-per-worktree later to maint).
313 * "git log -L<from>,<to>:<path>" with "-s" did not suppress the patch
314 output as it should. This has been corrected.
315 (merge 05314efaea jk/line-log-with-patch later to maint).
317 * "git worktree add" used to do a "find an available name with stat
318 and then mkdir", which is race-prone. This has been fixed by using
319 mkdir and reacting to EEXIST in a loop.
320 (merge 7af01f2367 ms/worktree-add-atomic-mkdir later to maint).
322 * Build update for SHA-1 with collision detection.
323 (merge 07a20f569b jk/sha1dc later to maint).
325 * Build procedure has been fixed around use of asciidoctor instead of
327 (merge 185f9a0ea0 ma/asciidoctor-fixes later to maint).
329 * remote-http transport did not anonymize URLs reported in its error
331 (merge c1284b21f2 js/anonymize-remote-curl-diag later to maint).
333 * Error messages given from the http transport have been updated so
334 that they can be localized.
335 (merge ed8b4132c8 js/remote-curl-i18n later to maint).
337 * "git init" forgot to read platform-specific repository
338 configuration, which made Windows port to ignore settings of
339 core.hidedotfiles, for example.
341 * A corner-case object name ambiguity while the sequencer machinery
342 is working (e.g. "rebase -i -x") has been fixed.
344 * "git format-patch" did not diagnose an error while opening the
345 output file for the cover-letter, which has been corrected.
346 (merge 2fe95f494c jc/format-patch-error-check later to maint).
348 * "git checkout -f <branch>" while the index has an unmerged path
349 incorrectly left some paths in an unmerged state, which has been
352 * A corner case bug in the refs API has been corrected.
353 (merge d3322eb28b jk/refs-double-abort later to maint).
356 (merge 584b62c37b bb/unicode-12 later to maint).
358 * dumb-http walker has been updated to share more error recovery
359 strategy with the normal codepath.
361 * A buglet in configuration parser has been fixed.
362 (merge 19e7fdaa58 nd/include-if-wildmatch later to maint).
364 * The documentation for "git read-tree --reset -u" has been updated.
365 (merge b5a0bd694c nd/read-tree-reset-doc later to maint).
367 * Code clean-up around a much-less-important-than-it-used-to-be
368 update_server_info() function.
369 (merge b3223761c8 jk/server-info-rabbit-hole later to maint).
371 * The message given when "git commit -a <paths>" errors out has been
373 (merge 5a1dbd48bc nd/commit-a-with-paths-msg-update later to maint).
375 * "git cherry-pick --options A..B", after giving control back to the
376 user to ask help resolving a conflicted step, did not honor the
377 options it originally received, which has been corrected.
379 * Various glitches in "git gc" around reflog handling have been fixed.
381 * The code to read from commit-graph file has been cleanup with more
382 careful error checking before using data read from it.
384 * Performance fix around "git fetch" that grabs many refs.
385 (merge b764300912 jt/fetch-pack-wanted-refs-optim later to maint).
387 * Protocol v2 support in "git fetch-pack" of shallow clones has been
390 * Performance fix around "git blame", especially in a linear history
391 (which is the norm we should optimize for).
392 (merge f892014943 dk/blame-keep-origin-blob later to maint).
394 * Performance fix for "rev-list --parents -- pathspec".
395 (merge 8320b1dbe7 jk/revision-rewritten-parents-in-prio-queue later to maint).
397 * Updating the display with progress message has been cleaned up to
398 deal better with overlong messages.
399 (merge 545dc345eb sg/overlong-progress-fix later to maint).
401 * "git blame -- path" in a non-bare repository starts blaming from
402 the working tree, and the same command in a bare repository errors
403 out because there is no working tree by definition. The command
404 has been taught to instead start blaming from the commit at HEAD,
405 which is more useful.
406 (merge a544fb08f8 sg/blame-in-bare-start-at-head later to maint).
408 * An underallocation in the code to read the untracked cache
409 extension has been corrected.
410 (merge 3a7b45a623 js/untracked-cache-allocfix later to maint).
412 * The code is updated to check the result of memory allocation before
413 it is used in more places, by using xmalloc and/or xcalloc calls.
414 (merge 999b951b28 jk/xmalloc later to maint).
416 * The GETTEXT_POISON test option has been quite broken ever since it
417 was made runtime-tunable, which has been fixed.
418 (merge f88b9cb603 jc/gettext-test-fix later to maint).
420 * Test fix on APFS that is incapable of store paths in Latin-1.
421 (merge 3889149619 js/iso8895-test-on-apfs later to maint).
423 * "git submodule foreach <command> --quiet" did not pass the option
424 down correctly, which has been corrected.
425 (merge a282f5a906 nd/submodule-foreach-quiet later to maint).
427 * "git send-email" has been taught to use quoted-printable when the
428 payload contains carriage-return. The use of the mechanism is in
429 line with the design originally added the codepath that chooses QP
430 when the payload has overly long lines.
431 (merge 74d76a1701 bc/send-email-qp-cr later to maint).
433 * The recently added feature to add addresses that are on
434 anything-by: trailers in 'git send-email' was found to be way too
435 eager and considered nonsense strings as if they can be legitimate
436 beginning of *-by: trailer. This has been tightened.
438 * Builds with gettext broke on recent macOS w/ Homebrew, which
439 seems to have stopped including from /usr/local/include; this
441 (merge 92a1377a2a js/macos-gettext-build later to maint).
443 * Running "git add" on a repository created inside the current
444 repository is an explicit indication that the user wants to add it
445 as a submodule, but when the HEAD of the inner repository is on an
446 unborn branch, it cannot be added as a submodule. Worse, the files
447 in its working tree can be added as if they are a part of the outer
448 repository, which is not what the user wants. These problems are
450 (merge f937bc2f86 km/empty-repo-is-still-a-repo later to maint).
452 * "git cherry-pick" run with the "-x" or the "--signoff" option used
453 to (and more importantly, ought to) clean up the commit log message
454 with the --cleanup=space option by default, but this has been
455 broken since late 2017. This has been fixed.
457 * When given a tag that points at a commit-ish, "git replace --graft"
458 failed to peel the tag before writing a replace ref, which did not
459 make sense because the old graft mechanism the feature wants to
460 mimic only allowed to replace one commit object with another.
462 (merge ee521ec4cb cc/replace-graft-peel-tags later to maint).
464 * Code tightening against a "wrong" object appearing where an object
465 of a different type is expected, instead of blindly assuming that
466 the connection between objects are correctly made.
467 (merge 97dd512af7 tb/unexpected later to maint).
469 * An earlier update for MinGW and Cygwin accidentally broke MSVC build,
470 which has been fixed.
471 (merge 22c3634c0f ss/msvc-path-utils-fix later to maint).
473 * %(push:track) token used in the --format option to "git
474 for-each-ref" and friends was not showing the right branch, which
476 (merge c646d0934e dr/ref-filter-push-track-fix later to maint).
478 * "make check-docs", "git help -a", etc. did not account for cases
479 where a particular build may deliberately omit some subcommands,
480 which has been corrected.
482 * The logic to tell if a Git repository has a working tree protects
483 "git branch -D" from removing the branch that is currently checked
484 out by mistake. The implementation of this logic was broken for
485 repositories with unusual name, which unfortunately is the norm for
486 submodules these days. This has been fixed.
487 (merge f3534c98e4 jt/submodule-repo-is-with-worktree later to maint).
489 * AIX shared the same build issues with other BSDs around fileno(fp),
490 which has been corrected.
491 (merge ee662bf5c6 cc/aix-has-fileno-as-a-macro later to maint).
493 * The autoconf generated configure script failed to use the right
494 gettext() implementations from -libintl by ignoring useless stub
495 implementations shipped in some C library, which has been
497 (merge b71e56a683 vk/autoconf-gettext later to maint).
499 * Fix index-pack perf test so that the repeated invocations always
500 run in an empty repository, which emulates the initial clone
502 (merge 775c71e16d jk/p5302-avoid-collision-check-cost later to maint).
504 * A "ls-files" that emulates "find" to enumerate files in the working
505 tree resulted in duplicated Makefile rules that caused the build to
506 issue an unnecessary warning during a trial build after merge
507 conflicts are resolved in working tree *.h files but before the
508 resolved results are added to the index. This has been corrected.
510 * "git cherry-pick" (and "revert" that shares the same runtime engine)
511 that deals with multiple commits got confused when the final step
512 gets stopped with a conflict and the user concluded the sequence
513 with "git commit". Attempt to fix it by cleaning up the state
514 files used by these commands in such a situation.
515 (merge 4a72486de9 pw/clean-sequencer-state-upon-final-commit later to maint).
517 * On a filesystem like HFS+, the names of the refs stored as filesystem
518 entities may become different from what the end-user expects, just
519 like files in the working tree get "renamed". Work around the
520 mismatch by paying attention to the core.precomposeUnicode
522 (merge 8e712ef6fc en/unicode-in-refnames later to maint).
524 * The code to generate the multi-pack idx file was not prepared to
525 see too many packfiles and ran out of open file descriptor, which
528 * To run tests for Git SVN, our scripts for CI used to install the
529 git-svn package (in the hope that it would bring in the right
530 dependencies). This has been updated to install the more direct
531 dependency, namely, libsvn-perl.
532 (merge db864306cf sg/ci-libsvn-perl later to maint).
534 * "git cvsexportcommit" running on msys did not expect cvsnt showed
535 "cvs status" output with CRLF line endings.
537 * The fsmonitor interface got out of sync after the in-core index
538 file gets discarded, which has been corrected.
539 (merge 398a3b0899 js/fsmonitor-refresh-after-discarding-index later to maint).
541 * "git status" did not know that the "label" instruction in the
542 todo-list "rebase -i -r" uses should not be shown as a hex object
545 * A prerequisite check in the test suite to see if a working jgit is
546 available was made more robust.
547 (merge abd0f28983 tz/test-lib-check-working-jgit later to maint).
549 * The codepath to parse :<path> that obtains the object name for an
550 indexed object has been made more robust.
552 * Code cleanup, docfix, build fix, etc.
553 (merge 11f470aee7 jc/test-yes-doc later to maint).
554 (merge 90503a240b js/doc-symref-in-proto-v1 later to maint).
555 (merge 5c326d1252 jk/unused-params later to maint).
556 (merge 68cabbfda3 dl/doc-submodule-wo-subcommand later to maint).
557 (merge 9903623761 ab/receive-pack-use-after-free-fix later to maint).
558 (merge 1ede45e44b en/merge-options-doc later to maint).
559 (merge 3e14dd2c8e rd/doc-hook-used-in-sample later to maint).
560 (merge c271dc28fd nd/no-more-check-racy later to maint).
561 (merge e6e15194a8 yb/utf-16le-bom-spellfix later to maint).
562 (merge bb101aaf0c rd/attr.c-comment-typofix later to maint).
563 (merge 716a5af812 rd/gc-prune-doc-fix later to maint).
564 (merge 50b206371d js/untravis-windows later to maint).
565 (merge dbf47215e3 js/rebase-recreate-merge later to maint).
566 (merge 56cb2d30f8 dl/reset-doc-no-wrt-abbrev later to maint).
567 (merge 64eca306a2 ja/dir-rename-doc-markup-fix later to maint).
568 (merge af91b0230c dl/ignore-docs later to maint).
569 (merge 59a06e947b ra/t3600-test-path-funcs later to maint).
570 (merge e041d0781b ar/t4150-remove-cruft later to maint).
571 (merge 8d75a1d183 ma/asciidoctor-fixes-more later to maint).
572 (merge 74cc547b0f mh/pack-protocol-doc-fix later to maint).
573 (merge ed31851fa6 ab/doc-misc-typofixes later to maint).
574 (merge a7256debd4 nd/checkout-m-doc-update later to maint).
575 (merge 3a9e1ad78d jt/t5551-protocol-v2-does-not-have-half-auth later to maint).
576 (merge 0b918b75af sg/t5318-cleanup later to maint).
577 (merge 68ed71b53c cb/doco-mono later to maint).
578 (merge a34dca2451 nd/interpret-trailers-docfix later to maint).
579 (merge cf7b857a77 en/fast-import-parsing-fix later to maint).
580 (merge fe61ccbc35 po/rerere-doc-fmt later to maint).
581 (merge ffea0248bf po/describe-not-necessarily-7 later to maint).
582 (merge 7cb7283adb tg/ls-files-debug-format-fix later to maint).
583 (merge f64a21bd82 tz/doc-apostrophe-no-longer-needed later to maint).
584 (merge dbe7b41019 js/t3301-unbreak-notes-test later to maint).
585 (merge d8083e4180 km/t3000-retitle later to maint).
586 (merge 9e4cbccbd7 tz/git-svn-doc-markup-fix later to maint).
587 (merge da9ca955a7 jk/ls-files-doc-markup-fix later to maint).
588 (merge 6804ba3a58 cw/diff-highlight later to maint).
589 (merge 1a8787144d nd/submodule-helper-incomplete-line-fix later to maint).
590 (merge d9ef573837 jk/apache-lsan later to maint).
591 (merge c871fbee2b js/t6500-use-windows-pid-on-mingw later to maint).
592 (merge ce4c7bfc90 bl/t4253-exit-code-from-format-patch later to maint).
593 (merge 397a46db78 js/t5580-unc-alternate-test later to maint).
594 (merge d4907720a2 cm/notes-comment-fix later to maint).
595 (merge 9dde06de13 cb/http-push-null-in-message-fix later to maint).
596 (merge 4c785c0edc js/rebase-config-bitfix later to maint).
597 (merge 8e9fe16c87 es/doc-gitsubmodules-markup later to maint).