Documentation / RelNotes / 2.10.0.txton commit apply: make it possible to silently apply (a46160d)
   1Git 2.10 Release Notes
   2======================
   3
   4Backward compatibility notes
   5----------------------------
   6
   7Updates since v2.9
   8------------------
   9
  10UI, 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 * A couple of "git svn" updates.
  75
  76 * More markings of messages for i18n, with updates to various tests
  77   to pass GETTEXT_POISON tests.
  78
  79 * "git archive" learned to handle files that are larger than 8GB and
  80   commits far in the future than expressible by the traditional US-TAR
  81   format.
  82   (merge 5caeeb8 jk/big-and-future-archive-tar later to maint).
  83
  84 * A new configuration variable core.sshCommand has been added to
  85   specify what value for GIT_SSH_COMMAND to use per repository.
  86
  87 * "git worktree prune" protected worktrees that are marked as
  88   "locked" by creating a file in a known location.  "git worktree"
  89   command learned a dedicated command pair to create and remove such
  90   a file, so that the users do not have to do this with editor.
  91
  92 * A handful of "git svn" updates.
  93
  94
  95Performance, Internal Implementation, Development Support etc.
  96
  97 * "git fast-import" learned the same performance trick to avoid
  98   creating too small a packfile as "git fetch" and "git push" have,
  99   using *.unpackLimit configuration.
 100
 101 * When "git daemon" is run without --[init-]timeout specified, a
 102   connection from a client that silently goes offline can hang around
 103   for a long time, wasting resources.  The socket-level KEEPALIVE has
 104   been enabled to allow the OS to notice such failed connections.
 105
 106 * "git upload-pack" command has been updated to use the parse-options
 107   API.
 108
 109 * The "git apply" standalone program is being libified; this is the
 110   first step to move many state variables into a structure that can
 111   be explicitly (re)initialized to make the machinery callable more
 112   than once.
 113
 114 * HTTP transport gained an option to produce more detailed debugging
 115   trace.
 116   (merge 73e57aa ep/http-curl-trace later to maint).
 117
 118 * Instead of taking advantage of a struct string_list that is
 119   allocated with all NULs happens to be STRING_LIST_INIT_NODUP kind,
 120   initialize them explicitly as such, to document their behaviour
 121   better.
 122   (merge 2721ce2 jk/string-list-static-init later to maint).
 123
 124 * HTTPd tests learned to show the server error log to help diagnosing
 125   a failing tests.
 126   (merge 44f243d nd/test-lib-httpd-show-error-log-in-verbose later to maint).
 127
 128 * The ownership rule for the piece of memory that hold references to
 129   be fetched in "git fetch" was screwy, which has been cleaned up.
 130
 131 * "git bisect" makes an internal call to "git diff-tree" when
 132   bisection finds the culprit, but this call did not initialize the
 133   data structure to pass to the diff-tree API correctly.
 134
 135 * Further preparatory clean-up for "worktree" feature continues.
 136   (merge 0409e0b nd/worktree-cleanup-post-head-protection later to maint).
 137
 138 * Formats of the various data (and how to validate them) where we use
 139   GPG signature have been documented.
 140
 141 * A new run-command API function pipe_command() is introduced to
 142   sanely feed data to the standard input while capturing data from
 143   the standard output and the standard error of an external process,
 144   which is cumbersome to hand-roll correctly without deadlocking.
 145
 146   The codepath to sign data in a prepared buffer with GPG has been
 147   updated to use this API to read from the status-fd to check for
 148   errors (instead of relying on GPG's exit status).
 149   (merge efee955 jk/gpg-interface-cleanup later to maint).
 150
 151 * Allow t/perf framework to use the features from the most recent
 152   version of Git even when testing an older installed version.
 153
 154 * The commands in the "log/diff" family have had an FILE* pointer in the
 155   data structure they pass around for a long time, but some codepaths
 156   used to always write to the standard output.  As a preparatory step
 157   to make "git format-patch" available to the internal callers, these
 158   codepaths have been updated to consistently write into that FILE*
 159   instead.
 160
 161 * Conversion from unsigned char sha1[20] to struct object_id
 162   continues.
 163
 164 * Improve the look of the way "git fetch" reports what happened to
 165   each ref that was fetched.
 166
 167 * The .c/.h sources are marked as such in our .gitattributes file so
 168   that "git diff -W" and friends would work better.
 169   (merge e82675a rs/help-c-source-with-gitattributes later to maint).
 170
 171 * Code clean-up to avoid using a variable string that compilers may
 172   feel untrustable as printf-style format given to write_file()
 173   helper function.
 174
 175 * "git p4" used a location outside $GIT_DIR/refs/ to place its
 176   temporary branches, which has been moved to refs/git-p4-tmp/.
 177
 178 * Existing autoconf generated test for the need to link with pthread
 179   library did not check all the functions from pthread libraries;
 180   recent FreeBSD has some functions in libc but not others, and we
 181   mistakenly thought linking with libc is enough when it is not.
 182   (merge a9b02de ew/autoconf-pthread later to maint).
 183
 184 * When "git fsck" reports a broken link (e.g. a tree object contains
 185   a blob that does not exist), both containing object and the object
 186   that is referred to were reported with their 40-hex object names.
 187   The command learned the "--name-objects" option to show the path to
 188   the containing object from existing refs (e.g. "HEAD~24^2:file.txt").
 189
 190 * Allow http daemon tests in Travis CI tests.
 191   (merge d9d1426 ls/travis-enable-httpd-tests later to maint).
 192
 193 * Makefile assumed that -lrt is always available on platforms that
 194   want to use clock_gettime() and CLOCK_MONOTONIC, which is not a
 195   case for recent Mac OS X.  The necessary symbols are often found in
 196   libc on many modern systems and having -lrt on the command line, as
 197   long as the library exists, had no effect, but when the platform
 198   removes librt.a that is a different matter--having -lrt will break
 199   the linkage.
 200
 201   This change could be seen as a regression for those who do need to
 202   specify -lrt, as they now specifically ask for NEEDS_LIBRT when
 203   building. Hopefully they are in the minority these days.
 204
 205 * Further preparatory work on the refs API before the pluggable
 206   backend series can land.
 207
 208 * Error handling in the codepaths that updates refs has been
 209   improved.
 210
 211 * The API to iterate over all the refs (i.e. for_each_ref(), etc.)
 212   has been revamped.
 213
 214 * A few tests that specifically target "git rebase -i" have been
 215   added.
 216
 217
 218Also contains various documentation updates and code clean-ups.
 219
 220
 221Fixes since v2.9
 222----------------
 223
 224Unless otherwise noted, all the fixes since v2.8 in the maintenance
 225track are contained in this release (see the maintenance releases'
 226notes for details).
 227
 228 * The commands in `git log` family take %C(auto) in a custom format
 229   string.  This unconditionally turned the color on, ignoring
 230   --no-color or with --color=auto when the output is not connected to
 231   a tty; this was corrected to make the format truly behave as
 232   "auto".
 233
 234 * "git rev-list --count" whose walk-length is limited with "-n"
 235   option did not work well with the counting optimized to look at the
 236   bitmap index.
 237
 238 * "git show -W" (extend hunks to cover the entire function, delimited
 239   by lines that match the "funcname" pattern) used to show the entire
 240   file when a change added an entire function at the end of the file,
 241   which has been fixed.
 242
 243 * The documentation set has been updated so that literal commands,
 244   configuration variables and environment variables are consistently
 245   typeset in fixed-width font and bold in manpages.
 246
 247 * "git svn propset" subcommand that was added in 2.3 days is
 248   documented now.
 249
 250 * The documentation tries to consistently spell "GPG"; when
 251   referring to the specific program name, "gpg" is used.
 252
 253 * "git reflog" stopped upon seeing an entry that denotes a branch
 254   creation event (aka "unborn"), which made it appear as if the
 255   reflog was truncated.
 256
 257 * The git-prompt scriptlet (in contrib/) was not friendly with those
 258   who uses "set -u", which has been fixed.
 259
 260 * compat/regex code did not cleanly compile.
 261
 262 * A codepath that used alloca(3) to place an unbounded amount of data
 263   on the stack has been updated to avoid doing so.
 264
 265 * "git update-index --add --chmod=+x file" may be usable as an escape
 266   hatch, but not a friendly thing to force for people who do need to
 267   use it regularly.  "git add --chmod=+x file" can be used instead.
 268
 269 * Build improvements for gnome-keyring (in contrib/)
 270
 271 * "git status" used to say "working directory" when it meant "working
 272   tree".
 273
 274 * Comments about misbehaving FreeBSD shells have been clarified with
 275   the version number (9.x and before are broken, newer ones are OK).
 276
 277 * "git cherry-pick A" worked on an unborn branch, but "git
 278   cherry-pick A..B" didn't.
 279
 280 * Fix an unintended regression in v2.9 that breaks "clone --depth"
 281   that recurses down to submodules by forcing the submodules to also
 282   be cloned shallowly, which many server instances that host upstream
 283   of the submodules are not prepared for.
 284
 285 * Fix unnecessarily waste in the idiomatic use of ': ${VAR=default}'
 286   to set the default value, without enclosing it in double quotes.
 287
 288 * Some platform-specific code had non-ANSI strict declarations of C
 289   functions that do not take any parameters, which has been
 290   corrected.
 291
 292 * The internal code used to show local timezone offset is not
 293   prepared to handle timestamps beyond year 2100, and gave a
 294   bogus offset value to the caller.  Use a more benign looking
 295   +0000 instead and let "git log" going in such a case, instead
 296   of aborting.
 297
 298 * One among four invocations of readlink(1) in our test suite has
 299   been rewritten so that the test can run on systems without the
 300   command (others are in valgrind test framework and t9802).
 301
 302 * t/perf needs /usr/bin/time with GNU extension; the invocation of it
 303   is updated to "gtime" on Darwin.
 304
 305 * A bug, which caused "git p4" while running under verbose mode to
 306   report paths that are omitted due to branch prefix incorrectly, has
 307   been fixed; the command said "Ignoring file outside of prefix" for
 308   paths that are _inside_.
 309
 310 * The top level documentation "git help git" still pointed at the
 311   documentation set hosted at now-defunct google-code repository.
 312   Update it to point to https://git.github.io/htmldocs/git.html
 313   instead.
 314
 315 * A helper function that takes the contents of a commit object and
 316   finds its subject line did not ignore leading blank lines, as is
 317   commonly done by other codepaths.  Make it ignore leading blank
 318   lines to match.
 319
 320 * For a long time, we carried an in-code comment that said our
 321   colored output would work only when we use fprintf/fputs on
 322   Windows, which no longer is the case for the past few years.
 323
 324 * "gc.autoPackLimit" when set to 1 should not trigger a repacking
 325   when there is only one pack, but the code counted poorly and did
 326   so.
 327
 328 * Add a test to specify the desired behaviour that currently is not
 329   available in "git rebase -Xsubtree=...".
 330
 331 * More mark-up updates to typeset strings that are expected to
 332   literally typed by the end user in fixed-width font.
 333
 334 * "git commit --amend --allow-empty-message -S" for a commit without
 335   any message body could have misidentified where the header of the
 336   commit object ends.
 337
 338 * "git rebase -i --autostash" did not restore the auto-stashed change
 339   when the operation was aborted.
 340
 341 * Git does not know what the contents in the index should be for a
 342   path added with "git add -N" yet, so "git grep --cached" should not
 343   show hits (or show lack of hits, with -L) in such a path, but that
 344   logic does not apply to "git grep", i.e. searching in the working
 345   tree files.  But we did so by mistake, which has been corrected.
 346
 347 * "git blame -M" missed a single line that was moved within the file.
 348
 349 * Fix recently introduced codepaths that are involved in parallel
 350   submodule operations, which gave up on reading too early, and
 351   could have wasted CPU while attempting to write under a corner
 352   case condition.
 353
 354 * "git grep -i" has been taught to fold case in non-ascii locales
 355   correctly.
 356
 357 * A test that unconditionally used "mktemp" learned that the command
 358   is not necessarily available everywhere.
 359
 360 * There are certain house-keeping tasks that need to be performed at
 361   the very beginning of any Git program, and programs that are not
 362   built-in commands had to do them exactly the same way as "git"
 363   potty does.  It was easy to make mistakes in one-off standalone
 364   programs (like test helpers).  A common "main()" function that
 365   calls cmd_main() of individual program has been introduced to
 366   make it harder to make mistakes.
 367   (merge de61ceb jk/common-main later to maint).
 368
 369 * The test framework learned a new helper test_match_signal to
 370   check an exit code from getting killed by an expected signal.
 371
 372 * General code clean-up around a helper function to write a
 373   single-liner to a file.
 374   (merge 7eb6e10 jk/write-file later to maint).
 375
 376 * One part of "git am" had an oddball helper function that called
 377   stuff from outside "his" as opposed to calling what we have "ours",
 378   which was not gender-neutral and also inconsistent with the rest of
 379   the system where outside stuff is usuall called "theirs" in
 380   contrast to "ours".
 381
 382 * "git blame file" allowed the lineage of lines in the uncommitted,
 383   unadded contents of "file" to be inspected, but it refused when
 384   "file" did not appear in the current commit.  When "file" was
 385   created by renaming an existing file (but the change has not been
 386   committed), this restriction was unnecessarily tight.
 387   (merge c66b470 mh/blame-worktree later to maint).
 388
 389 * "git add -N dir/file && git write-tree" produced an incorrect tree
 390   when there are other paths in the same directory that sorts after
 391   "file".
 392   (merge 6d6a782 nd/cache-tree-ita later to maint).
 393
 394 * "git fetch http://user:pass@host/repo..." scrubbed the userinfo
 395   part, but "git push" didn't.
 396   (merge 68f3c07 jk/push-scrub-url later to maint).
 397
 398 * "git merge" with renormalization did not work well with
 399   merge-recursive, due to "safer crlf" conversion kicking in when it
 400   shouldn't.
 401   (merge 1335d76 jc/renormalize-merge-kill-safer-crlf later to maint).
 402
 403 * The use of strbuf in "git rm" to build filename to remove was a bit
 404   suboptimal, which has been fixed.
 405   (merge deb8e15 rs/rm-strbuf-optim later to maint).
 406
 407 * An age old bug that caused "git diff --ignore-space-at-eol"
 408   misbehave has been fixed.
 409   (merge 044fb19 js/ignore-space-at-eol later to maint).
 410
 411 * "git notes merge" had a code to see if a path exists (and fails if
 412   it does) and then open the path for writing (when it doesn't).
 413   Replace it with open with O_EXCL.
 414   (merge deb9c15 rs/notes-merge-no-toctou later to maint).
 415
 416 * "git pack-objects" and "git index-pack" mostly operate with off_t
 417   when talking about the offset of objects in a packfile, but there
 418   were a handful of places that used "unsigned long" to hold that
 419   value, leading to an unintended truncation.
 420   (merge ec9d224 nd/pack-ofs-4gb-limit later to maint).
 421
 422 * Recent update to "git daemon" tries to enable the socket-level
 423   KEEPALIVE, but when it is spawned via inetd, the standard input
 424   file descriptor may not necessarily be connected to a socket.
 425   Suppress an ENOTSOCK error from setsockopt().
 426   (merge fab6027 ew/daemon-socket-keepalive later to maint).
 427
 428 * Recent FreeBSD stopped making perl available at /usr/bin/perl;
 429   switch the default the built-in path to /usr/local/bin/perl on not
 430   too ancient FreeBSD releases.
 431   (merge 259f22a ew/find-perl-on-freebsd-in-local later to maint).
 432
 433 * Other minor clean-ups and documentation updates
 434   (merge e51b0df pb/commit-editmsg-path later to maint).
 435   (merge b333d0d jk/send-pack-stdio later to maint).
 436   (merge fcf0fe9 lf/sideband-returns-void later to maint).
 437   (merge c2691e2 ah/unpack-trees-advice-messages later to maint).
 438   (merge c61b2af lf/recv-sideband-cleanup later to maint).
 439   (merge 31471ba rs/use-strbuf-addbuf later to maint).
 440   (merge 503e224 nd/test-helpers later to maint).
 441   (merge 16726cf jc/doc-diff-filter-exclude later to maint).
 442   (merge fd2e7da rs/worktree-use-strbuf-absolute-path later to maint).
 443   (merge 406621f sb/submodule-deinit-all later to maint).