Documentation / RelNotes / 2.8.0.txton commit grep.c: remove implicit dependency on the_index (38bbc2e)
   1Git 2.8 Release Notes
   2=====================
   3
   4Backward compatibility note
   5---------------------------
   6
   7The rsync:// transport has been removed.
   8
   9
  10Updates since v2.7
  11------------------
  12
  13UI, Workflows & Features
  14
  15 * It turns out "git clone" over rsync transport has been broken when
  16   the source repository has packed references for a long time, and
  17   nobody noticed nor complained about it.
  18
  19 * "push" learned that its "--delete" option can be shortened to
  20   "-d", just like "branch --delete" and "branch -d" are the same
  21   thing.
  22
  23 * "git blame" learned to produce the progress eye-candy when it takes
  24   too much time before emitting the first line of the result.
  25
  26 * "git grep" can now be configured (or told from the command line)
  27   how many threads to use when searching in the working tree files.
  28
  29 * Some "git notes" operations, e.g. "git log --notes=<note>", should
  30   be able to read notes from any tree-ish that is shaped like a notes
  31   tree, but the notes infrastructure required that the argument must
  32   be a ref under refs/notes/.  Loosen it to require a valid ref only
  33   when the operation would update the notes (in which case we must
  34   have a place to store the updated notes tree, iow, a ref).
  35
  36 * "git grep" by default does not fall back to its "--no-index"
  37   behavior outside a directory under Git's control (otherwise the
  38   user may by mistake end up running a huge recursive search); with a
  39   new configuration (set in $HOME/.gitconfig--by definition this
  40   cannot be set in the config file per project), this safety can be
  41   disabled.
  42
  43 * "git pull --rebase" has been extended to allow invoking
  44   "rebase -i".
  45
  46 * "git p4" learned to cope with the type of a file getting changed.
  47
  48 * "git format-patch" learned to notice format.outputDirectory
  49   configuration variable.  This allows "-o <dir>" option to be
  50   omitted on the command line if you always use the same directory in
  51   your workflow.
  52
  53 * "interpret-trailers" has been taught to optionally update a file in
  54   place, instead of always writing the result to the standard output.
  55
  56 * Many commands that read files that are expected to contain text
  57   that is generated (or can be edited) by the end user to control
  58   their behavior (e.g. "git grep -f <filename>") have been updated
  59   to be more tolerant to lines that are terminated with CRLF (they
  60   used to treat such a line to contain payload that ends with CR,
  61   which is usually not what the users expect).
  62
  63 * "git notes merge" used to limit the source of the merged notes tree
  64   to somewhere under refs/notes/ hierarchy, which was too limiting
  65   when inventing a workflow to exchange notes with remote
  66   repositories using remote-tracking notes trees (located in e.g.
  67   refs/remote-notes/ or somesuch).
  68
  69 * "git ls-files" learned a new "--eol" option to help diagnose
  70   end-of-line problems.
  71
  72 * "ls-remote" learned an option to show which branch the remote
  73   repository advertises as its primary by pointing its HEAD at.
  74
  75 * New http.proxyAuthMethod configuration variable can be used to
  76   specify what authentication method to use, as a way to work around
  77   proxies that do not give error response expected by libcurl when
  78   CURLAUTH_ANY is used.  Also, the codepath for proxy authentication
  79   has been taught to use credential API to store the authentication
  80   material in user's keyrings.
  81
  82 * Update the untracked cache subsystem and change its primary UI from
  83   "git update-index" to "git config".
  84
  85 * There were a few "now I am doing this thing" progress messages in
  86   the TCP connection code that can be triggered by setting a verbose
  87   option internally in the code, but "git fetch -v" and friends never
  88   passed the verbose option down to that codepath.
  89
  90 * Clean/smudge filters defined in a configuration file of lower
  91   precedence can now be overridden to be a pass-through no-op by
  92   setting the variable to an empty string.
  93
  94 * A new "<branch>^{/!-<pattern>}" notation can be used to name a
  95   commit that is reachable from <branch> that does not match the
  96   given <pattern>.
  97
  98 * The "user.useConfigOnly" configuration variable can be used to
  99   force the user to always set user.email & user.name configuration
 100   variables, serving as a reminder for those who work on multiple
 101   projects and do not want to put these in their $HOME/.gitconfig.
 102
 103 * "git fetch" and friends that make network connections can now be
 104   told to only use ipv4 (or ipv6).
 105
 106 * Some authentication methods do not need username or password, but
 107   libcurl needs some hint that it needs to perform authentication.
 108   Supplying an empty username and password string is a valid way to
 109   do so, but you can set the http.[<url>.]emptyAuth configuration
 110   variable to achieve the same, if you find it cleaner.
 111
 112 * You can now set http.[<url>.]pinnedpubkey to specify the pinned
 113   public key when building with recent enough versions of libcURL.
 114
 115 * The configuration system has been taught to phrase where it found a
 116   bad configuration variable in a better way in its error messages.
 117   "git config" learnt a new "--show-origin" option to indicate where
 118   the values come from.
 119
 120 * The "credential-cache" daemon process used to run in whatever
 121   directory it happened to start in, but this made umount(2)ing the
 122   filesystem that houses the repository harder; now the process
 123   chdir()s to the directory that house its own socket on startup.
 124
 125 * When "git submodule update" did not result in fetching the commit
 126   object in the submodule that is referenced by the superproject, the
 127   command learned to retry another fetch, specifically asking for
 128   that commit that may not be connected to the refs it usually
 129   fetches.
 130
 131 * "git merge-recursive" learned "--no-renames" option to disable its
 132   rename detection logic.
 133
 134 * Across the transition at around Git version 2.0, the user used to
 135   get a pretty loud warning when running "git push" without setting
 136   push.default configuration variable.  We no longer warn because the
 137   transition was completed a long time ago.
 138
 139 * README has been renamed to README.md and its contents got tweaked
 140   slightly to make it easier on the eyes.
 141
 142
 143Performance, Internal Implementation, Development Support etc.
 144
 145 * Add a framework to spawn a group of processes in parallel, and use
 146   it to run "git fetch --recurse-submodules" in parallel.
 147
 148 * A slight update to the Makefile to mark ".PHONY" targets as such
 149   correctly.
 150
 151 * In-core storage of the reverse index for .pack files (which lets
 152   you go from a pack offset to an object name) has been streamlined.
 153
 154 * d95138e6 (setup: set env $GIT_WORK_TREE when work tree is set, like
 155   $GIT_DIR, 2015-06-26) attempted to work around a glitch in alias
 156   handling by overwriting GIT_WORK_TREE environment variable to
 157   affect subprocesses when set_git_work_tree() gets called, which
 158   resulted in a rather unpleasant regression to "clone" and "init".
 159   Try to address the same issue by always restoring the environment
 160   and respawning the real underlying command when handling alias.
 161
 162 * The low-level code that is used to create symbolic references has
 163   been updated to share more code with the code that deals with
 164   normal references.
 165
 166 * strbuf_getline() and friends have been redefined to make it easier
 167   to identify which callsite of (new) strbuf_getline_lf() should
 168   allow and silently ignore carriage-return at the end of the line to
 169   help users on DOSsy systems.
 170
 171 * "git shortlog" used to accumulate various pieces of information
 172   regardless of what was asked to be shown in the final output.  It
 173   has been optimized by noticing what need not to be collected
 174   (e.g. there is no need to collect the log messages when showing
 175   only the number of changes).
 176
 177 * "git checkout $branch" (and other operations that share the same
 178   underlying machinery) has been optimized.
 179
 180 * Automated tests in Travis CI environment has been optimized by
 181   persisting runtime statistics of previous "prove" run, executing
 182   tests that take longer before other ones; this reduces the total
 183   wallclock time.
 184
 185 * Test scripts have been updated to remove assumptions that are not
 186   portable between Git for POSIX and Git for Windows, or to skip ones
 187   with expectations that are not satisfiable on Git for Windows.
 188
 189 * Some calls to strcpy(3) triggers a false warning from static
 190   analyzers that are less intelligent than humans, and reducing the
 191   number of these false hits helps us notice real issues.  A few
 192   calls to strcpy(3) in a couple of protrams that are already safe
 193   has been rewritten to avoid false warnings.
 194
 195 * The "name_path" API was an attempt to reduce the need to construct
 196   the full path out of a series of path components while walking a
 197   tree hierarchy, but over time made less efficient because the path
 198   needs to be flattened, e.g. to be compared with another path that
 199   is already flat.  The API has been removed and its users have been
 200   rewritten to simplify the overall code complexity.
 201
 202 * Help those who debug http(s) part of the system.
 203   (merge 0054045 sp/remote-curl-ssl-strerror later to maint).
 204
 205 * The internal API to interact with "remote.*" configuration
 206   variables has been streamlined.
 207
 208 * The ref-filter's format-parsing code has been refactored, in
 209   preparation for "branch --format" and friends.
 210
 211 * Traditionally, the tests that try commands that work on the
 212   contents in the working tree were named with "worktree" in their
 213   filenames, but with the recent addition of "git worktree"
 214   subcommand, whose tests are also named similarly, it has become
 215   harder to tell them apart.  The traditional tests have been renamed
 216   to use "work-tree" instead in an attempt to differentiate them.
 217   (merge 5549029 mg/work-tree-tests later to maint).
 218
 219 * Many codepaths forget to check return value from git_config_set();
 220   the function is made to die() to make sure we do not proceed when
 221   setting a configuration variable failed.
 222   (merge 3d18064 ps/config-error later to maint).
 223
 224 * Handling of errors while writing into our internal asynchronous
 225   process has been made more robust, which reduces flakiness in our
 226   tests.
 227   (merge 43f3afc jk/epipe-in-async later to maint).
 228
 229 * There is a new DEVELOPER knob that enables many compiler warning
 230   options in the Makefile.
 231
 232 * The way the test scripts configure the Apache web server has been
 233   updated to work also for Apache 2.4 running on RedHat derived
 234   distros.
 235
 236 * Out of maintenance gcc on OSX 10.6 fails to compile the code in
 237   'master'; work it around by using clang by default on the platform.
 238
 239 * The "name_path" API was an attempt to reduce the need to construct
 240   the full path out of a series of path components while walking a
 241   tree hierarchy, but over time made less efficient because the path
 242   needs to be flattened, e.g. to be compared with another path that
 243   is already flat, in many cases.  The API has been removed and its
 244   users have been rewritten to simplify the overall code complexity.
 245   This incidentally also closes some heap-corruption holes.
 246
 247 * Recent versions of GNU grep is pickier than before to decide if a
 248   file is "binary" and refuse to give line-oriented hits when we
 249   expect it to, unless explicitly told with "-a" option.  As our
 250   scripted Porcelains use sane_grep wrapper for line-oriented data,
 251   even when the line may contain non-ASCII payload we took from
 252   end-user data, use "grep -a" to implement sane_grep wrapper when
 253   using an implementation of "grep" that takes the "-a" option.
 254
 255
 256
 257Also contains various documentation updates and code clean-ups.
 258
 259
 260Fixes since v2.7
 261----------------
 262
 263Unless otherwise noted, all the fixes since v2.7 in the maintenance
 264track are contained in this release (see the maintenance releases'
 265notes for details).
 266
 267 * An earlier change in 2.5.x-era broke users' hooks and aliases by
 268   exporting GIT_WORK_TREE to point at the root of the working tree,
 269   interfering when they tried to use a different working tree without
 270   setting GIT_WORK_TREE environment themselves.
 271
 272 * The "exclude_list" structure has the usual "alloc, nr" pair of
 273   fields to be used by ALLOC_GROW(), but clear_exclude_list() forgot
 274   to reset 'alloc' to 0 when it cleared 'nr' to discard the managed
 275   array.
 276
 277 * Paths that have been told the index about with "add -N" are not
 278   quite yet in the index, but a few commands behaved as if they
 279   already are in a harmful way.
 280
 281 * "git send-email" was confused by escaped quotes stored in the alias
 282   files saved by "mutt", which has been corrected.
 283
 284 * A few non-portable C construct have been spotted by clang compiler
 285   and have been fixed.
 286
 287 * The documentation has been updated to hint the connection between
 288   the '--signoff' option and DCO.
 289
 290 * "git reflog" incorrectly assumed that all objects that used to be
 291   at the tip of a ref must be commits, which caused it to segfault.
 292
 293 * The ignore mechanism saw a few regressions around untracked file
 294   listing and sparse checkout selection areas in 2.7.0; the change
 295   that is responsible for the regression has been reverted.
 296
 297 * Some codepaths used fopen(3) when opening a fixed path in $GIT_DIR
 298   (e.g. COMMIT_EDITMSG) that is meant to be left after the command is
 299   done.  This however did not work well if the repository is set to
 300   be shared with core.sharedRepository and the umask of the previous
 301   user is tighter.  They have been made to work better by calling
 302   unlink(2) and retrying after fopen(3) fails with EPERM.
 303
 304 * Asking gitweb for a nonexistent commit left a warning in the server
 305   log.
 306
 307   Somebody may want to follow this up with an additional test, perhaps?
 308   IIRC, we do test that no Perl warnings are given to the server log,
 309   so this should have been caught if our test coverage were good.
 310
 311 * "git rebase", unlike all other callers of "gc --auto", did not
 312   ignore the exit code from "gc --auto".
 313
 314 * Many codepaths that run "gc --auto" before exiting kept packfiles
 315   mapped and left the file descriptors to them open, which was not
 316   friendly to systems that cannot remove files that are open.  They
 317   now close the packs before doing so.
 318
 319 * A recent optimization to filter-branch in v2.7.0 introduced a
 320   regression when --prune-empty filter is used, which has been
 321   corrected.
 322
 323 * The description for SANITY prerequisite the test suite uses has
 324   been clarified both in the comment and in the implementation.
 325
 326 * "git tag" started listing a tag "foo" as "tags/foo" when a branch
 327   named "foo" exists in the same repository; remove this unnecessary
 328   disambiguation, which is a regression introduced in v2.7.0.
 329
 330 * The way "git svn" uses auth parameter was broken by Subversion
 331   1.9.0 and later.
 332
 333 * The "split" subcommand of "git subtree" (in contrib/) incorrectly
 334   skipped merges when it shouldn't, which was corrected.
 335
 336 * A few options of "git diff" did not work well when the command was
 337   run from a subdirectory.
 338
 339 * The command line completion learned a handful of additional options
 340   and command specific syntax.
 341
 342 * dirname() emulation has been added, as Msys2 lacks it.
 343
 344 * The underlying machinery used by "ls-files -o" and other commands
 345   has been taught not to create empty submodule ref cache for a
 346   directory that is not a submodule.  This removes a ton of wasted
 347   CPU cycles.
 348
 349 * "git worktree" had a broken code that attempted to auto-fix
 350   possible inconsistency that results from end-users moving a
 351   worktree to different places without telling Git (the original
 352   repository needs to maintain back-pointers to its worktrees,
 353   but "mv" run by end-users who are not familiar with that fact
 354   will obviously not adjust them), which actually made things
 355   worse when triggered.
 356
 357 * The low-level merge machinery has been taught to use CRLF line
 358   termination when inserting conflict markers to merged contents that
 359   are themselves CRLF line-terminated.
 360
 361 * "git push --force-with-lease" has been taught to report if the push
 362   needed to force (or fast-forwarded).
 363
 364 * The emulated "yes" command used in our test scripts has been
 365   tweaked not to spend too much time generating unnecessary output
 366   that is not used, to help those who test on Windows where it would
 367   not stop until it fills the pipe buffer due to lack of SIGPIPE.
 368
 369 * The documentation for "git clean" has been corrected; it mentioned
 370   that .git/modules/* are removed by giving two "-f", which has never
 371   been the case.
 372
 373 * The vimdiff backend for "git mergetool" has been tweaked to arrange
 374   and number buffers in the order that would match the expectation of
 375   majority of people who read left to right, then top down and assign
 376   buffers 1 2 3 4 "mentally" to local base remote merge windows based
 377   on that order.
 378
 379 * "git show 'HEAD:Foo[BAR]Baz'" did not interpret the argument as a
 380   rev, i.e. the object named by the the pathname with wildcard
 381   characters in a tree object.
 382   (merge aac4fac nd/dwim-wildcards-as-pathspecs later to maint).
 383
 384 * "git rev-parse --git-common-dir" used in the worktree feature
 385   misbehaved when run from a subdirectory.
 386   (merge 17f1365 nd/git-common-dir-fix later to maint).
 387
 388 * "git worktree add -B <branchname>" did not work.
 389
 390 * The "v(iew)" subcommand of the interactive "git am -i" command was
 391   broken in 2.6.0 timeframe when the command was rewritten in C.
 392   (merge 708b8cc jc/am-i-v-fix later to maint).
 393
 394 * "git merge-tree" used to mishandle "both sides added" conflict with
 395   its own "create a fake ancestor file that has the common parts of
 396   what both sides have added and do a 3-way merge" logic; this has
 397   been updated to use the usual "3-way merge with an empty blob as
 398   the fake common ancestor file" approach used in the rest of the
 399   system.
 400   (merge 907681e jk/no-diff-emit-common later to maint).
 401
 402 * The memory ownership rule of fill_textconv() API, which was a bit
 403   tricky, has been documented a bit better.
 404   (merge a64e6a4 jk/more-comments-on-textconv later to maint).
 405
 406 * Update various codepaths to avoid manually-counted malloc().
 407   (merge 08c95df jk/tighten-alloc later to maint).
 408
 409 * The documentation did not clearly state that the 'simple' mode is
 410   now the default for "git push" when push.default configuration is
 411   not set.
 412   (merge f6b1fb3 mm/push-simple-doc later to maint).
 413
 414 * Recent versions of GNU grep are pickier when their input contains
 415   arbitrary binary data, which some of our tests uses.  Rewrite the
 416   tests to sidestep the problem.
 417   (merge 3b1442d jk/grep-binary-workaround-in-test later to maint).
 418
 419 * A helper function "git submodule" uses since v2.7.0 to list the
 420   modules that match the pathspec argument given to its subcommands
 421   (e.g. "submodule add <repo> <path>") has been fixed.
 422   (merge 2b56bb7 sb/submodule-module-list-fix later to maint).
 423
 424 * "git config section.var value" to set a value in per-repository
 425   configuration file failed when it was run outside any repository,
 426   but didn't say the reason correctly.
 427   (merge 638fa62 js/config-set-in-non-repository later to maint).
 428
 429 * The code to read the pack data using the offsets stored in the pack
 430   idx file has been made more carefully check the validity of the
 431   data in the idx.
 432   (merge 7465feb jk/pack-idx-corruption-safety later to maint).
 433
 434 * Other minor clean-ups and documentation updates
 435   (merge f459823 ak/extract-argv0-last-dir-sep later to maint).
 436   (merge 63ca1c0 ak/git-strip-extension-from-dashed-command later to maint).
 437   (merge 4867f11 ps/plug-xdl-merge-leak later to maint).
 438   (merge 4938686 dt/initial-ref-xn-commit-doc later to maint).
 439   (merge 9537f21 ma/update-hooks-sample-typofix later to maint).