Documentation / RelNotes / 2.5.0.txton commit Merge branch 'pt/pull-tests' (0e04b24)
   1Git 2.5 Release Notes
   2=====================
   3
   4Updates since v2.4
   5------------------
   6
   7Ports
   8
   9
  10UI, Workflows & Features
  11
  12 * List of commands shown by "git help" are grouped along the workflow
  13   elements to help early learners.
  14
  15 * "git p4" now detects the filetype (e.g. binary) correctly even when
  16   the files are opened exclusively.
  17
  18 * git p4 attempts to better handle branches in Perforce.
  19
  20 * "git p4" learned "--changes-block-size <n>" to read the changes in
  21   chunks from Perforce, instead of making one call to "p4 changes"
  22   that may trigger "too many rows scanned" error from Perforce.
  23
  24 * Unlike "$EDITOR" and "$GIT_EDITOR" that can hold the path to the
  25   command and initial options (e.g. "/path/to/emacs -nw"), 'git p4'
  26   did not let the shell interpolate the contents of the environment
  27   variable that name the editor "$P4EDITOR" (and "$EDITOR", too).
  28   This release makes it in line with the rest of Git, as well as with
  29   Perforce.
  30
  31 * A new short-hand <branch>@{push} denotes the remote-tracking branch
  32   that tracks the branch at the remote the <branch> would be pushed
  33   to.
  34
  35 * "git show-branch --topics HEAD" (with no other arguments) did not
  36   do anything interesting.  Instead, contrast the given revision
  37   against all the local branches by default.
  38
  39 * A replacement for contrib/workdir/git-new-workdir that does not
  40   rely on symbolic links and make sharing of objects and refs safer
  41   by making the borrowee and borrowers aware of each other.
  42
  43 * Tweak the sample "store" backend of the credential helper to honor
  44   XDG configuration file locations when specified.
  45
  46 * A heuristic to help the "git <cmd> <revs> <pathspec>" command line
  47   convention to catch mistyped paths is to make sure all the non-rev
  48   parameters in the later part of the command line are names of the
  49   files in the working tree, but that means "git grep $str -- \*.c"
  50   must always be disambiguated with "--", because nobody sane will
  51   create a file whose name literally is asterisk-dot-see.  Loosen the
  52   heuristic to declare that with a wildcard string the user likely
  53   meant to give us a pathspec.
  54
  55 * "git merge FETCH_HEAD" learned that the previous "git fetch" could
  56   be to create an Octopus merge, i.e. recording multiple branches
  57   that are not marked as "not-for-merge"; this allows us to lose an
  58   old style invocation "git merge <msg> HEAD $commits..." in the
  59   implementation of "git pull" script; the old style syntax can now
  60   be deprecated.
  61
  62 * Help us to find broken test script that splits the body part of the
  63   test by mistaken use of wrong kind of quotes.
  64   (merge d93d5d5 jc/test-prereq-validate later to maint).
  65
  66 * Developer support to automatically detect broken &&-chain in the
  67   test scripts is now turned on by default.
  68   (merge 92b269f jk/test-chain-lint later to maint).
  69
  70 * Filter scripts were run with SIGPIPE disabled on the Git side,
  71   expecting that they may not read what Git feeds them to filter.
  72   We however treated a filter that does not read its input fully
  73   before exiting as an error.
  74
  75   This changes semantics, but arguably in a good way.  If a filter
  76   can produce its output without consuming its input using whatever
  77   magic, we now let it do so, instead of diagnosing it as a
  78   programming error.
  79
  80 * Instead of dying immediately upon failing to obtain a lock, the
  81   locking (of refs etc) retries after a short while with backoff.
  82
  83 * Introduce http.<url>.SSLCipherList configuration variable to tweak
  84   the list of cipher suite to be used with libcURL when talking with
  85   https:// sites.
  86
  87 * "git subtree" script (in contrib/) used "echo -n" to produce
  88   progress messages in a non-portable way.
  89
  90 * "git subtree" script (in contrib/) does not have --squash option
  91   when pushing, but the documentation and help text pretended as if
  92   it did.
  93
  94 * The Git subcommand completion (in contrib/) listed credential
  95   helpers among candidates, which is not something the end user would
  96   invoke interactively.
  97
  98 * The index file can be taught with "update-index --untracked-cache"
  99   to optionally remember already seen untracked files, in order to
 100   speed up "git status" in a working tree with tons of cruft.
 101
 102 * "git mergetool" learned to drive WinMerge as a backend.
 103
 104 * "git upload-pack" that serves "git fetch" can be told to serve
 105   commits that are not at the tip of any ref, as long as they are
 106   reachable from a ref, with uploadpack.allowReachableSHA1InWant
 107   configuration variable.
 108
 109 * "git cat-file --batch(-check)" learned the "--follow-symlinks"
 110   option that follows an in-tree symbolic link when asked about an
 111   object via extended SHA-1 syntax, e.g. HEAD:RelNotes that points at
 112   Documentation/RelNotes/2.5.0.txt.  With the new option, the command
 113   behaves as if HEAD:Documentation/RelNotes/2.5.0.txt was given as
 114   input instead.
 115
 116
 117Performance, Internal Implementation, Development Support etc.
 118
 119 * "unsigned char [20]" used throughout the code to represent object
 120   names are being converted into a semi-opaque "struct object_id".
 121   This effort is expected to interfere with other topics in flight,
 122   but hopefully will give us one extra level of abstraction in the
 123   end, when completed.
 124
 125 * Catch a programmer mistake to feed a pointer not an array to
 126   ARRAY_SIZE() macro, by using a couple of GCC extensions.
 127   (merge 89c855e ep/do-not-feed-a-pointer-to-array-size later to maint).
 128
 129 * Some error messages in "git config" were emitted without calling
 130   the usual error() facility.
 131
 132 * When "add--interactive" splits a hunk into two overlapping hunks
 133   and then let the user choose only one, it sometimes feeds an
 134   incorrect patch text to "git apply".  Add tests to demonstrate
 135   this.
 136
 137   I have a slight suspicion that this may be $gmane/87202 coming back
 138   and biting us (I seem to have said "let's run with this and see
 139   what happens" back then).
 140
 141 * More line-ending tests.
 142
 143 * An earlier rewrite to use strbuf_getwholeline() instead of fgets(3)
 144   to read packed-refs file revealed that the former is unacceptably
 145   inefficient.
 146
 147 * The refs API uses ref_lock struct which had its own "int fd", even
 148   though the same file descriptor was in the lock struct it contains.
 149   Clean-up the code to lose this redundant field.
 150
 151 * Add the "--allow-unknown-type" option to "cat-file" to allow
 152   inspecting loose objects of an experimental or a broken type.
 153
 154 * Many long-running operations show progress eye-candy, even when
 155   they are later backgrounded.  Hide the eye-candy when the process
 156   is sent to the background instead.
 157   (merge 9a9a41d lm/squelch-bg-progress later to maint).
 158
 159 * There was a dead code that used to handle "git pull --tags" and
 160   show special-cased error message, which was made irrelevant when
 161   the semantics of the option changed back in Git 1.9 days.
 162   (merge 19d122b pt/pull-tags-error-diag later to maint).
 163
 164 * for_each_ref() callback functions were taught to name the objects
 165   not with "unsigned char sha1[20]" but with "struct object_id".
 166
 167
 168Also contains various documentation updates and code clean-ups.
 169
 170
 171Fixes since v2.4
 172----------------
 173
 174Unless otherwise noted, all the fixes since v2.4 in the maintenance
 175track are contained in this release (see the maintenance releases'
 176notes for details).
 177
 178 * Git 2.4 broke setting verbosity and progress levels on "git clone"
 179   with native transports.
 180   (merge 822f0c4 mh/clone-verbosity-fix later to maint).
 181
 182 * "git add -e" did not allow the user to abort the operation by
 183   killing the editor.
 184   (merge cb64800 jk/add-e-kill-editor later to maint).
 185
 186 * Memory usage of "git index-pack" has been trimmed by tens of
 187   per-cent.
 188   (merge c6458e6 nd/slim-index-pack-memory-usage later to maint).
 189
 190 * "git rev-list --objects $old --not --all" to see if everything that
 191   is reachable from $old is already connected to the existing refs
 192   was very inefficient.
 193   (merge b6e8a3b jk/still-interesting later to maint).
 194
 195 * "hash-object --literally" introduced in v2.2 was not prepared to
 196   take a really long object type name.
 197   (merge 1427a7f jc/hash-object later to maint).
 198
 199 * "git rebase --quiet" was not quite quiet when there is nothing to
 200   do.
 201   (merge 22946a9 jk/rebase-quiet-noop later to maint).
 202
 203 * The completion for "log --decorate=" parameter value was incorrect.
 204   (merge af16bda sg/complete-decorate-full-not-long later to maint).
 205
 206 * "filter-branch" corrupted commit log message that ends with an
 207   incomplete line on platforms with some "sed" implementations that
 208   munge such a line.  Work it around by avoiding to use "sed".
 209   (merge df06201 jk/filter-branch-use-of-sed-on-incomplete-line later to maint).
 210
 211 * "git daemon" fails to build from the source under NO_IPV6
 212   configuration (regression in 2.4).
 213   (merge d358f77 jc/daemon-no-ipv6-for-2.4.1 later to maint).
 214
 215 * Some time ago, "git blame" (incorrectly) lost the convert_to_git()
 216   call when synthesizing a fake "tip" commit that represents the
 217   state in the working tree, which broke folks who record the history
 218   with LF line ending to make their project portable across platforms
 219   while terminating lines in their working tree files with CRLF for
 220   their platform.
 221   (merge 4bf256d tb/blame-resurrect-convert-to-git later to maint).
 222
 223 * We avoid setting core.worktree when the repository location is the
 224   ".git" directory directly at the top level of the working tree, but
 225   the code misdetected the case in which the working tree is at the
 226   root level of the filesystem (which arguably is a silly thing to
 227   do, but still valid).
 228   (merge 84ccad8 jk/init-core-worktree-at-root later to maint).
 229
 230 * "git commit --date=now" or anything that relies on approxidate lost
 231   the daylight-saving-time offset.
 232   (merge f6e6362 jc/epochtime-wo-tz later to maint).
 233
 234 * Access to objects in repositories that borrow from another one on a
 235   slow NFS server unnecessarily got more expensive due to recent code
 236   becoming more cautious in a naive way not to lose objects to pruning.
 237   (merge ee1c6c3 jk/prune-mtime later to maint).
 238
 239 * The codepaths that read .gitignore and .gitattributes files have been
 240   taught that these files encoded in UTF-8 may have UTF-8 BOM marker at
 241   the beginning; this makes it in line with what we do for configuration
 242   files already.
 243   (merge 27547e5 cn/bom-in-gitignore later to maint).
 244
 245 * a few helper scripts in the test suite did not report errors
 246   correctly.
 247   (merge de248e9 ep/fix-test-lib-functions-report later to maint).
 248
 249 * The default $HOME/.gitconfig file created upon "git config --global"
 250   that edits it had incorrectly spelled user.name and user.email
 251   entries in it.
 252   (merge 7e11052 oh/fix-config-default-user-name-section later to maint).
 253
 254 * "git cat-file bl $blob" failed to barf even though there is no
 255   object type that is "bl".
 256   (merge b7994af jk/type-from-string-gently later to maint).
 257
 258 * The usual "git diff" when seeing a file turning into a directory
 259   showed a patchset to remove the file and create all files in the
 260   directory, but "git diff --no-index" simply refused to work.  Also,
 261   when asked to compare a file and a directory, imitate POSIX "diff"
 262   and compare the file with the file with the same name in the
 263   directory, instead of refusing to run.
 264   (merge 0615173 jc/diff-no-index-d-f later to maint).
 265
 266 * "git rebase -i" moved the "current" command from "todo" to "done" a
 267   bit too prematurely, losing a step when a "pick" did not even start.
 268   (merge 8cbc57c ph/rebase-i-redo later to maint).
 269
 270 * The connection initiation code for "ssh" transport tried to absorb
 271   differences between the stock "ssh" and Putty-supplied "plink" and
 272   its derivatives, but the logic to tell that we are using "plink"
 273   variants were too loose and falsely triggered when "plink" appeared
 274   anywhere in the path (e.g. "/home/me/bin/uplink/ssh").
 275   (merge baaf233 bc/connect-plink later to maint).
 276
 277 * "git stash pop/apply" forgot to make sure that not just the working
 278   tree is clean but also the index is clean. The latter is important
 279   as a stash application can conflict and the index will be used for
 280   conflict resolution.
 281   (merge ed178ef jk/stash-require-clean-index later to maint).
 282
 283 * We have prepended $GIT_EXEC_PATH and the path "git" is installed in
 284   (typically "/usr/bin") to $PATH when invoking subprograms and hooks
 285   for almost eternity, but the original use case the latter tried to
 286   support was semi-bogus (i.e. install git to /opt/foo/git and run it
 287   without having /opt/foo on $PATH), and more importantly it has
 288   become less and less relevant as Git grew more mainstream (i.e. the
 289   users would _want_ to have it on their $PATH).  Stop prepending the
 290   path in which "git" is installed to users' $PATH, as that would
 291   interfere the command search order people depend on (e.g. they may
 292   not like versions of programs that are unrelated to Git in /usr/bin
 293   and want to override them by having different ones in /usr/local/bin
 294   and have the latter directory earlier in their $PATH).
 295   (merge a0b4507 jk/git-no-more-argv0-path-munging later to maint).
 296
 297 * core.excludesfile (defaulting to $XDG_HOME/git/ignore) is supposed
 298   to be overridden by repository-specific .git/info/exclude file, but
 299   the order was swapped from the beginning. This belatedly fixes it.
 300   (merge 099d2d8 jc/gitignore-precedence later to maint).
 301
 302 * After "git add -N", the path appeared in output of "git diff HEAD"
 303   and "git diff --cached HEAD", leading "git status" to classify it
 304   as "Changes to be committed".  Such a path, however, is not yet to
 305   be scheduled to be committed.  "git diff" showed the change to the
 306   path as modification, not as a "new file", in the header of its
 307   output.
 308
 309   Treat such paths as "yet to be added to the index but Git already
 310   know about them"; "git diff HEAD" and "git diff --cached HEAD"
 311   should not talk about them, and "git diff" should show them as new
 312   files yet to be added to the index.
 313   (merge d95d728 nd/diff-i-t-a later to maint).
 314
 315 * There was a commented-out (instead of being marked to expect
 316   failure) test that documented a breakage that was fixed since the
 317   test was written; turn it into a proper test.
 318   (merge 66d2e04 sb/t1020-cleanup later to maint).
 319
 320 * The "log --decorate" enhancement in Git 2.4 that shows the commit
 321   at the tip of the current branch e.g. "HEAD -> master", did not
 322   work with --decorate=full.
 323   (merge 429ad20 mg/log-decorate-HEAD later to maint).
 324
 325 * The ref API did not handle cases where 'refs/heads/xyzzy/frotz' is
 326   removed at the same time as 'refs/heads/xyzzy' is added (or vice
 327   versa) very well.
 328   (merge c628edf mh/ref-directory-file later to maint).
 329
 330 * Multi-ref transaction support we merged a few releases ago
 331   unnecessarily kept many file descriptors open, risking to fail with
 332   resource exhaustion.  This is for 2.4.x track.
 333   (merge 185ce3a mh/write-refs-sooner-2.4 later to maint).
 334
 335 * "git bundle verify" did not diagnose extra parameters on the
 336   command line.
 337   (merge 7886cfa ps/bundle-verify-arg later to maint).
 338
 339 * Various documentation mark-up fixes to make the output more
 340   consistent in general and also make AsciiDoctor (an alternative
 341   formatter) happier.
 342   (merge d0258b9 jk/asciidoc-markup-fix later to maint).
 343   (merge ad3967a jk/stripspace-asciidoctor-fix later to maint).
 344   (merge 975e382 ja/tutorial-asciidoctor-fix later to maint).
 345
 346 * The code to read pack-bitmap wanted to allocate a few hundred
 347   pointers to a structure, but by mistake allocated and leaked memory
 348   enough to hold that many actual structures.  Correct the allocation
 349   size and also have it on stack, as it is small enough.
 350   (merge 599dc76 rs/plug-leak-in-pack-bitmaps later to maint).
 351
 352 * The pull.ff configuration was supposed to override the merge.ff
 353   configuration, but it didn't.
 354   (merge db9bb28 pt/pull-ff-vs-merge-ff later to maint).
 355
 356 * "git pull --log" and "git pull --no-log" worked as expected, but
 357   "git pull --log=20" did not.
 358   (merge 5061a44 pt/pull-log-n later to maint).
 359
 360 * "git rerere forget" in a repository without rerere enabled gave a
 361   cryptic error message; it should be a silent no-op instead.
 362   (merge 0544574 jk/rerere-forget-check-enabled later to maint).
 363
 364 * "git rebase -i" fired post-rewrite hook when it shouldn't (namely,
 365   when it was told to stop sequencing with 'exec' insn).
 366   (merge 141ff8f mm/rebase-i-post-rewrite-exec later to maint).
 367
 368 * Clarify that "log --raw" and "log --format=raw" are unrelated
 369   concepts.
 370   (merge 92de921 mm/log-format-raw-doc later to maint).
 371
 372 * Make "git stash something --help" error out, so that users can
 373   safely say "git stash drop --help".
 374   (merge 5ba2831 jk/stash-options later to maint).
 375
 376 * The clean/smudge interface did not work well when filtering an
 377   empty contents (failed and then passed the empty input through).
 378   It can be argued that a filter that produces anything but empty for
 379   an empty input is nonsense, but if the user wants to do strange
 380   things, then why not?
 381   (merge f6a1e1e jh/filter-empty-contents later to maint).
 382
 383 * Communication between the HTTP server and http_backend process can
 384   lead to a dead-lock when relaying a large ref negotiation request.
 385   Diagnose the situation better, and mitigate it by reading such a
 386   request first into core (to a reasonable limit).
 387   (merge 636614f jk/http-backend-deadlock later to maint).
 388
 389 * "git clean pathspec..." tried to lstat(2) and complain even for
 390   paths outside the given pathspec.
 391   (merge 838d6a9 dt/clean-pathspec-filter-then-lstat later to maint).
 392
 393 * Code cleanups and documentation updates.
 394   (merge 0269f96 mm/usage-log-l-can-take-regex later to maint).
 395   (merge 64f2589 nd/t1509-chroot-test later to maint).
 396   (merge d201a1e sb/test-bitmap-free-at-end later to maint).
 397   (merge 05bfc7d sb/line-log-plug-pairdiff-leak later to maint).
 398   (merge 846e5df pt/xdg-config-path later to maint).
 399   (merge 1154aa4 jc/plug-fmt-merge-msg-leak later to maint).
 400   (merge 319b678 jk/sha1-file-reduce-useless-warnings later to maint).
 401   (merge 9a35c14 fg/document-commit-message-stripping later to maint).
 402   (merge bbf431c ps/doc-packfile-vs-pack-file later to maint).
 403   (merge 309a9e3 jk/skip-http-tests-under-no-curl later to maint).
 404   (merge ccd593c dl/branch-error-message later to maint).
 405   (merge 22570b6 rs/janitorial later to maint).
 406   (merge 5c2a581 mc/commit-doc-grammofix later to maint).
 407   (merge ce41720 ah/usage-strings later to maint).