Merge branch 'rs/c-auto-resets-attributes'
[git] / Documentation / RelNotes / 2.11.0.txt
1 Git 2.11 Release Notes
2 ======================
3
4 Updates since v2.10
5 -------------------
6
7 UI, Workflows & Features
8
9  * "git format-patch --cover-letter HEAD^" to format a single patch
10    with a separate cover letter now numbers the output as [PATCH 0/1]
11    and [PATCH 1/1] by default.
12
13  * An incoming "git push" that attempts to push too many bytes can now
14    be rejected by setting a new configuration variable at the receiving
15    end.
16
17  * "git nosuchcommand --help" said "No manual entry for gitnosuchcommand",
18    which was not intuitive, given that "git nosuchcommand" said "git:
19    'nosuchcommand' is not a git command".
20
21  * "git clone --resurse-submodules --reference $path $URL" is a way to
22    reduce network transfer cost by borrowing objects in an existing
23    $path repository when cloning the superproject from $URL; it
24    learned to also peek into $path for presense of corresponding
25    repositories of submodules and borrow objects from there when able.
26
27  * The "git diff --submodule={short,log}" mechanism has been enhanced
28    to allow "--submodule=diff" to show the patch between the submodule
29    commits bound to the superproject.
30
31  * Even though "git hash-objects", which is a tool to take an
32    on-filesystem data stream and put it into the Git object store,
33    allowed to perform the "outside-world-to-Git" conversions (e.g.
34    end-of-line conversions and application of the clean-filter), and
35    it had the feature on by default from very early days, its reverse
36    operation "git cat-file", which takes an object from the Git object
37    store and externalize for the consumption by the outside world,
38    lacked an equivalent mechanism to run the "Git-to-outside-world"
39    conversion.  The command learned the "--filters" option to do so.
40
41  * Output from "git diff" can be made easier to read by selecting
42    which lines are common and which lines are added/deleted
43    intelligently when the lines before and after the changed section
44    are the same.  A command line option is added to help with the
45    experiment to find a good heuristics.
46
47  * In some projects, it is common to use "[RFC PATCH]" as the subject
48    prefix for a patch meant for discussion rather than application.  A
49    new option "--rfc" was a short-hand for "--subject-prefix=RFC PATCH"
50    to help the participants of such projects.
51
52  * "git add --chmod=+x <pathspec>" added recently only toggled the
53    executable bit for paths that are either new or modified. This has
54    been corrected to flip the executable bit for all paths that match
55    the given pathspec.
56
57  * When "git format-patch --stdout" output is placed as an in-body
58    header and it uses the RFC2822 header folding, "git am" failed to
59    put the header line back into a single logical line.  The
60    underlying "git mailinfo" was taught to handle this properly.
61
62  * "gitweb" can spawn "highlight" to show blob contents with
63    (programming) language-specific syntax highlighting, but only
64    when the language is known.  "highlight" can however be told
65    to make the guess itself by giving it "--force" option, which
66    has been enabled.
67
68  * "git gui" l10n to Portuguese.
69
70
71 Performance, Internal Implementation, Development Support etc.
72
73  * The delta-base-cache mechanism has been a key to the performance in
74    a repository with a tightly packed packfile, but it did not scale
75    well even with a larger value of core.deltaBaseCacheLimit.
76
77  * Enhance "git status --porcelain" output by collecting more data on
78    the state of the index and the working tree files, which may
79    further be used to teach git-prompt (in contrib/) to make fewer
80    calls to git.
81
82  * Extract a small helper out of the function that reads the authors
83    script file "git am" internally uses.
84    (merge a77598e jc/am-read-author-file later to maint).
85
86  * Lifts calls to exit(2) and die() higher in the callchain in
87    sequencer.c files so that more helper functions in it can be used
88    by callers that want to handle error conditions themselves.
89
90  * "git am" has been taught to make an internal call to "git apply"'s
91    innards without spawning the latter as a separate process.
92
93  * The ref-store abstraction was introduced to the refs API so that we
94    can plug in different backends to store references.
95
96  * The "unsigned char sha1[20]" to "struct object_id" conversion
97    continues.  Notable changes in this round includes that ce->sha1,
98    i.e. the object name recorded in the cache_entry, turns into an
99    object_id.
100
101  * JGit can show a fake ref "capabilities^{}" to "git fetch" when it
102    does not advertise any refs, but "git fetch" was not prepared to
103    see such an advertisement.  When the other side disconnects without
104    giving any ref advertisement, we used to say "there may not be a
105    repository at that URL", but we may have seen other advertisement
106    like "shallow" and ".have" in which case we definitely know that a
107    repository is there.  The code to detect this case has also been
108    updated.
109
110  * Some codepaths in "git pack-objects" were not ready to use an
111    existing pack bitmap; now they are and as the result they have
112    become faster.
113
114  * The codepath in "git fsck" to detect malformed tree objects has
115    been updated not to die but keep going after detecting them.
116
117
118 Also contains various documentation updates and code clean-ups.
119
120
121 Fixes since v2.10
122 -----------------
123
124 Unless otherwise noted, all the fixes since v2.9 in the maintenance
125 track are contained in this release (see the maintenance releases'
126 notes for details).
127
128  * Clarify various ways to specify the "revision ranges" in the
129    documentation.
130
131  * "diff-highlight" script (in contrib/) learned to work better with
132    "git log -p --graph" output.
133
134  * The test framework left the number of tests and success/failure
135    count in the t/test-results directory, keyed by the name of the
136    test script plus the process ID.  The latter however turned out not
137    to serve any useful purpose.  The process ID part of the filename
138    has been removed.
139
140  * Having a submodule whose ".git" repository is somehow corrupt
141    caused a few commands that recurse into submodules loop forever.
142
143  * "git symbolic-ref -d HEAD" happily removes the symbolic ref, but
144    the resulting repository becomes an invalid one.  Teach the command
145    to forbid removal of HEAD.
146
147  * A test spawned a short-lived background process, which sometimes
148    prevented the test directory from getting removed at the end of the
149    script on some platforms.
150
151  * Update a few tests that used to use GIT_CURL_VERBOSE to use the
152    newer GIT_TRACE_CURL.
153
154  * "git pack-objects --include-tag" was taught that when we know that
155    we are sending an object C, we want a tag B that directly points at
156    C but also a tag A that points at the tag B.  We used to miss the
157    intermediate tag B in some cases.
158    (merge b773dde jk/pack-tag-of-tag later to maint).
159
160  * Update Japanese translation for "git-gui".
161    (merge 02748bc sy/git-gui-i18n-ja later to maint).
162
163  * "git fetch http::/site/path" did not die correctly and segfaulted
164    instead.
165    (merge d63ed6e jk/fix-remote-curl-url-wo-proto later to maint).
166
167  * "git commit-tree" stopped reading commit.gpgsign configuration
168    variable that was meant for Porcelain "git commit" in Git 2.9; we
169    forgot to update "git gui" to look at the configuration to match
170    this change.
171    (merge f14a310 js/git-gui-commit-gpgsign later to maint).
172
173  * "git add --chmod=+x" added recently lacked documentation, which has
174    been corrected.
175    (merge 7ef7903 et/add-chmod-x later to maint).
176
177  * "git log --cherry-pick" used to include merge commits as candidates
178    to be matched up with other commits, resulting a lot of wasted time.
179    The patch-id generation logic has been updated to ignore merges to
180    avoid the wastage.
181    (merge 7c81040 jk/patch-ids-no-merges later to maint).
182
183  * The http transport (with curl-multi option, which is the default
184    these days) failed to remove curl-easy handle from a curlm session,
185    which led to unnecessary API failures.
186    (merge 2abc848 ew/http-do-not-forget-to-call-curl-multi-remove-handle later to maint).
187
188  * There were numerous corner cases in which the configuration files
189    are read and used or not read at all depending on the directory a
190    Git command was run, leading to inconsistent behaviour.  The code
191    to set-up repository access at the beginning of a Git process has
192    been updated to fix them.
193    (merge 4d0efa1 jk/setup-sequence-update later to maint).
194
195  * "git diff -W" output needs to extend the context backward to
196    include the header line of the current function and also forward to
197    include the body of the entire current function up to the header
198    line of the next one.  This process may have to merge to adjacent
199    hunks, but the code forgot to do so in some cases.
200    (merge 45d2f75 rs/xdiff-merge-overlapping-hunks-for-W-context later to maint).
201
202  * Performance tests done via "t/perf" did not use the same set of
203    build configuration if the user relied on autoconf generated
204    configuration.
205    (merge cd5c281 ks/perf-build-with-autoconf later to maint).
206
207  * "git format-patch --base=..." feature that was recently added
208    showed the base commit information after "-- " e-mail signature
209    line, which turned out to be inconvenient.  The base information
210    has been moved above the signature line.
211    (merge 480871e jt/format-patch-base-info-above-sig later to maint).
212
213  * More i18n.
214    (merge 43073f8 va/i18n later to maint).
215
216  * Even when "git pull --rebase=preserve" (and the underlying "git
217    rebase --preserve") can complete without creating any new commit
218    (i.e. fast-forwards), it still insisted on having a usable ident
219    information (read: user.email is set correctly), which was less
220    than nice.  As the underlying commands used inside "git rebase"
221    would fail with a more meaningful error message and advice text
222    when the bogus ident matters, this extra check was removed.
223    (merge 1e461c4 jk/rebase-i-drop-ident-check later to maint).
224
225  * "git gc --aggressive" used to limit the delta-chain length to 250,
226    which is way too deep for gaining additional space savings and is
227    detrimental for runtime performance.  The limit has been reduced to
228    50.
229    (merge 07e7dbf jk/reduce-gc-aggressive-depth later to maint).
230
231  * Documentation for individual configuration variables to control use
232    of color (like `color.grep`) said that their default value is
233    'false', instead of saying their default is taken from `color.ui`.
234    When we updated the default value for color.ui from 'false' to
235    'auto' quite a while ago, all of them broke.  This has been
236    corrected.
237    (merge 14d16e2 mm/config-color-ui-default-to-auto later to maint).
238
239  * The pretty-format specifier "%C(auto)" used by the "log" family of
240    commands to enable coloring of the output is taught to also issue a
241    color-reset sequence to the output.
242    (merge c99ad27 rs/c-auto-resets-attributes later to maint).
243
244  * A shell script example in check-ref-format documentation has been
245    fixed.
246    (merge 92dece7 ep/doc-check-ref-format-example later to maint).
247
248  * "git checkout <word>" does not follow the usual disambiguation
249    rules when the <word> can be both a rev and a path, to allow
250    checking out a branch 'foo' in a project that happens to have a
251    file 'foo' in the working tree without having to disambiguate.
252    This was poorly documented and the check was incorrect when the
253    command was run from a subdirectory.
254    (merge b829b94 nd/checkout-disambiguation later to maint).
255
256  * Some codepaths in "git diff" used regexec(3) on a buffer that was
257    mmap(2)ed, which may not have a terminating NUL, leading to a read
258    beyond the end of the mapped region.  This was fixed by introducing
259    a regexec_buf() helper that takes a <ptr,len> pair with REG_STARTEND
260    extension.
261    (merge b7d36ff js/regexec-buf later to maint).
262
263  * The procedure to build Git on Mac OS X for Travis CI hardcoded the
264    internal directory structure we assumed HomeBrew uses, which was a
265    no-no.  The procedure has been updated to ask HomeBrew things we
266    need to know to fix this.
267    (merge f86f49b ls/travis-homebrew-path-fix later to maint).
268
269  * When "git rebase -i" is given a broken instruction, it told the
270    user to fix it with "--edit-todo", but didn't say what the step
271    after that was (i.e. "--continue").
272    (merge 37875b4 rt/rebase-i-broken-insn-advise later to maint).
273
274  * Documentation around tools to import from CVS was fairly outdated.
275    (merge 106b672 jk/doc-cvs-update later to maint).
276
277  * "git clone --recurse-submodules" lost the progress eye-candy in
278    recent update, which has been corrected.
279
280  * A low-level function verify_packfile() was meant to show errors
281    that were detected without dying itself, but under some conditions
282    it didn't and died instead, which has been fixed.
283    (merge a9445d859e jk/verify-packfile-gently later to maint).
284
285  * When "git fetch" tries to find where the history of the repository
286    it runs in has diverged from what the other side has, it has a
287    mechanism to avoid digging too deep into irrelevant side branches.
288    This however did not work well over the "smart-http" transport due
289    to a design bug, which has been fixed.
290    (merge 06b3d386e0 jt/fetch-pack-in-vain-count-with-stateless later to maint).
291
292  * In the codepath that comes up with the hostname to be used in an
293    e-mail when the user didn't tell us, we looked at ai_canonname
294    field in struct addrinfo without making sure it is not NULL first.
295    (merge c375a7efa3 jk/ident-ai-canonname-could-be-null later to maint).
296
297  * "git worktree", even though it used the default_abbrev setting that
298    ought to be affected by core.abbrev configuration variable, ignored
299    the variable setting.  The command has been taught to read the
300    default set of configuration variables to correct this.
301    (merge d49028e6e7 jc/worktree-config later to maint).
302
303  * "git init" tried to record core.worktree in the repository's
304    'config' file when GIT_WORK_TREE environment variable was set and
305    it was different from where GIT_DIR appears as ".git" at its top,
306    but the logic was faulty when .git is a "gitdir:" file that points
307    at the real place, causing trouble in working trees that are
308    managed by "git worktree".  This has been corrected.
309
310  * Codepaths that read from an on-disk loose object were too loose in
311    validating what they are reading is a proper object file and
312    sometimes read past the data they read from the disk, which has
313    been corrected.  H/t to Gustavo Grieco for reporting.
314    (merge d21f842690 jc/verify-loose-object-header later to maint).
315
316  * The original command line syntax for "git merge", which was "git
317    merge <msg> HEAD <parent>...", has been deprecated for quite some
318    time, and "git gui" was the last in-tree user of the syntax.  This
319    is finally fixed, so that we can move forward with the deprecation.
320    (merge ff65e796f0 rs/git-gui-use-modern-git-merge-syntax later to maint).
321
322  * An author name, that spelled a backslash-quoted double quote in the
323    human readable part "My \"double quoted\" name", was not unquoted
324    correctly while applying a patch from a piece of e-mail.
325    (merge f357e5de31 kd/mailinfo-quoted-string later to maint).
326
327  * Doc update to clarify what "log -3 --reverse" does.
328    (merge 04be69478f pb/rev-list-reverse-with-count later to maint).
329
330  * Other minor doc, test and build updates and code cleanups.
331    (merge e78d57e bw/pathspec-remove-unused-extern-decl later to maint).
332    (merge ce25e4c rs/checkout-some-states-are-const later to maint).
333    (merge a8342a4 rs/strbuf-remove-fix later to maint).
334    (merge b56aa5b rs/unpack-trees-reduce-file-scope-global later to maint).
335    (merge 5efc60c mr/vcs-svn-printf-ulong later to maint).
336    (merge a22ae75 rs/cocci later to maint).
337    (merge 45ccef87b3 rs/copy-array later to maint).
338    (merge 8201688ecd dt/mailinfo later to maint).