Merge branch 'mh/packed-ref-store'
[git/git.git] / Documentation / RelNotes / 2.14.0.txt
1 Git 2.14 Release Notes
2 ======================
3
4 Backward compatibility notes and other notable changes.
5
6 * Use of an empty string as a pathspec element that is used for
7 'everything matches' is still warned and Git asks users to use a
8 more explicit '.' for that instead. The hope is that existing
9 users will not mind this change, and eventually the warning can be
10 turned into a hard error, upgrading the deprecation into removal of
11 this (mis)feature. That is not scheduled to happen in the upcoming
12 release (yet).
13
14 * Git now avoids blindly falling back to ".git" when the setup
15 sequence said we are _not_ in Git repository. A corner case that
16 happens to work right now may be broken by a call to die("BUG").
17 We've tried hard to locate such cases and fixed them, but there
18 might still be cases that need to be addressed--bug reports are
19 greatly appreciated.
20
21 * The experiment to improve the hunk-boundary selection of textual
22 diff output has finished, and the "indent heuristics" has now
23 become the default.
24
25 * Git can now be built with PCRE v2 instead of v1 of the PCRE
26 library. Replace USE_LIBPCRE=YesPlease with USE_LIBPCRE2=YesPlease
27 in existing build scripts to build against the new version. As the
28 upstream PCRE maintainer has abandoned v1 maintenance for all but
29 the most critical bug fixes, use of v2 is recommended.
30
31
32 Updates since v2.13
33 -------------------
34
35 UI, Workflows & Features
36
37 * The colors in which "git status --short --branch" showed the names
38 of the current branch and its remote-tracking branch are now
39 configurable.
40
41 * "git clone" learned the "--no-tags" option not to fetch all tags
42 initially, and also set up the tagopt not to follow any tags in
43 subsequent fetches.
44
45 * "git archive --format=zip" learned to use zip64 extension when
46 necessary to go beyond the 4GB limit.
47
48 * "git reset" learned "--recurse-submodules" option.
49
50 * "git diff --submodule=diff" now recurses into nested submodules.
51
52 * "git repack" learned to accept the --threads=<n> option and pass it
53 to pack-objects.
54
55 * "git send-email" learned to run sendemail-validate hook to inspect
56 and reject a message before sending it out.
57
58 * There is no good reason why "git fetch $there $sha1" should fail
59 when the $sha1 names an object at the tip of an advertised ref,
60 even when the other side hasn't enabled allowTipSHA1InWant.
61
62 * The "[includeIf "gitdir:$dir"] path=..." mechanism introduced in
63 2.13.0 would canonicalize the path of the gitdir being matched,
64 and did not match e.g. "gitdir:~/work/*" against a repo in
65 "~/work/main" if "~/work" was a symlink to "/mnt/storage/work".
66 Now we match both the resolved canonical path and what "pwd" would
67 show. The include will happen if either one matches.
68
69 * The "indent" heuristics is now the default in "diff". The
70 diff.indentHeuristic configuration variable can be set to "false"
71 for those who do not want it.
72
73 * Many commands learned to pay attention to submodule.recurse
74 configuration.
75
76 * The convention for a command line is to follow "git cmdname
77 --options" with revisions followed by an optional "--"
78 disambiguator and then finally pathspecs. When "--" is not there,
79 we make sure early ones are all interpretable as revs (and do not
80 look like paths) and later ones are the other way around. A
81 pathspec with "magic" (e.g. ":/p/a/t/h" that matches p/a/t/h from
82 the top-level of the working tree, no matter what subdirectory you
83 are working from) are conservatively judged as "not a path", which
84 required disambiguation more often. The command line parser
85 learned to say "it's a pathspec" a bit more often when the syntax
86 looks like so.
87
88 * Update "perl-compatible regular expression" support to enable JIT
89 and also allow linking with the newer PCRE v2 library.
90
91 * "filter-branch" learned a pseudo filter "--setup" that can be used
92 to define common functions/variables that can be used by other
93 filters.
94
95 * Using "git add d/i/r" when d/i/r is the top of the working tree of
96 a separate repository would create a gitlink in the index, which
97 would appear as a not-quite-initialized submodule to others. We
98 learned to give warnings when this happens.
99
100 * "git status" learned to optionally give how many stash entries there
101 are in its output.
102
103 * "git status" has long shown essentially the same message as "git
104 commit"; the message it gives while preparing for the root commit,
105 i.e. "Initial commit", was hard to understand for some new users.
106 Now it says "No commits yet" to stress more on the current status
107 (rather than the commit the user is preparing for, which is more in
108 line with the focus of "git commit").
109
110 * "git send-email" now has --batch-size and --relogin-delay options
111 which can be used to overcome limitations on SMTP servers that
112 restrict on how many of e-mails can be sent in a single session.
113
114 * An old message shown in the commit log template was removed, as it
115 has outlived its usefulness.
116
117 * "git pull --rebase --recurse-submodules" learns to rebase the
118 branch in the submodules to an updated base.
119
120 * "git log" learned -P as a synonym for --perl-regexp, "git grep"
121 already had such a synonym.
122
123 * "git log" didn't understand --regexp-ignore-case when combined with
124 --perl-regexp. This has been fixed.
125
126 Performance, Internal Implementation, Development Support etc.
127
128 * The default packed-git limit value has been raised on larger
129 platforms to save "git fetch" from a (recoverable) failure while
130 "gc" is running in parallel.
131
132 * Code to update the cache-tree has been tightened so that we won't
133 accidentally write out any 0{40} entry in the tree object.
134
135 * Attempt to allow us notice "fishy" situation where we fail to
136 remove the temporary directory used during the test.
137
138 * Travis CI gained a task to format the documentation with both
139 AsciiDoc and AsciiDoctor.
140
141 * Some platforms have ulong that is smaller than time_t, and our
142 historical use of ulong for timestamp would mean they cannot
143 represent some timestamp that the platform allows. Invent a
144 separate and dedicated timestamp_t (so that we can distingiuish
145 timestamps and a vanilla ulongs, which along is already a good
146 move), and then declare uintmax_t is the type to be used as the
147 timestamp_t.
148
149 * We can trigger Windows auto-build tester (credits: Dscho &
150 Microsoft) from our existing Travis CI tester now.
151
152 * Conversion from uchar[20] to struct object_id continues.
153
154 * Simplify parse_pathspec() codepath and stop it from looking at the
155 default in-core index.
156
157 * Add perf-test for wildmatch.
158
159 * Code from "conversion using external process" codepath has been
160 extracted to a separate sub-process.[ch] module.
161
162 * When "git checkout", "git merge", etc. manipulates the in-core
163 index, various pieces of information in the index extensions are
164 discarded from the original state, as it is usually not the case
165 that they are kept up-to-date and in-sync with the operation on the
166 main index. The untracked cache extension is copied across these
167 operations now, which would speed up "git status" (as long as the
168 cache is properly invalidated).
169
170 * The internal implementation of "git grep" has seen some clean-up.
171
172 * Update the C style recommendation for notes for translators, as
173 recent versions of gettext tools can work with our style of
174 multi-line comments.
175
176 * The implementation of "ref" API around the "packed refs" have been
177 cleaned up, in preparation for further changes.
178
179 * The internal logic used in "git blame" has been libified to make it
180 easier to use by cgit.
181
182 * Our code often opens a path to an optional file, to work on its
183 contents when we can successfully open it. We can ignore a failure
184 to open if such an optional file does not exist, but we do want to
185 report a failure in opening for other reasons (e.g. we got an I/O
186 error, or the file is there, but we lack the permission to open).
187
188 The exact errors we need to ignore are ENOENT (obviously) and
189 ENOTDIR (less obvious). Instead of repeating comparison of errno
190 with these two constants, introduce a helper function to do so.
191
192 * We often try to open a file for reading whose existence is
193 optional, and silently ignore errors from open/fopen; report such
194 errors if they are not due to missing files.
195
196 * When an existing repository is used for t/perf testing, we first
197 create bit-for-bit copy of it, which may grab a transient state of
198 the repository and freeze it into the repository used for testing,
199 which then may cause Git operations to fail. Single out "the index
200 being locked" case and forcibly drop the lock from the copy.
201
202 * Three instances of the same helper function have been consolidated
203 to one.
204
205 * "fast-import" uses a default pack chain depth that is consistent
206 with other parts of the system.
207
208 * A new test to show the interaction between the pattern [^a-z]
209 (which matches '/') and a slash in a path has been added. The
210 pattern should not match the slash with "pathmatch", but should
211 with "wildmatch".
212
213 * The 'diff-highlight' program (in contrib/) has been restructured
214 for easier reuse by an external project 'diff-so-fancy'.
215
216 * A common pattern to free a piece of memory and assign NULL to the
217 pointer that used to point at it has been replaced with a new
218 FREE_AND_NULL() macro.
219
220 * Traditionally, the default die() routine had a code to prevent it
221 from getting called multiple times, which interacted badly when a
222 threaded program used it (one downside is that the real error may
223 be hidden and instead the only error message given to the user may
224 end up being "die recursion detected", which is not very useful).
225
226 * Introduce a "repository" object to eventually make it easier to
227 work in multiple repositories (the primary focus is to work with
228 the superproject and its submodules) in a single process.
229
230 * Optimize "what are the object names already taken in an alternate
231 object database?" query that is used to derive the length of prefix
232 an object name is uniquely abbreviated to.
233
234 * The hashmap API has been updated so that data to customize the
235 behaviour of the comparison function can be specified at the time a
236 hashmap is initialized.
237
238 * The "collision detecting" SHA-1 implementation shipped with 2.13 is
239 now integrated into git.git as a submodule (the first submodule to
240 ship with git.git). Clone git.git with --recurse-submodules to get
241 it. For now a non-submodule copy of the same code is also shipped
242 as part of the tree.
243
244 * A recent update made it easier to use "-fsanitize=" option while
245 compiling but supported only one sanitize option. Allow more than
246 one to be combined, joined with a comma, like "make SANITIZE=foo,bar".
247
248 * Use "p4 -G" to make "p4 changes" output more Python-friendly
249 to parse.
250
251 * We started using "%" PRItime, imitating "%" PRIuMAX and friends, as
252 a way to format the internal timestamp value, but this does not
253 play well with gettext(1) i18n framework, and causes "make pot"
254 that is run by the l10n coordinator to create a broken po/git.pot
255 file. This is a possible workaround for that problem.
256
257 * It turns out that Cygwin also needs the fopen() wrapper that
258 returns failure when a directory is opened for reading.
259
260 Also contains various documentation updates and code clean-ups.
261
262
263 Fixes since v2.13
264 -----------------
265
266 Unless otherwise noted, all the fixes since v2.13 in the maintenance
267 track are contained in this release (see the maintenance releases'
268 notes for details).
269
270 * "git gc" did not interact well with "git worktree"-managed
271 per-worktree refs.
272
273 * "git cherry-pick" and other uses of the sequencer machinery
274 mishandled a trailer block whose last line is an incomplete line.
275 This has been fixed so that an additional sign-off etc. are added
276 after completing the existing incomplete line.
277
278 * The codepath in "git am" that is used when running "git rebase"
279 leaked memory held for the log message of the commits being rebased.
280
281 * "git clone --config var=val" is a way to populate the
282 per-repository configuration file of the new repository, but it did
283 not work well when val is an empty string. This has been fixed.
284
285 * Setting "log.decorate=false" in the configuration file did not take
286 effect in v2.13, which has been corrected.
287
288 * A few codepaths in "checkout" and "am" working on an unborn branch
289 tried to access an uninitialized piece of memory.
290
291 * The Web interface to gmane news archive is long gone, even though
292 the articles are still accessible via NTTP. Replace the links with
293 ones to public-inbox.org. Because their message identification is
294 based on the actual message-id, it is likely that it will be easier
295 to migrate away from it if/when necessary.
296
297 * The receive-pack program now makes sure that the push certificate
298 records the same set of push options used for pushing.
299
300 * Tests have been updated to pass under GETTEXT_POISON (a mechanism
301 to ensure that output strings that should not be translated are
302 not translated by mistake), and TravisCI is told to run them.
303
304 * "git checkout --recurse-submodules" did not quite work with a
305 submodule that itself has submodules.
306
307 * "pack-objects" can stream a slice of an existing packfile out when
308 the pack bitmap can tell that the reachable objects are all needed
309 in the output, without inspecting individual objects. This
310 strategy however would not work well when "--local" and other
311 options are in use, and need to be disabled.
312
313 * Fix memory leaks pointed out by Coverity (and people).
314
315 * "git read-tree -m" (no tree-ish) gave a nonsense suggestion "use
316 --empty if you want to clear the index". With "-m", such a request
317 will still fail anyway, as you'd need to name at least one tree-ish
318 to be merged.
319
320 * Make sure our tests would pass when the sources are checked out
321 with "platform native" line ending convention by default on
322 Windows. Some "text" files out tests use and the test scripts
323 themselves that are meant to be run with /bin/sh, ought to be
324 checked out with eol=LF even on Windows.
325
326 * Introduce the BUG() macro to improve die("BUG: ...").
327
328 * Clarify documentation for include.path and includeIf.<condition>.path
329 configuration variables.
330
331 * Git sometimes gives an advice in a rhetorical question that does
332 not require an answer, which can confuse new users and non native
333 speakers. Attempt to rephrase them.
334
335 * A few http:// links that are redirected to https:// in the
336 documentation have been updated to https:// links.
337
338 * "git for-each-ref --format=..." with %(HEAD) in the format used to
339 resolve the HEAD symref as many times as it had processed refs,
340 which was wasteful, and "git branch" shared the same problem.
341
342 * Regression fix to topic recently merged to 'master'.
343
344 * The shell completion script (in contrib/) learned "git stash" has
345 a new "push" subcommand.
346
347 * "git interpret-trailers", when used as GIT_EDITOR for "git commit
348 -v", looked for and appended to a trailer block at the very end,
349 i.e. at the end of the "diff" output. The command has been
350 corrected to pay attention to the cut-mark line "commit -v" adds to
351 the buffer---the real trailer block should appear just before it.
352
353 * A test allowed both "git push" and "git receive-pack" on the other
354 end write their traces into the same file. This is OK on platforms
355 that allows atomically appending to a file opened with O_APPEND,
356 but on other platforms led to a mangled output, causing
357 intermittent test failures. This has been fixed by disabling
358 traces from "receive-pack" in the test.
359
360 * Tag objects, which are not reachable from any ref, that point at
361 missing objects were mishandled by "git gc" and friends (they
362 should silently be ignored instead)
363
364 * "git describe --contains" penalized light-weight tags so much that
365 they were almost never considered. Instead, give them about the
366 same chance to be considered as an annotated tag that is the same
367 age as the underlying commit would.
368
369 * The "run-command" API implementation has been made more robust
370 against dead-locking in a threaded environment.
371
372 * A recent update to t5545-push-options.sh started skipping all the
373 tests in the script when a web server testing is disabled or
374 unavailable, not just the ones that require a web server. Non HTTP
375 tests have been salvaged to always run in this script.
376
377 * "git send-email" now uses Net::SMTP::SSL, which is obsolete, only
378 when needed. Recent versions of Net::SMTP can do TLS natively.
379
380 * "foo\bar\baz" in "git fetch foo\bar\baz", even though there is no
381 slashes in it, cannot be a nickname for a remote on Windows, as
382 that is likely to be a pathname on a local filesystem.
383
384 * "git clean -d" used to clean directories that has ignored files,
385 even though the command should not lose ignored ones without "-x".
386 "git status --ignored" did not list ignored and untracked files
387 without "-uall". These have been corrected.
388
389 * The result from "git diff" that compares two blobs, e.g. "git diff
390 $commit1:$path $commit2:$path", used to be shown with the full
391 object name as given on the command line, but it is more natural to
392 use the $path in the output and use it to look up .gitattributes.
393
394 * The "collision detecting" SHA-1 implementation shipped with 2.13
395 was quite broken on some big-endian platforms and/or platforms that
396 do not like unaligned fetches. Update to the upstream code which
397 has already fixed these issues.
398
399 * "git am -h" triggered a BUG().
400
401 * The interaction of "url.*.insteadOf" and custom URL scheme's
402 whitelisting is now documented better.
403
404 * The timestamp of the index file is now taken after the file is
405 closed, to help Windows, on which a stale timestamp is reported by
406 fstat() on a file that is opened for writing and data was written
407 but not yet closed.
408
409 * "git pull --rebase --autostash" didn't auto-stash when the local history
410 fast-forwards to the upstream.
411
412 * A flaky test has been corrected.
413
414 * "git $cmd -h" for builtin commands calls the implementation of the
415 command (i.e. cmd_$cmd() function) without doing any repository
416 set-up, and the commands that expect RUN_SETUP is done by the Git
417 potty needs to be prepared to show the help text without barfing.
418 (merge d691551192 jk/consistent-h later to maint).
419
420 * Help contributors that visit us at GitHub.
421
422 * "git stash push <pathspec>" did not work from a subdirectory at all.
423 Bugfix for a topic in v2.13
424
425 * As there is no portable way to pass timezone information to
426 strftime, some output format from "git log" and friends are
427 impossible to produce. Teach our own strbuf_addftime to replace %z
428 and %Z with caller-supplied values to help working around this.
429 (merge 6eced3ec5e rs/strbuf-addftime-zZ later to maint).
430
431 * "git mergetool" learned to work around a wrapper MacOS X adds
432 around underlying meld.
433
434 * An example in documentation that does not work in multi worktree
435 configuration has been corrected.
436
437 * The pretty-format specifiers like '%h', '%t', etc. had an
438 optimization that no longer works correctly. In preparation/hope
439 of getting it correctly implemented, first discard the optimization
440 that is broken.
441
442 * The code to pick up and execute command alias definition from the
443 configuration used to switch to the top of the working tree and
444 then come back when the expanded alias was executed, which was
445 unnecessarilyl complex. Attempt to simplify the logic by using the
446 early-config mechanism that does not chdir around.
447
448 * Fix configuration codepath to pay proper attention to commondir
449 that is used in multi-worktree situation, and isolate config API
450 into its own header file.
451 (merge dc8441fdb4 bw/config-h later to maint).
452
453 * "git add -p" were updated in 2.12 timeframe to cope with custom
454 core.commentchar but the implementation was buggy and a
455 metacharacter like $ and * did not work.
456
457 * A recent regression in "git rebase -i" has been fixed and tests
458 that would have caught it and others have been added.
459
460 * An unaligned 32-bit access in pack-bitmap code has been corrected.
461
462 * Tighten error checks for invalid "git apply" input.
463
464 * The split index code did not honor core.sharedRepository setting
465 correctly.
466
467 * The Makefile rule in contrib/subtree for building documentation
468 learned to honour USE_ASCIIDOCTOR just like the main documentation
469 set does.
470
471 * Code clean-up to fix possible buffer over-reading.
472
473 * A few tests that tried to verify the contents of push certificates
474 did not use 'git rev-parse' to formulate the line to look for in
475 the certificate correctly.
476
477 * Update the character width tables.
478
479 * After "git branch --move" of the currently checked out branch, the
480 code to walk the reflog of HEAD via "log -g" and friends
481 incorrectly stopped at the reflog entry that records the renaming
482 of the branch.
483
484 * The rewrite of "git branch --list" using for-each-ref's internals
485 that happened in v2.13 regressed its handling of color.branch.local;
486 this has been fixed.
487
488 * The build procedure has been improved to allow building and testing
489 Git with address sanitizer more easily.
490 (merge 425ca6710b jk/build-with-asan later to maint).
491
492 * On Cygwin, similar to Windows, "git push //server/share/repository"
493 ought to mean a repository on a network share that can be accessed
494 locally, but this did not work correctly due to stripping the double
495 slashes at the beginning.
496
497 * The progress meter did not give a useful output when we haven't had
498 0.5 seconds to measure the throughput during the interval. Instead
499 show the overall throughput rate at the end, which is a much more
500 useful number.
501
502 * Code clean-up, that makes us in sync with Debian by one patch.
503
504 * We run an early part of "git gc" that deals with refs before
505 daemonising (and not under lock) even when running a background
506 auto-gc, which caused multiple gc processes attempting to run the
507 early part at the same time. This is now prevented by running the
508 early part also under the GC lock.
509
510 * A recent update broke an alias that contained an uppercase letter.
511
512 * Other minor doc, test and build updates and code cleanups.
513 (merge 5053313562 rs/urlmatch-cleanup later to maint).
514 (merge 42c78a216e rs/use-div-round-up later to maint).
515 (merge 5e8d2729ae rs/wt-status-cleanup later to maint).
516 (merge bc9b7e207f as/diff-options-grammofix later to maint).
517 (merge ac05222b31 ah/patch-id-doc later to maint).