Merge branch 'lt/gpg-show-long-key-in-signature-verification'
[git] / Documentation / RelNotes / 2.10.0.txt
1 Git 2.10 Release Notes
2 ======================
3
4 Backward compatibility notes
5 ----------------------------
6
7 Updates since v2.9
8 ------------------
9
10 UI, Workflows & Features
11
12  * "git pull --rebase --verify-signature" learned to warn the user
13    that "--verify-signature" is a no-op when rebasing.
14
15  * An upstream project can make a recommendation to shallowly clone
16    some submodules in the .gitmodules file it ships.
17
18  * "git worktree add" learned that '-' can be used as a short-hand for
19    "@{-1}", the previous branch.
20
21  * Update the funcname definition to support css files.
22
23  * The completion script (in contrib/) learned to complete "git
24    status" options.
25
26  * Messages that are generated by auto gc during "git push" on the
27    receiving end are now passed back to the sending end in such a way
28    that they are shown with "remote: " prefix to avoid confusing the
29    users.
30
31  * "git add -i/-p" learned to honor diff.compactionHeuristic
32    experimental knob, so that the user can work on the same hunk split
33    as "git diff" output.
34
35  * "upload-pack" allows a custom "git pack-objects" replacement when
36    responding to "fetch/clone" via the uploadpack.packObjectsHook.
37    (merge b738396 jk/upload-pack-hook later to maint).
38
39  * Teach format-patch and mailsplit (hence "am") how a line that
40    happens to begin with "From " in the e-mail message is quoted with
41    ">", so that these lines can be restored to their original shape.
42    (merge d9925d1 ew/mboxrd-format-am later to maint).
43
44  * "git repack" learned the "--keep-unreachable" option, which sends
45    loose unreachable objects to a pack instead of leaving them loose.
46    This helps heuristics based on the number of loose objects
47    (e.g. "gc --auto").
48    (merge e26a8c4 jk/repack-keep-unreachable later to maint).
49
50  * "log --graph --format=" learned that "%>|(N)" specifies the width
51    relative to the terminal's left edge, not relative to the area to
52    draw text that is to the right of the ancestry-graph section.  It
53    also now accepts negative N that means the column limit is relative
54    to the right border.
55
56  * A careless invocation of "git send-email directory/" after editing
57    0001-change.patch with an editor often ends up sending both
58    0001-change.patch and its backup file, 0001-change.patch~, causing
59    embarrassment and a minor confusion.  Detect such an input and
60    offer to skip the backup files when sending the patches out.
61    (merge 531220b jc/send-email-skip-backup later to maint).
62
63  * "git submodule update" that drives many "git clone" could
64    eventually hit flaky servers/network conditions on one of the
65    submodules; the command learned to retry the attempt.
66
67  * The output coloring scheme learned two new attributes, italic and
68    strike, in addition to existing bold, reverse, etc.
69
70  * "git log" learns log.showSignature configuration variable, and a
71    command line option "--no-show-signature" to countermand it.
72    (merge fce04c3 mj/log-show-signature-conf later to maint).
73
74  * More markings of messages for i18n, with updates to various tests
75    to pass GETTEXT_POISON tests.
76
77  * "git archive" learned to handle files that are larger than 8GB and
78    commits far in the future than expressible by the traditional US-TAR
79    format.
80    (merge 5caeeb8 jk/big-and-future-archive-tar later to maint).
81
82  * A new configuration variable core.sshCommand has been added to
83    specify what value for GIT_SSH_COMMAND to use per repository.
84
85  * "git worktree prune" protected worktrees that are marked as
86    "locked" by creating a file in a known location.  "git worktree"
87    command learned a dedicated command pair to create and remove such
88    a file, so that the users do not have to do this with editor.
89
90  * A handful of "git svn" updates.
91
92  * "git push" learned to accept and pass extra options to the
93    receiving end so that hooks can read and react to them.
94
95  * "git status" learned to suggest "merge --abort" during a conflicted
96    merge, just like it already suggests "rebase --abort" during a
97    conflicted rebase.
98
99  * "git jump" script (in contrib/) has been updated a bit.
100    (merge a91e692 jk/git-jump later to maint).
101
102  * "git push" and "git clone" learned to give better progress meters
103    to the end user who is waiting on the terminal.
104
105  * An entry "git log --decorate" for the tip of the current branch is
106    shown as "HEAD -> name" (where "name" is the name of the branch);
107    the arrow is now painted in the same color as "HEAD", not in the
108    color for commits.
109
110  * "git format-patch" learned format.from configuration variable to
111    specify the default settings for its "--from" option.
112
113  * "git am -3" calls "git merge-recursive" when it needs to fall back
114    to a three-way merge; this call has been turned into an internal
115    subroutine call instead of spawning a separate subprocess.
116
117  * The command line completion scripts (in contrib/) now knows about
118    "git branch --delete/--move [--remote]".
119    (merge 2703c22 vs/completion-branch-fully-spelled-d-m-r later to maint).
120
121
122 Performance, Internal Implementation, Development Support etc.
123
124  * "git fast-import" learned the same performance trick to avoid
125    creating too small a packfile as "git fetch" and "git push" have,
126    using *.unpackLimit configuration.
127
128  * When "git daemon" is run without --[init-]timeout specified, a
129    connection from a client that silently goes offline can hang around
130    for a long time, wasting resources.  The socket-level KEEPALIVE has
131    been enabled to allow the OS to notice such failed connections.
132
133  * "git upload-pack" command has been updated to use the parse-options
134    API.
135
136  * The "git apply" standalone program is being libified; the first
137    step to move many state variables into a structure that can be
138    explicitly (re)initialized to make the machinery callable more
139    than once has been merged.
140
141  * HTTP transport gained an option to produce more detailed debugging
142    trace.
143    (merge 73e57aa ep/http-curl-trace later to maint).
144
145  * Instead of taking advantage of the fact that a struct string_list
146    that is allocated with all NULs happens to be the INIT_NODUP kind,
147    the users of string_list structures are taught to initialize them
148    explicitly as such, to document their behaviour better.
149    (merge 2721ce2 jk/string-list-static-init later to maint).
150
151  * HTTPd tests learned to show the server error log to help diagnosing
152    a failing tests.
153    (merge 44f243d nd/test-lib-httpd-show-error-log-in-verbose later to maint).
154
155  * The ownership rule for the piece of memory that hold references to
156    be fetched in "git fetch" was screwy, which has been cleaned up.
157
158  * "git bisect" makes an internal call to "git diff-tree" when
159    bisection finds the culprit, but this call did not initialize the
160    data structure to pass to the diff-tree API correctly.
161
162  * Further preparatory clean-up for "worktree" feature continues.
163    (merge 0409e0b nd/worktree-cleanup-post-head-protection later to maint).
164
165  * Formats of the various data (and how to validate them) where we use
166    GPG signature have been documented.
167
168  * A new run-command API function pipe_command() is introduced to
169    sanely feed data to the standard input while capturing data from
170    the standard output and the standard error of an external process,
171    which is cumbersome to hand-roll correctly without deadlocking.
172
173    The codepath to sign data in a prepared buffer with GPG has been
174    updated to use this API to read from the status-fd to check for
175    errors (instead of relying on GPG's exit status).
176    (merge efee955 jk/gpg-interface-cleanup later to maint).
177
178  * Allow t/perf framework to use the features from the most recent
179    version of Git even when testing an older installed version.
180
181  * The commands in the "log/diff" family have had an FILE* pointer in the
182    data structure they pass around for a long time, but some codepaths
183    used to always write to the standard output.  As a preparatory step
184    to make "git format-patch" available to the internal callers, these
185    codepaths have been updated to consistently write into that FILE*
186    instead.
187
188  * Conversion from unsigned char sha1[20] to struct object_id
189    continues.
190
191  * Improve the look of the way "git fetch" reports what happened to
192    each ref that was fetched.
193
194  * The .c/.h sources are marked as such in our .gitattributes file so
195    that "git diff -W" and friends would work better.
196
197  * Code clean-up to avoid using a variable string that compilers may
198    feel untrustable as printf-style format given to write_file()
199    helper function.
200
201  * "git p4" used a location outside $GIT_DIR/refs/ to place its
202    temporary branches, which has been moved to refs/git-p4-tmp/.
203
204  * Existing autoconf generated test for the need to link with pthread
205    library did not check all the functions from pthread libraries;
206    recent FreeBSD has some functions in libc but not others, and we
207    mistakenly thought linking with libc is enough when it is not.
208
209  * When "git fsck" reports a broken link (e.g. a tree object contains
210    a blob that does not exist), both containing object and the object
211    that is referred to were reported with their 40-hex object names.
212    The command learned the "--name-objects" option to show the path to
213    the containing object from existing refs (e.g. "HEAD~24^2:file.txt").
214
215  * Allow http daemon tests in Travis CI tests.
216
217  * Makefile assumed that -lrt is always available on platforms that
218    want to use clock_gettime() and CLOCK_MONOTONIC, which is not a
219    case for recent Mac OS X.  The necessary symbols are often found in
220    libc on many modern systems and having -lrt on the command line, as
221    long as the library exists, had no effect, but when the platform
222    removes librt.a that is a different matter--having -lrt will break
223    the linkage.
224
225    This change could be seen as a regression for those who do need to
226    specify -lrt, as they now specifically ask for NEEDS_LIBRT when
227    building. Hopefully they are in the minority these days.
228
229  * Further preparatory work on the refs API before the pluggable
230    backend series can land.
231
232  * Error handling in the codepaths that updates refs has been
233    improved.
234
235  * The API to iterate over all the refs (i.e. for_each_ref(), etc.)
236    has been revamped.
237
238  * The handling of the "text=auto" attribute has been corrected.
239    $ echo "* text=auto eol=crlf" >.gitattributes
240    used to have the same effect as
241    $ echo "* text eol=crlf" >.gitattributes
242    i.e. declaring all files are text (ignoring "auto").  The
243    combination has been fixed to be equivalent to doing
244    $ git config core.autocrlf true
245
246  * A few tests that specifically target "git rebase -i" have been
247    added.
248
249  * Dumb http transport on the client side has been optimized.
250    (merge ecba195 ew/http-walker later to maint).
251
252  * Users of the parse_options_concat() API function need to allocate
253    extra slots in advance and fill them with OPT_END() when they want
254    to decide the set of supported options dynamically, which makes the
255    code error-prone and hard to read.  This has been corrected by tweaking
256    the API to allocate and return a new copy of "struct option" array.
257
258  * "git fetch" exchanges batched have/ack messages between the sender
259    and the receiver, initially doubling every time and then falling
260    back to enlarge the window size linearly.  The "smart http"
261    transport, being an half-duplex protocol, outgrows the preset limit
262    too quickly and becomes inefficient when interacting with a large
263    repository.  The internal mechanism learned to grow the window size
264    more aggressively when working with the "smart http" transport.
265
266  * Tests for "git svn" have been taught to reuse the lib-httpd test
267    infrastructure when testing the subversion integration that
268    interacts with subversion repositories served over the http://
269    protocol.
270    (merge a8a5d25 ew/git-svn-http-tests later to maint).
271
272  * "git pack-objects" has a few options that tell it not to pack
273    objects found in certain packfiles, which require it to scan .idx
274    files of all available packs.  The codepaths involved in these
275    operations have been optimized for a common case of not having any
276    non-local pack and/or any .kept pack.
277
278  * The t3700 test about "add --chmod=-x" have been made a bit more
279    robust and generally cleaned up.
280    (merge 766cdc4 ib/t3700-add-chmod-x-updates later to maint).
281
282  * The build procedure learned PAGER_ENV knob that lists what default
283    environment variable settings to export for popular pagers.  This
284    mechanism is used to tweak the default settings to MORE on FreeBSD.
285    (merge 995bc22 ew/build-time-pager-tweaks later to maint).
286
287  * The http-backend (the server-side component of smart-http
288    transport) used to trickle the HTTP header one at a time.  Now
289    these write(2)s are batched.
290    (merge b36045c ew/http-backend-batch-headers later to maint).
291
292  * When "git rebase" tries to compare set of changes on the updated
293    upstream and our own branch, it computes patch-id for all of these
294    changes and attempts to find matches. This has been optimized by
295    lazily computing the full patch-id (which is expensive) to be
296    compared only for changes that touch the same set of paths.
297    (merge b3dfeeb kw/patch-ids-optim later to maint).
298
299  * A handful of tests that were broken under gettext-poison build have
300    been fixed.
301
302
303 Also contains various documentation updates and code clean-ups.
304
305
306 Fixes since v2.9
307 ----------------
308
309 Unless otherwise noted, all the fixes since v2.8 in the maintenance
310 track are contained in this release (see the maintenance releases'
311 notes for details).
312
313  * The commands in `git log` family take %C(auto) in a custom format
314    string.  This unconditionally turned the color on, ignoring
315    --no-color or with --color=auto when the output is not connected to
316    a tty; this was corrected to make the format truly behave as
317    "auto".
318
319  * "git rev-list --count" whose walk-length is limited with "-n"
320    option did not work well with the counting optimized to look at the
321    bitmap index.
322
323  * "git show -W" (extend hunks to cover the entire function, delimited
324    by lines that match the "funcname" pattern) used to show the entire
325    file when a change added an entire function at the end of the file,
326    which has been fixed.
327
328  * The documentation set has been updated so that literal commands,
329    configuration variables and environment variables are consistently
330    typeset in fixed-width font and bold in manpages.
331
332  * "git svn propset" subcommand that was added in 2.3 days is
333    documented now.
334
335  * The documentation tries to consistently spell "GPG"; when
336    referring to the specific program name, "gpg" is used.
337
338  * "git reflog" stopped upon seeing an entry that denotes a branch
339    creation event (aka "unborn"), which made it appear as if the
340    reflog was truncated.
341
342  * The git-prompt scriptlet (in contrib/) was not friendly with those
343    who uses "set -u", which has been fixed.
344
345  * compat/regex code did not cleanly compile.
346
347  * A codepath that used alloca(3) to place an unbounded amount of data
348    on the stack has been updated to avoid doing so.
349
350  * "git update-index --add --chmod=+x file" may be usable as an escape
351    hatch, but not a friendly thing to force for people who do need to
352    use it regularly.  "git add --chmod=+x file" can be used instead.
353
354  * Build improvements for gnome-keyring (in contrib/)
355
356  * "git status" used to say "working directory" when it meant "working
357    tree".
358
359  * Comments about misbehaving FreeBSD shells have been clarified with
360    the version number (9.x and before are broken, newer ones are OK).
361
362  * "git cherry-pick A" worked on an unborn branch, but "git
363    cherry-pick A..B" didn't.
364
365  * Fix an unintended regression in v2.9 that breaks "clone --depth"
366    that recurses down to submodules by forcing the submodules to also
367    be cloned shallowly, which many server instances that host upstream
368    of the submodules are not prepared for.
369
370  * Fix unnecessarily waste in the idiomatic use of ': ${VAR=default}'
371    to set the default value, without enclosing it in double quotes.
372
373  * Some platform-specific code had non-ANSI strict declarations of C
374    functions that do not take any parameters, which has been
375    corrected.
376
377  * The internal code used to show local timezone offset is not
378    prepared to handle timestamps beyond year 2100, and gave a
379    bogus offset value to the caller.  Use a more benign looking
380    +0000 instead and let "git log" going in such a case, instead
381    of aborting.
382
383  * One among four invocations of readlink(1) in our test suite has
384    been rewritten so that the test can run on systems without the
385    command (others are in valgrind test framework and t9802).
386
387  * t/perf needs /usr/bin/time with GNU extension; the invocation of it
388    is updated to "gtime" on Darwin.
389
390  * A bug, which caused "git p4" while running under verbose mode to
391    report paths that are omitted due to branch prefix incorrectly, has
392    been fixed; the command said "Ignoring file outside of prefix" for
393    paths that are _inside_.
394
395  * The top level documentation "git help git" still pointed at the
396    documentation set hosted at now-defunct google-code repository.
397    Update it to point to https://git.github.io/htmldocs/git.html
398    instead.
399
400  * A helper function that takes the contents of a commit object and
401    finds its subject line did not ignore leading blank lines, as is
402    commonly done by other codepaths.  Make it ignore leading blank
403    lines to match.
404
405  * For a long time, we carried an in-code comment that said our
406    colored output would work only when we use fprintf/fputs on
407    Windows, which no longer is the case for the past few years.
408
409  * "gc.autoPackLimit" when set to 1 should not trigger a repacking
410    when there is only one pack, but the code counted poorly and did
411    so.
412
413  * Add a test to specify the desired behaviour that currently is not
414    available in "git rebase -Xsubtree=...".
415
416  * More mark-up updates to typeset strings that are expected to
417    literally typed by the end user in fixed-width font.
418
419  * "git commit --amend --allow-empty-message -S" for a commit without
420    any message body could have misidentified where the header of the
421    commit object ends.
422
423  * "git rebase -i --autostash" did not restore the auto-stashed change
424    when the operation was aborted.
425
426  * Git does not know what the contents in the index should be for a
427    path added with "git add -N" yet, so "git grep --cached" should not
428    show hits (or show lack of hits, with -L) in such a path, but that
429    logic does not apply to "git grep", i.e. searching in the working
430    tree files.  But we did so by mistake, which has been corrected.
431
432  * "git blame -M" missed a single line that was moved within the file.
433
434  * Fix recently introduced codepaths that are involved in parallel
435    submodule operations, which gave up on reading too early, and
436    could have wasted CPU while attempting to write under a corner
437    case condition.
438
439  * "git grep -i" has been taught to fold case in non-ascii locales
440    correctly.
441
442  * A test that unconditionally used "mktemp" learned that the command
443    is not necessarily available everywhere.
444
445  * There are certain house-keeping tasks that need to be performed at
446    the very beginning of any Git program, and programs that are not
447    built-in commands had to do them exactly the same way as "git"
448    potty does.  It was easy to make mistakes in one-off standalone
449    programs (like test helpers).  A common "main()" function that
450    calls cmd_main() of individual program has been introduced to
451    make it harder to make mistakes.
452    (merge de61ceb jk/common-main later to maint).
453
454  * The test framework learned a new helper test_match_signal to
455    check an exit code from getting killed by an expected signal.
456
457  * General code clean-up around a helper function to write a
458    single-liner to a file.
459    (merge 7eb6e10 jk/write-file later to maint).
460
461  * One part of "git am" had an oddball helper function that called
462    stuff from outside "his" as opposed to calling what we have "ours",
463    which was not gender-neutral and also inconsistent with the rest of
464    the system where outside stuff is usuall called "theirs" in
465    contrast to "ours".
466
467  * "git blame file" allowed the lineage of lines in the uncommitted,
468    unadded contents of "file" to be inspected, but it refused when
469    "file" did not appear in the current commit.  When "file" was
470    created by renaming an existing file (but the change has not been
471    committed), this restriction was unnecessarily tight.
472
473  * "git add -N dir/file && git write-tree" produced an incorrect tree
474    when there are other paths in the same directory that sorts after
475    "file".
476
477  * "git fetch http://user:pass@host/repo..." scrubbed the userinfo
478    part, but "git push" didn't.
479
480  * "git merge" with renormalization did not work well with
481    merge-recursive, due to "safer crlf" conversion kicking in when it
482    shouldn't.
483    (merge 1335d76 jc/renormalize-merge-kill-safer-crlf later to maint).
484
485  * The use of strbuf in "git rm" to build filename to remove was a bit
486    suboptimal, which has been fixed.
487
488  * An age old bug that caused "git diff --ignore-space-at-eol"
489    misbehave has been fixed.
490
491  * "git notes merge" had a code to see if a path exists (and fails if
492    it does) and then open the path for writing (when it doesn't).
493    Replace it with open with O_EXCL.
494
495  * "git pack-objects" and "git index-pack" mostly operate with off_t
496    when talking about the offset of objects in a packfile, but there
497    were a handful of places that used "unsigned long" to hold that
498    value, leading to an unintended truncation.
499
500  * Recent update to "git daemon" tries to enable the socket-level
501    KEEPALIVE, but when it is spawned via inetd, the standard input
502    file descriptor may not necessarily be connected to a socket.
503    Suppress an ENOTSOCK error from setsockopt().
504
505  * Recent FreeBSD stopped making perl available at /usr/bin/perl;
506    switch the default the built-in path to /usr/local/bin/perl on not
507    too ancient FreeBSD releases.
508
509  * "git commit --help" said "--no-verify" is only about skipping the
510    pre-commit hook, and failed to say that it also skipped the
511    commit-msg hook.
512
513  * "git merge" in Git v2.9 was taught to forbid merging an unrelated
514    lines of history by default, but that is exactly the kind of thing
515    the "--rejoin" mode of "git subtree" (in contrib/) wants to do.
516    "git subtree" has been taught to use the "--allow-unrelated-histories"
517    option to override the default.
518
519  * The build procedure for "git persistent-https" helper (in contrib/)
520    has been updated so that it can be built with more recent versions
521    of Go.
522
523  * There is an optimization used in "git diff $treeA $treeB" to borrow
524    an already checked-out copy in the working tree when it is known to
525    be the same as the blob being compared, expecting that open/mmap of
526    such a file is faster than reading it from the object store, which
527    involves inflating and applying delta.  This however kicked in even
528    when the checked-out copy needs to go through the convert-to-git
529    conversion (including the clean filter), which defeats the whole
530    point of the optimization.  The optimization has been disabled when
531    the conversion is necessary.
532
533  * "git -c grep.patternType=extended log --basic-regexp" misbehaved
534    because the internal API to access the grep machinery was not
535    designed well.
536
537  * Windows port was failing some tests in t4130, due to the lack of
538    inum in the returned values by its lstat(2) emulation.
539
540  * The reflog output format is documented better, and a new format
541    --date=unix to report the seconds-since-epoch (without timezone)
542    has been added.
543    (merge 442f6fd jk/reflog-date later to maint).
544
545  * "git difftool <paths>..." started in a subdirectory failed to
546    interpret the paths relative to that directory, which has been
547    fixed.
548
549  * The characters in the label shown for tags/refs for commits in
550    "gitweb" output are now properly escaped for proper HTML output.
551
552  * FreeBSD can lie when asked mtime of a directory, which made the
553    untracked cache code to fall back to a slow-path, which in turn
554    caused tests in t7063 to fail because it wanted to verify the
555    behaviour of the fast-path.
556
557  * Squelch compiler warnings for netmalloc (in compat/) library.
558
559  * A small memory leak in the command line parsing of "git blame"
560    has been plugged.
561
562  * The API documentation for hashmap was unclear if hashmap_entry
563    can be safely discarded without any other consideration.  State
564    that it is safe to do so.
565
566  * Not-so-recent rewrite of "git am" that started making internal
567    calls into the commit machinery had an unintended regression, in
568    that no matter how many seconds it took to apply many patches, the
569    resulting committer timestamp for the resulting commits were all
570    the same.
571
572  * "git push --force-with-lease" already had enough logic to allow
573    ensuring that such a push results in creation of a ref (i.e. the
574    receiving end did not have another push from sideways that would be
575    discarded by our force-pushing), but didn't expose this possibility
576    to the users.  It does so now.
577    (merge 9eed4f3 jk/push-force-with-lease-creation later to maint).
578
579  * The mechanism to limit the pack window memory size, when packing is
580    done using multiple threads (which is the default), is per-thread,
581    but this was not documented clearly.
582    (merge 954176c ms/document-pack-window-memory-is-per-thread later to maint).
583
584  * "import-tars" fast-import script (in contrib/) used to ignore a
585    hardlink target and replaced it with an empty file, which has been
586    corrected to record the same blob as the other file the hardlink is
587    shared with.
588    (merge 04e0869 js/import-tars-hardlinks later to maint).
589
590  * "git mv dir non-existing-dir/" did not work in some environments
591    the same way as existing mainstream platforms.  The code now moves
592    "dir" to "non-existing-dir", without relying on rename("A", "B/")
593    that strips the trailing slash of '/'.
594    (merge 189d035 js/mv-dir-to-new-directory later to maint).
595
596  * The "t/" hierarchy is prone to get an unusual pathname; "make test"
597    has been taught to make sure they do not contain paths that cannot
598    be checked out on Windows (and the mechanism can be reusable to
599    catch pathnames that are not portable to other platforms as need
600    arises).
601    (merge c2cafd3 js/test-lint-pathname later to maint).
602
603  * Other minor clean-ups and documentation updates
604    (merge 02a8cfa rs/merge-add-strategies-simplification later to maint).
605    (merge af4941d rs/merge-recursive-string-list-init later to maint).
606    (merge 1eb47f1 rs/use-strbuf-add-unique-abbrev later to maint).
607    (merge ddd0bfa jk/tighten-alloc later to maint).
608    (merge ecf30b2 rs/mailinfo-lib later to maint).
609    (merge 0eb75ce sg/reflog-past-root later to maint).