4 Backward Compatibility Notes
5 ----------------------------
7 * Historically, the "-m" (mainline) option can only be used for "git
8 cherry-pick" and "git revert" when working with a merge commit.
9 This version of Git no longer warns or errors out when working with
10 a single-parent commit, as long as the argument to the "-m" option
11 is 1 (i.e. it has only one parent, and the request is to pick or
12 revert relative to that first parent). Scripts that relied on the
13 behaviour may get broken with this change.
19 UI, Workflows & Features
21 * The "http.version" configuration variable can be used with recent
22 enough versions of cURL library to force the version of HTTP used
23 to talk when fetching and pushing.
25 * Small fixes and features for fast-export and fast-import, mostly on
26 the fast-export side has been made.
28 * "git push $there $src:$dst" rejects when $dst is not a fully
29 qualified refname and not clear what the end user meant. The
30 codepath has been taught to give a clearer error message, and also
31 guess where the push should go by taking the type of the pushed
32 object into account (e.g. a tag object would want to go under
35 * "git checkout [<tree-ish>] path..." learned to report the number of
36 paths that have been checked out of the index or the tree-ish,
37 which gives it the same degree of noisy-ness as the case in which
38 the command checks out a branch.
40 * "git quiltimport" learned "--keep-non-patch" option.
42 * "git worktree remove" and "git worktree move" refused to work when
43 there is a submodule involved. This has been loosened to ignore
44 uninitialized submodules.
46 * "git cherry-pick -m1" was forbidden when picking a non-merge
47 commit, even though there _is_ parent number 1 for such a commit.
48 This was done to avoid mistakes back when "cherry-pick" was about
49 picking a single commit, but is no longer useful with "cherry-pick"
50 that can pick a range of commits. Now the "-m$num" option is
51 allowed when picking any commit, as long as $num names an existing
54 * Update "git multimail" from the upstream.
58 * The "--format=<placeholder>" option of for-each-ref, branch and tag
59 learned to show a few more traits of objects that can be learned by
62 * "git rebase -i" learned to re-execute a command given with 'exec'
63 to run after it failed the last time.
65 * "git diff --color-moved-ws" updates.
67 * Custom userformat "log --format" learned %S atom that stands for
68 the tip the traversal reached the commit from, i.e. --source.
70 * "git instaweb" learned to drive http.server that comes with
71 "batteries included" Python installation (both Python2 & 3).
73 * A new encoding UTF-16LE-BOM has been invented to force encoding to
74 UTF-16 with BOM in little endian byte order, which cannot be directly
75 generated by using iconv.
77 * A new date format "--date=human" that morphs its output depending
78 on how far the time is from the current time has been introduced.
79 "--date=auto" can be used to use this new format when the output is
80 going to the pager or to the terminal and otherwise the default
84 Performance, Internal Implementation, Development Support etc.
86 * Code clean-up with optimization for the codepath that checks
87 (non-)existence of loose objects.
89 * More codepaths have become aware of working with in-core repository
90 instance other than the default "the_repository".
92 * The "strncat()" function is now among the banned functions.
94 * Portability updates for the HPE NonStop platform.
96 * Earlier we added "-Wformat-security" to developer builds, assuming
97 that "-Wall" (which includes "-Wformat" which in turn is required
98 to use "-Wformat-security") is always in effect. This is not true
99 when config.mak.autogen is in use, unfortunately. This has been
100 fixed by unconditionally adding "-Wall" to developer builds.
102 * The loose object cache used to optimize existence look-up has been
105 * Flaky tests can now be repeatedly run under load with the
108 * Documentation/Makefile is getting prepared for manpage
111 * "git fetch-pack" now can talk the version 2 protocol.
113 * sha-256 hash has been added and plumbed through the code to allow
114 building Git with the "NewHash".
116 * Debugging help for http transport.
118 * "git fetch --deepen=<more>" has been corrected to work over v2
121 * The code to walk tree objects has been taught that we may be
122 working with object names that are not computed with SHA-1.
124 * The in-core repository instances are passed through more codepaths.
126 * Update the protocol message specification to allow only the limited
127 use of scaled quantities. This is ensure potential compatibility
128 issues will not go out of hand.
130 * Micro-optimize the code that prepares commit objects to be walked
131 by "git rev-list" when the commit-graph is available.
133 * "git fetch" and "git upload-pack" learned to send all exchange over
134 the sideband channel while talking the v2 protocol.
136 * The codepath to write out commit-graph has been optimized by
137 following the usual pattern of visiting objects in in-pack order.
139 * The codepath to show progress meter while writing out commit-graph
140 file has been improved.
142 * Cocci rules have been updated to encourage use of strbuf_addbuf().
144 * "git rebase --merge" has been reimplemented by reusing the internal
145 machinery used for "git rebase -i".
147 * More code in "git bisect" has been rewritten in C.
149 * Instead of going through "git-rebase--am" scriptlet to use the "am"
150 backend, the built-in version of "git rebase" learned to drive the
151 "am" backend directly.
153 * The assumption to work on the single "in-core index" instance has
154 been reduced from the library-ish part of the codebase.
156 * The test lint learned to catch non-portable "sed" options.
158 * "git pack-objects" learned another algorithm to compute the set of
159 objects to send, that trades the resulting packfile off to save
160 traversal cost to favor small pushes.
162 * The travis CI scripts have been corrected to build Git with the
163 compiler(s) of our choice.
165 * "git submodule update" learned to abort early when core.worktree
166 for the submodule is not set correctly to prevent spreading damage.
168 * Test suite has been adjusted to run on Azure Pipeline.
170 * Running "Documentation/doc-diff x" from anywhere other than the
171 top-level of the working tree did not show the usage string
172 correctly, which has been fixed.
174 * Use of the sparse tool got easier to customize from the command
175 line to help developers.
181 * Updates for corner cases in merge-recursive.
182 (merge cc4cb0902c en/merge-path-collision later to maint).
184 * "git checkout frotz" (without any double-dash) avoids ambiguity by
185 making sure 'frotz' cannot be interpreted as a revision and as a
186 path at the same time. This safety has been updated to check also
187 a unique remote-tracking branch 'frotz' in a remote, when dwimming
188 to create a local branch 'frotz' out of a remote-tracking branch
189 'frotz' from a remote.
190 (merge be4908f103 nd/checkout-dwim-fix later to maint).
192 * Refspecs configured with "git -c var=val clone" did not propagate
193 to the resulting repository, which has been corrected.
194 (merge 7eae4a3ac4 sg/clone-initial-fetch-configuration later to maint).
196 * A properly configured username/email is required under
197 user.useConfigOnly in order to create commits; now "git stash"
198 (even though it creates commit objects to represent stash entries)
199 command is exempt from the requirement.
200 (merge 3bc2111fc2 sd/stash-wo-user-name later to maint).
202 * The http-backend CGI process did not correctly clean up the child
203 processes it spawns to run upload-pack etc. when it dies itself,
204 which has been corrected.
205 (merge 02818a98d7 mk/http-backend-kill-children-before-exit later to maint).
207 * "git rev-list --exclude-promisor-objects" had to take an object
208 that does not exist locally (and is lazily available) from the
209 command line without barfing, but the code dereferenced NULL.
210 (merge 4cf67869b2 md/list-lazy-objects-fix later to maint).
212 * The traversal over tree objects has learned to honor
213 ":(attr:label)" pathspec match, which has been implemented only for
214 enumerating paths on the filesystem.
215 (merge 5a0b97b34c nd/attr-pathspec-in-tree-walk later to maint).
218 (merge 4e3ecbd439 cb/openbsd-allows-reading-directory later to maint).
219 (merge b6bdc2a0f5 cb/t5004-empty-tar-archive-fix later to maint).
220 (merge 82cbc8cde2 cb/test-lint-cp-a later to maint).
222 * Lines that begin with a certain keyword that come over the wire, as
223 well as lines that consist only of one of these keywords, ought to
224 be painted in color for easier eyeballing, but the latter was
225 broken ever since the feature was introduced in 2.19, which has
227 (merge 1f67290450 hn/highlight-sideband-keywords later to maint).
229 * "git log -G<regex>" looked for a hunk in the "git log -p" patch
230 output that contained a string that matches the given pattern.
231 Optimize this code to ignore binary files, which by default will
232 not show any hunk that would match any pattern (unless textconv or
233 the --text option is in effect, that is).
234 (merge e0e7cb8080 tb/log-G-binary later to maint).
236 * "git submodule update" ought to use a single job unless asked, but
237 by mistake used multiple jobs, which has been fixed.
238 (merge e3a9d1aca9 sb/submodule-fetchjobs-default-to-one later to maint).
240 * "git stripspace" should be usable outside a git repository, but
241 under the "-s" or "-c" mode, it didn't.
242 (merge 957da75802 jn/stripspace-wo-repository later to maint).
244 * Some of the documentation pages formatted incorrectly with
245 Asciidoctor, which have been fixed.
246 (merge b62eb1d2f4 ma/asciidoctor later to maint).
248 * The core.worktree setting in a submodule repository should not be
249 pointing at a directory when the submodule loses its working tree
250 (e.g. getting deinit'ed), but the code did not properly maintain
253 * With zsh, "git cmd path<TAB>" was completed to "git cmd path name"
254 when the completed path has a special character like SP in it,
255 without any attempt to keep "path name" a single filename. This
256 has been fixed to complete it to "git cmd path\ name" just like
257 Bash completion does.
259 * The test suite tried to see if it is run under bash, but the check
260 itself failed under some other implementations of shell (notably
261 under NetBSD). This has been corrected.
262 (merge 54ea72f09c sg/test-bash-version-fix later to maint).
264 * "git gc" and "git repack" did not close the open packfiles that
265 they found unneeded before removing them, which didn't work on a
266 platform incapable of removing an open file. This has been
268 (merge 5bdece0d70 js/gc-repack-close-before-remove later to maint).
270 * The code to drive GIT_EXTERNAL_DIFF command relied on the string
271 returned from getenv() to be non-volatile, which is not true, that
273 (merge 6776a84dae kg/external-diff-save-env later to maint).
275 * There were many places the code relied on the string returned from
276 getenv() to be non-volatile, which is not true, that have been
278 (merge 0da0e9268b jk/save-getenv-result later to maint).
280 * The v2 upload-pack protocol implementation failed to honor
281 hidden-ref configuration, which has been corrected.
282 (merge e20b4192a3 jk/proto-v2-hidden-refs-fix later to maint).
284 * "git fetch --recurse-submodules" may not fetch the necessary commit
285 that is bound to the superproject, which is getting corrected.
286 (merge be76c21282 sb/submodule-recursive-fetch-gets-the-tip later to maint).
288 * "git rebase" internally runs "checkout" to switch between branches,
289 and the command used to call the post-checkout hook, but the
290 reimplementation stopped doing so, which is getting fixed.
292 * "git add -e" got confused when the change it wants to let the user
293 edit is smaller than the previous change that was left over in a
295 (merge fa6f225e01 js/add-e-clear-patch-before-stating later to maint).
297 * "git p4" failed to update a shelved change when there were moved
298 files, which has been corrected.
299 (merge 7a10946ab9 ld/git-p4-shelve-update-fix later to maint).
301 * The codepath to read from the commit-graph file attempted to read
302 past the end of it when the file's table-of-contents was corrupt.
304 * The compat/obstack code had casts that -Wcast-function-type
305 compilation option found questionable.
306 (merge 764473d257 sg/obstack-cast-function-type-fix later to maint).
308 * An obvious typo in an assertion error message has been fixed.
309 (merge 3c27e2e059 cc/test-ref-store-typofix later to maint).
311 * In Git for Windows, "git clone \\server\share\path" etc. that uses
312 UNC paths from command line had bad interaction with its shell
315 * "git add --ignore-errors" did not work as advertised and instead
316 worked as an unintended synonym for "git add --renormalize", which
318 (merge e2c2a37545 jk/add-ignore-errors-bit-assignment-fix later to maint).
320 * On a case-insensitive filesystem, we failed to compare the part of
321 the path that is above the worktree directory in an absolute
322 pathname, which has been corrected.
324 * Asking "git check-attr" about a macro (e.g. "binary") on a specific
325 path did not work correctly, even though "git check-attr -a" listed
326 such a macro correctly. This has been corrected.
327 (merge 7b95849be4 jk/attr-macro-fix later to maint).
329 * "git pack-objects" incorrectly used uninitialized mutex, which has
331 (merge edb673cf10 ph/pack-objects-mutex-fix later to maint).
333 * "git checkout -b <new> [HEAD]" to create a new branch from the
334 current commit and check it out ought to be a no-op in the index
335 and the working tree in normal cases, but there are corner cases
336 that do require updates to the index and the working tree. Running
337 it immediately after "git clone --no-checkout" is one of these
338 cases that an earlier optimization kicked in incorrectly, which has
340 (merge 8424bfd45b bp/checkout-new-branch-optim later to maint).
342 * "git diff --color-moved --cc --stat -p" did not work well due to
343 funny interaction between a bug in color-moved and the rest, which
345 (merge dac03b5518 jk/diff-cc-stat-fixes later to maint).
347 * When GIT_SEQUENCE_EDITOR is set, the command was incorrectly
348 started when modes of "git rebase" that implicitly uses the
349 machinery for the interactive rebase are run, which has been
351 (merge 891d4a0313 pw/no-editor-in-rebase-i-implicit later to maint).
353 * The commit-graph facility did not work when in-core objects that
354 are promoted from unknown type to commit (e.g. a commit that is
355 accessed via a tag that refers to it) were involved, which has been
357 (merge 4468d4435c sg/object-as-type-commit-graph-fix later to maint).
359 * "git fetch" output cleanup.
360 (merge dc40b24df4 nd/fetch-compact-update later to maint).
362 * "git cat-file --batch" reported a dangling symbolic link by
363 mistake, when it wanted to report that a given name is ambiguous.
365 * Documentation around core.crlf has been updated.
366 (merge c9446f0504 jk/autocrlf-overrides-eol-doc later to maint).
368 * The documentation of "git commit-tree" said that the command
369 understands "--gpg-sign" in addition to "-S", but the command line
370 parser did not know about the longhand, which has been corrected.
372 * "git rebase -x $cmd" did not reject multi-line command, even though
373 the command is incapable of handling such a command. It now is
375 (merge c762aada1a pw/rebase-x-sanity-check later to maint).
377 * Output from "git help" was not correctly aligned, which has been
379 (merge 6195a76da4 nd/help-align-command-desc later to maint).
381 * The "git submodule summary" subcommand showed shortened commit
382 object names by mechanically truncating them at 7-hexdigit, which
383 has been improved to let "rev-parse --short" scale the length of
384 the abbreviation with the size of the repository.
385 (merge 0586a438f6 sh/submodule-summary-abbrev-fix later to maint).
387 * The way the OSX build jobs updates its build environment used the
388 "--quiet" option to "brew update" command, but it wasn't all that
389 quiet to be useful. The use of the option has been replaced with
390 an explicit redirection to the /dev/null (which incidentally would
391 have worked around a breakage by recent updates to homebrew, which
392 has fixed itself already).
393 (merge a1ccaedd62 sg/travis-osx-brew-breakage-workaround later to maint).
395 * "git --work-tree=$there --git-dir=$here describe --dirty" did not
396 work correctly as it did not pay attention to the location of the
397 worktree specified by the user by mistake, which has been
399 (merge c801170b0c ss/describe-dirty-in-the-right-directory later to maint).
401 * "git fetch" over protocol v2 that needs to make a second connection
402 to backfill tags did not clear a variable that holds shallow
403 repository information correctly, leading to an access of freed
406 * Code cleanup, docfix, build fix, etc.
407 (merge 89ba9a79ae hb/t0061-dot-in-path-fix later to maint).
408 (merge d173e799ea sb/diff-color-moved-config-option-fixup later to maint).
409 (merge a8f5a59067 en/directory-renames-nothanks-doc-update later to maint).
410 (merge ec36c42a63 nd/indentation-fix later to maint).
411 (merge f116ee21cd do/gitweb-strict-export-conf-doc later to maint).
412 (merge 112ea42663 fd/gitweb-snapshot-conf-doc-fix later to maint).
413 (merge 1cadad6f65 tb/use-common-win32-pathfuncs-on-cygwin later to maint).
414 (merge 57e9dcaa65 km/rebase-doc-typofix later to maint).
415 (merge b8b4cb27e6 ds/gc-doc-typofix later to maint).
416 (merge 3b3357626e nd/style-opening-brace later to maint).
417 (merge b4583d5595 es/doc-worktree-guessremote-config later to maint).
418 (merge cce99cd8c6 ds/commit-graph-assert-missing-parents later to maint).
419 (merge 0650614982 cy/completion-typofix later to maint).
420 (merge 6881925ef5 rs/sha1-file-close-mapped-file-on-error later to maint).
421 (merge bd8d6f0def en/show-ref-doc-fix later to maint).
422 (merge 1747125e2c cc/partial-clone-doc-typofix later to maint).
423 (merge e01378753d cc/fetch-error-message-fix later to maint).
424 (merge 54e8c11215 jk/remote-insteadof-cleanup later to maint).
425 (merge d609615f48 js/test-git-installed later to maint).
426 (merge ba170517be ja/doc-style-fix later to maint).
427 (merge 86fb1c4e77 km/init-doc-typofix later to maint).
428 (merge 5cfd4a9d10 nd/commit-doc later to maint).
429 (merge 9fce19a431 ab/diff-tree-doc-fix later to maint).