Merge branch 'ab/checkout-default-remote'
[git.git] / Documentation / RelNotes / 2.19.0.txt
blob8f8da9f9c84a91e746cdbe168eb4fa72a4fac780
1 Git 2.19 Release Notes
2 ======================
4 Updates since v2.18
5 -------------------
7 UI, Workflows & Features
9  * "git diff" compares the index and the working tree.  For paths
10    added with intent-to-add bit, the command shows the full contents
11    of them as added, but the paths themselves were not marked as new
12    files.  They are now shown as new by default.
14    "git apply" learned the "--intent-to-add" option so that an
15    otherwise working-tree-only application of a patch will add new
16    paths to the index marked with the "intent-to-add" bit.
18  * "git grep" learned the "--column" option that gives not just the
19    line number but the column number of the hit.
21  * The "-l" option in "git branch -l" is an unfortunate short-hand for
22    "--create-reflog", but many users, both old and new, somehow expect
23    it to be something else, perhaps "--list".  This step warns when "-l"
24    is used as a short-hand for "--create-reflog" and warns about the
25    future repurposing of the it when it is used.
27  * The userdiff pattern for .php has been updated.
29  * The content-transfer-encoding of the message "git send-email" sends
30    out by default was 8bit, which can cause trouble when there is an
31    overlong line to bust RFC 5322/2822 limit.  A new option 'auto' to
32    automatically switch to quoted-printable when there is such a line
33    in the payload has been introduced and is made the default.
35  * "git checkout" and "git worktree add" learned to honor
36    checkout.defaultRemote when auto-vivifying a local branch out of a
37    remote tracking branch in a repository with multiple remotes that
38    have tracking branches that share the same names.
39    (merge 8d7b558bae ab/checkout-default-remote later to maint).
41  * "git grep" learned the "--only-matching" option.
43  * "git rebase --rebase-merges" mode now handles octopus merges as
44    well.
46  * Add a server-side knob to skip commits in exponential/fibbonacci
47    stride in an attempt to cover wider swath of history with a smaller
48    number of iterations, potentially accepting a larger packfile
49    transfer, instead of going back one commit a time during common
50    ancestor discovery during the "git fetch" transaction.
51    (merge 42cc7485a2 jt/fetch-negotiator-skipping later to maint).
53  * A new configuration variable core.usereplacerefs has been added,
54    primarily to help server installations that want to ignore the
55    replace mechanism altogether.
57  * Teach "git tag -s" etc. a few configuration variables (gpg.format
58    that can be set to "openpgp" or "x509", and gpg.<format>.program
59    that is used to specify what program to use to deal with the format)
60    to allow x.509 certs with CMS via "gpgsm" to be used instead of
61    openpgp via "gnupg".
63  * Many more strings are prepared for l10n.
65  * "git p4 submit" learns to ask its own pre-submit hook if it should
66    continue with submitting.
68  * The test performed at the receiving end of "git push" to prevent
69    bad objects from entering repository can be customized via
70    receive.fsck.* configuration variables; we now have gained a
71    counterpart to do the same on the "git fetch" side, with
72    fetch.fsck.* configuration variables.
74  * "git pull --rebase=interactive" learned "i" as a short-hand for
75    "interactive".
77 Performance, Internal Implementation, Development Support etc.
79  * The bulk of "git submodule foreach" has been rewritten in C.
81  * The in-core "commit" object had an all-purpose "void *util" field,
82    which was tricky to use especially in library-ish part of the
83    code.  All of the existing uses of the field has been migrated to a
84    more dedicated "commit-slab" mechanism and the field is eliminated.
86  * A less often used command "git show-index" has been modernized.
87    (merge fb3010c31f jk/show-index later to maint).
89  * The conversion to pass "the_repository" and then "a_repository"
90    throughout the object access API continues.
92  * Continuing with the idea to programatically enumerate various
93    pieces of data required for command line completion, teach the
94    codebase to report the list of configuration variables
95    subcommands care about to help complete them.
97  * Separate "rebase -p" codepath out of "rebase -i" implementation to
98    slim down the latter and make it easier to manage.
100  * Make refspec parsing codepath more robust.
102  * Some flaky tests have been fixed.
104  * Continuing with the idea to programmatically enumerate various
105    pieces of data required for command line completion, the codebase
106    has been taught to enumerate options prefixed with "--no-" to
107    negate them.
109  * Build and test procedure for netrc credential helper (in contrib/)
110    has been updated.
112  * The conversion to pass "the_repository" and then "a_repository"
113    throughout the object access API continues.
115  * Remove unused function definitions and declarations from ewah
116    bitmap subsystem.
118  * Code preparation to make "git p4" closer to be usable with Python 3.
120  * Tighten the API to make it harder to misuse in-tree .gitmodules
121    file, even though it shares the same syntax with configuration
122    files, to read random configuration items from it.
124  * "git fast-import" has been updated to avoid attempting to create
125    delta against a zero-byte-long string, which is pointless.
127  * The codebase has been updated to compile cleanly with -pedantic
128    option.
129    (merge 2b647a05d7 bb/pedantic later to maint).
131  * The character display width table has been updated to match the
132    latest Unicode standard.
133    (merge 570951eea2 bb/unicode-11-width later to maint).
135  * test-lint now looks for broken use of "VAR=VAL shell_func" in test
136    scripts.
138  * Conversion from uchar[40] to struct object_id continues.
140  * Recent "security fix" to pay attention to contents of ".gitmodules"
141    while accepting "git push" was a bit overly strict than necessary,
142    which has been adjusted.
144  * "git fsck" learns to make sure the optional commit-graph file is in
145    a sane state.
147  * "git diff --color-moved" feature has further been tweaked.
149  * Code restructuring and a small fix to transport protocol v2 during
150    fetching.
152  * Parsing of -L[<N>][,[<M>]] parameters "git blame" and "git log"
153    take has been tweaked.
155  * lookup_commit_reference() and friends have been updated to find
156    in-core object for a specific in-core repository instance.
158  * Various glitches in the heuristics of merge-recursive strategy have
159    been documented in new tests.
161  * "git fetch" learned a new option "--negotiation-tip" to limit the
162    set of commits it tells the other end as "have", to reduce wasted
163    bandwidth and cycles, which would be helpful when the receiving
164    repository has a lot of refs that have little to do with the
165    history at the remote it is fetching from.
167  * For a large tree, the index needs to hold many cache entries
168    allocated on heap.  These cache entries are now allocated out of a
169    dedicated memory pool to amortize malloc(3) overhead.
171  * Tests to cover various conflicting cases have been added for
172    merge-recursive.
174  * Tests to cover conflict cases that involve submodules have been
175    added for merge-recursive.
177  * Look for broken "&&" chains that are hidden in subshell, many of
178    which have been found and corrected.
180  * The singleton commit-graph in-core instance is made per in-core
181    repository instance.
183  * "make DEVELOPER=1 DEVOPTS=pedantic" allows developers to compile
184    with -pedantic option, which may catch more problematic program
185    constructs and potential bugs.
187  * Preparatory code to later add json output for telemetry data has
188    been added.
190  * Update the way we use Coccinelle to find out-of-style code that
191    need to be modernised.
193  * It is too easy to misuse system API functions such as strcat();
194    these selected functions are now forbidden in this codebase and
195    will cause a compilation failure.
197  * Add a script (in contrib/) to help users of VSCode work better with
198    our codebase.
200  * The Travis CI scripts were taught to ship back the test data from
201    failed tests.
202    (merge aea8879a6a sg/travis-retrieve-trash-upon-failure later to maint).
204  * The parse-options machinery learned to refrain from enclosing
205    placeholder string inside a "<bra" and "ket>" pair automatically
206    without PARSE_OPT_LITERAL_ARGHELP.  Existing help text for option
207    arguments that are not formatted correctly have been identified and
208    fixed.
209    (merge 5f0df44cd7 rs/parse-opt-lithelp later to maint).
211  * Noiseword "extern" has been removed from function decls in the
212    header files.
214  * A few atoms like %(objecttype) and %(objectsize) in the format
215    specifier of "for-each-ref --format=<format>" can be filled without
216    getting the full contents of the object, but just with the object
217    header.  These cases have been optimized by calling
218    oid_object_info() API (instead of reading and inspecting the data).
220  * The end result of documentation update has been made to be
221    inspected more easily to help developers.
224 Fixes since v2.18
225 -----------------
227  * "git remote update" can take both a single remote nickname and a
228    nickname for remote groups, and the completion script (in contrib/)
229    has been taught about it.
230    (merge 9cd4382ad5 ls/complete-remote-update-names later to maint).
232  * "git fetch --shallow-since=<cutoff>" that specifies the cut-off
233    point that is newer than the existing history used to end up
234    grabbing the entire history.  Such a request now errors out.
235    (merge e34de73c56 nd/reject-empty-shallow-request later to maint).
237  * Fix for 2.17-era regression around `core.safecrlf`.
238    (merge 6cb09125be as/safecrlf-quiet-fix later to maint).
240  * The recent addition of "partial clone" experimental feature kicked
241    in when it shouldn't, namely, when there is no partial-clone filter
242    defined even if extensions.partialclone is set.
243    (merge cac1137dc4 jh/partial-clone later to maint).
245  * "git send-pack --signed" (hence "git push --signed" over the http
246    transport) did not read user ident from the config mechanism to
247    determine whom to sign the push certificate as, which has been
248    corrected.
249    (merge d067d98887 ms/send-pack-honor-config later to maint).
251  * "git fetch-pack --all" used to unnecessarily fail upon seeing an
252    annotated tag that points at an object other than a commit.
253    (merge c12c9df527 jk/fetch-all-peeled-fix later to maint).
255  * When user edits the patch in "git add -p" and the user's editor is
256    set to strip trailing whitespaces indiscriminately, an empty line
257    that is unchanged in the patch would become completely empty
258    (instead of a line with a sole SP on it).  The code introduced in
259    Git 2.17 timeframe failed to parse such a patch, but now it learned
260    to notice the situation and cope with it.
261    (merge f4d35a6b49 pw/add-p-recount later to maint).
263  * The code to try seeing if a fetch is necessary in a submodule
264    during a fetch with --recurse-submodules got confused when the path
265    to the submodule was changed in the range of commits in the
266    superproject, sometimes showing "(null)".  This has been corrected.
268  * "git submodule" did not correctly adjust core.worktree setting that
269    indicates whether/where a submodule repository has its associated
270    working tree across various state transitions, which has been
271    corrected.
272    (merge 984cd77ddb sb/submodule-core-worktree later to maint).
274  * Bugfix for "rebase -i" corner case regression.
275    (merge a9279c6785 pw/rebase-i-keep-reword-after-conflict later to maint).
277  * Recently added "--base" option to "git format-patch" command did
278    not correctly generate prereq patch ids.
279    (merge 15b76c1fb3 xy/format-patch-prereq-patch-id-fix later to maint).
281  * POSIX portability fix in Makefile to fix a glitch introduced a few
282    releases ago.
283    (merge 6600054e9b dj/runtime-prefix later to maint).
285  * "git filter-branch" when used with the "--state-branch" option
286    still attempted to rewrite the commits whose filtered result is
287    known from the previous attempt (which is recorded on the state
288    branch); the command has been corrected not to waste cycles doing
289    so.
290    (merge 709cfe848a mb/filter-branch-optim later to maint).
292  * Clarify that setting core.ignoreCase to deviate from reality would
293    not turn a case-incapable filesystem into a case-capable one.
294    (merge 48294b512a ms/core-icase-doc later to maint).
296  * "fsck.skipList" did not prevent a blob object listed there from
297    being inspected for is contents (e.g. we recently started to
298    inspect the contents of ".gitmodules" for certain malicious
299    patterns), which has been corrected.
300    (merge fb16287719 rj/submodule-fsck-skip later to maint).
302  * "git checkout --recurse-submodules another-branch" did not report
303    in which submodule it failed to update the working tree, which
304    resulted in an unhelpful error message.
305    (merge ba95d4e4bd sb/submodule-move-head-error-msg later to maint).
307  * "git rebase" behaved slightly differently depending on which one of
308    the three backends gets used; this has been documented and an
309    effort to make them more uniform has begun.
310    (merge b00bf1c9a8 en/rebase-consistency later to maint).
312  * The "--ignore-case" option of "git for-each-ref" (and its friends)
313    did not work correctly, which has been fixed.
314    (merge e674eb2528 jk/for-each-ref-icase later to maint).
316  * "git fetch" failed to correctly validate the set of objects it
317    received when making a shallow history deeper, which has been
318    corrected.
319    (merge cf1e7c0770 jt/connectivity-check-after-unshallow later to maint).
321  * Partial clone support of "git clone" has been updated to correctly
322    validate the objects it receives from the other side.  The server
323    side has been corrected to send objects that are directly
324    requested, even if they may match the filtering criteria (e.g. when
325    doing a "lazy blob" partial clone).
326    (merge a7e67c11b8 jt/partial-clone-fsck-connectivity later to maint).
328  * Handling of an empty range by "git cherry-pick" was inconsistent
329    depending on how the range ended up to be empty, which has been
330    corrected.
331    (merge c5e358d073 jk/empty-pick-fix later to maint).
333  * "git reset --merge" (hence "git merge ---abort") and "git reset --hard"
334    had trouble working correctly in a sparsely checked out working
335    tree after a conflict, which has been corrected.
336    (merge b33fdfc34c mk/merge-in-sparse-checkout later to maint).
338  * Correct a broken use of "VAR=VAL shell_func" in a test.
339    (merge 650161a277 jc/t3404-one-shot-export-fix later to maint).
341  * "git rev-parse ':/substring'" did not consider the history leading
342    only to HEAD when looking for a commit with the given substring,
343    when the HEAD is detached.  This has been fixed.
344    (merge 6b3351e799 wc/find-commit-with-pattern-on-detached-head later to maint).
346  * Build doc update for Windows.
347    (merge ede8d89bb1 nd/command-list later to maint).
349  * core.commentchar is now honored when preparing the list of commits
350    to replay in "rebase -i".
352  * "git pull --rebase" on a corrupt HEAD caused a segfault.  In
353    general we substitute an empty tree object when running the in-core
354    equivalent of the diff-index command, and the codepath has been
355    corrected to do so as well to fix this issue.
356    (merge 3506dc9445 jk/has-uncommitted-changes-fix later to maint).
358  * httpd tests saw occasional breakage due to the way its access log
359    gets inspected by the tests, which has been updated to make them
360    less flaky.
361    (merge e8b3b2e275 sg/httpd-test-unflake later to maint).
363  * Tests to cover more D/F conflict cases have been added for
364    merge-recursive.
366  * "git gc --auto" opens file descriptors for the packfiles before
367    spawning "git repack/prune", which would upset Windows that does
368    not want a process to work on a file that is open by another
369    process.  The issue has been worked around.
370    (merge 12e73a3ce4 kg/gc-auto-windows-workaround later to maint).
372  * The recursive merge strategy did not properly ensure there was no
373    change between HEAD and the index before performing its operation,
374    which has been corrected.
375    (merge 55f39cf755 en/dirty-merge-fixes later to maint).
377  * "git rebase" started exporting GIT_DIR environment variable and
378    exposing it to hook scripts when part of it got rewritten in C.
379    Instead of matching the old scripted Porcelains' behaviour,
380    compensate by also exporting GIT_WORK_TREE environment as well to
381    lessen the damage.  This can harm existing hooks that want to
382    operate on different repository, but the current behaviour is
383    already broken for them anyway.
384    (merge ab5e67d751 bc/sequencer-export-work-tree-as-well later to maint).
386  * "git send-email" when using in a batched mode that limits the
387    number of messages sent in a single SMTP session lost the contents
388    of the variable used to choose between tls/ssl, unable to send the
389    second and later batches, which has been fixed.
390    (merge 636f3d7ac5 jm/send-email-tls-auth-on-batch later to maint).
392  * The lazy clone support had a few places where missing but promised
393    objects were not correctly tolerated, which have been fixed.
395  * One of the "diff --color-moved" mode "dimmed_zebra" that was named
396    in an unusual way has been deprecated and replaced by
397    "dimmed-zebra".
398    (merge e3f2f5f9cd es/diff-color-moved-fix later to maint).
400  * The wire-protocol v2 relies on the client to send "ref prefixes" to
401    limit the bandwidth spent on the initial ref advertisement.  "git
402    clone" when learned to speak v2 forgot to do so, which has been
403    corrected.
404    (merge 402c47d939 bw/clone-ref-prefixes later to maint).
406  * "git diff --histogram" had a bad memory usage pattern, which has
407    been rearranged to reduce the peak usage.
408    (merge 79cb2ebb92 sb/histogram-less-memory later to maint).
410  * Code clean-up to use size_t/ssize_t when they are the right type.
411    (merge 7726d360b5 jk/size-t later to maint).
413  * The wire-protocol v2 relies on the client to send "ref prefixes" to
414    limit the bandwidth spent on the initial ref advertisement.  "git
415    fetch $remote branch:branch" that asks tags that point into the
416    history leading to the "branch" automatically followed sent to
417    narrow prefix and broke the tag following, which has been fixed.
418    (merge 2b554353a5 jt/tag-following-with-proto-v2-fix later to maint).
420  * When the sparse checkout feature is in use, "git cherry-pick" and
421    other mergy operations lost the skip_worktree bit when a path that
422    is excluded from checkout requires content level merge, which is
423    resolved as the same as the HEAD version, without materializing the
424    merge result in the working tree, which made the path appear as
425    deleted.  This has been corrected by preserving the skip_worktree
426    bit (and not materializing the file in the working tree).
427    (merge 2b75fb601c en/merge-recursive-skip-fix later to maint).
429  * The "author-script" file "git rebase -i" creates got broken when
430    we started to move the command away from shell script, which is
431    getting fixed now.
432    (merge 5522bbac20 es/rebase-i-author-script-fix later to maint).
434  * The automatic tree-matching in "git merge -s subtree" was broken 5
435    years ago and nobody has noticed since then, which is now fixed.
436    (merge 2ec4150713 jk/merge-subtree-heuristics later to maint).
438  * "git fetch $there refs/heads/s" ought to fetch the tip of the
439    branch 's', but when "refs/heads/refs/heads/s", i.e. a branch whose
440    name is "refs/heads/s" exists at the same time, fetched that one
441    instead by mistake.  This has been corrected to honor the usual
442    disambiguation rules for abbreviated refnames.
443    (merge 60650a48c0 jt/refspec-dwim-precedence-fix later to maint).
445  * Futureproofing a helper function that can easily be misused.
446    (merge 65bb21e77e es/want-color-fd-defensive later to maint).
448  * The http-backend (used for smart-http transport) used to slurp the
449    whole input until EOF, without paying attention to CONTENT_LENGTH
450    that is supplied in the environment and instead expecting the Web
451    server to close the input stream.  This has been fixed.
452    (merge eebfe40962 mk/http-backend-content-length later to maint).
454  * "git merge --abort" etc. did not clean things up properly when
455    there were conflicted entries in the index in certain order that
456    are involved in D/F conflicts.  This has been corrected.
457    (merge ad3762042a en/abort-df-conflict-fixes later to maint).
459  * "git diff --indent-heuristic" had a bad corner case performance.
460    (merge 301ef85401 sb/indent-heuristic-optim later to maint).
462  * Code cleanup, docfix, build fix, etc.
463    (merge aee9be2ebe sg/update-ref-stdin-cleanup later to maint).
464    (merge 037714252f jc/clean-after-sanity-tests later to maint).
465    (merge 5b26c3c941 en/merge-recursive-cleanup later to maint).
466    (merge 0dcbc0392e bw/config-refer-to-gitsubmodules-doc later to maint).
467    (merge bb4d000e87 bw/protocol-v2 later to maint).
468    (merge 928f0ab4ba vs/typofixes later to maint).
469    (merge d7f590be84 en/rebase-i-microfixes later to maint).
470    (merge 81d395cc85 js/rebase-recreate-merge later to maint).
471    (merge 51d1863168 tz/exclude-doc-smallfixes later to maint).
472    (merge a9aa3c0927 ds/commit-graph later to maint).
473    (merge 5cf8e06474 js/enhanced-version-info later to maint).
474    (merge 6aaded5509 tb/config-default later to maint).
475    (merge 022d2ac1f3 sb/blame-color later to maint).
476    (merge 5a06a20e0c bp/test-drop-caches-for-windows later to maint).
477    (merge dd61cc1c2e jk/ui-color-always-to-auto later to maint).
478    (merge 1e83b9bfdd sb/trailers-docfix later to maint).
479    (merge ab29f1b329 sg/fast-import-dump-refs-on-checkpoint-fix later to maint).
480    (merge 6a8ad880f0 jn/subtree-test-fixes later to maint).
481    (merge ffbd51cc60 nd/pack-objects-threading-doc later to maint).
482    (merge e9dac7be60 es/mw-to-git-chain-fix later to maint).
483    (merge fe583c6c7a rs/remote-mv-leakfix later to maint).
484    (merge 69885ab015 en/t3031-title-fix later to maint).
485    (merge 8578037bed nd/config-blame-sort later to maint).
486    (merge 8ad169c4ba hn/config-in-code-comment later to maint).
487    (merge b7446fcfdf ar/t4150-am-scissors-test-fix later to maint).