Documentation / RelNotes / 2.0.0.txton commit Merge branch 'jk/reset-to-break-a-commit-doc' (bf5f119)
   1Git v2.0 Release Notes
   2======================
   3
   4Backward compatibility notes
   5----------------------------
   6
   7When "git push [$there]" does not say what to push, we have used the
   8traditional "matching" semantics so far (all your branches were sent
   9to the remote as long as there already are branches of the same name
  10over there).  In Git 2.0, the default is now the "simple" semantics,
  11which pushes:
  12
  13 - only the current branch to the branch with the same name, and only
  14   when the current branch is set to integrate with that remote
  15   branch, if you are pushing to the same remote as you fetch from; or
  16
  17 - only the current branch to the branch with the same name, if you
  18   are pushing to a remote that is not where you usually fetch from.
  19
  20You can use the configuration variable "push.default" to change
  21this.  If you are an old-timer who wants to keep using the
  22"matching" semantics, you can set the variable to "matching", for
  23example.  Read the documentation for other possibilities.
  24
  25When "git add -u" and "git add -A" are run inside a subdirectory
  26without specifying which paths to add on the command line, they
  27operate on the entire tree for consistency with "git commit -a" and
  28other commands (these commands used to operate only on the current
  29subdirectory).  Say "git add -u ." or "git add -A ." if you want to
  30limit the operation to the current directory.
  31
  32"git add <path>" is the same as "git add -A <path>" now, so that
  33"git add dir/" will notice paths you removed from the directory and
  34record the removal.  In older versions of Git, "git add <path>" used
  35to ignore removals.  You can say "git add --ignore-removal <path>" to
  36add only added or modified paths in <path>, if you really want to.
  37
  38The "-q" option to "git diff-files", which does *NOT* mean "quiet",
  39has been removed (it told Git to ignore deletion, which you can do
  40with "git diff-files --diff-filter=d").
  41
  42"git request-pull" lost a few "heuristics" that often led to mistakes.
  43
  44The default prefix for "git svn" has changed in Git 2.0.  For a long
  45time, "git svn" created its remote-tracking branches directly under
  46refs/remotes, but it now places them under refs/remotes/origin/ unless
  47it is told otherwise with its "--prefix" option.
  48
  49
  50Updates since v1.9 series
  51-------------------------
  52
  53UI, Workflows & Features
  54
  55 * The "multi-mail" post-receive hook (in contrib/) has been updated
  56   to a more recent version from upstream.
  57
  58 * The "remote-hg/bzr" remote-helper interfaces (used to be in
  59   contrib/) are no more.  They are now maintained separately as
  60   third-party plug-ins in their own repositories.
  61
  62 * "git gc --aggressive" learned "--depth" option and
  63   "gc.aggressiveDepth" configuration variable to allow use of a less
  64   insane depth than the built-in default value of 250.
  65
  66 * "git log" learned the "--show-linear-break" option to show where a
  67   single strand-of-pearls is broken in its output.
  68
  69 * The "rev-parse --parseopt" mechanism used by scripted Porcelains to
  70   parse command-line options and to give help text learned to take
  71   the argv-help (the placeholder string for an option parameter,
  72   e.g. "key-id" in "--gpg-sign=<key-id>").
  73
  74 * The pattern to find where the function begins in C/C++ used in
  75   "diff" and "grep -p" has been updated to improve viewing C++
  76   sources.
  77
  78 * "git rebase" learned to interpret a lone "-" as "@{-1}", the
  79   branch that we were previously on.
  80
  81 * "git commit --cleanup=<mode>" learned a new mode, scissors.
  82
  83 * "git tag --list" output can be sorted using "version sort" with
  84   "--sort=version:refname".
  85
  86 * Discard the accumulated "heuristics" to guess from which branch the
  87   result wants to be pulled from and make sure that what the end user
  88   specified is not second-guessed by "git request-pull", to avoid
  89   mistakes.  When you pushed out your 'master' branch to your public
  90   repository as 'for-linus', use the new "master:for-linus" syntax to
  91   denote the branch to be pulled.
  92
  93 * "git grep" learned to behave in a way similar to native grep when
  94   "-h" (no header) and "-c" (count) options are given.
  95
  96 * "git push" via transport-helper interface has been updated to
  97   allow forced ref updates in a way similar to the natively
  98   supported transports.
  99
 100 * The "simple" mode is the default for "git push".
 101
 102 * "git add -u" and "git add -A", when run without any pathspec, is a
 103   tree-wide operation even when run inside a subdirectory of a
 104   working tree.
 105
 106 * "git add <path>" is the same as "git add -A <path>" now.
 107
 108 * "core.statinfo" configuration variable, which is a
 109   never-advertised synonym to "core.checkstat", has been removed.
 110
 111 * The "-q" option to "git diff-files", which does *NOT* mean
 112   "quiet", has been removed (it told Git to ignore deletion, which
 113   you can do with "git diff-files --diff-filter=d").
 114
 115 * Server operators can loosen the "tips of refs only" restriction for
 116   the remote archive service with the uploadarchive.allowUnreachable
 117   configuration option.
 118
 119 * The progress indicators from various time-consuming commands have
 120   been marked for i18n/l10n.
 121
 122 * "git notes -C <blob>" diagnoses as an error an attempt to use an
 123   object that is not a blob.
 124
 125 * "git config" learned to read from the standard input when "-" is
 126   given as the value to its "--file" parameter (attempting an
 127   operation to update the configuration in the standard input is
 128   rejected, of course).
 129
 130 * Trailing whitespaces in .gitignore files, unless they are quoted
 131   for fnmatch(3), e.g. "path\ ", are warned and ignored.  Strictly
 132   speaking, this is a backward-incompatible change, but very unlikely
 133   to bite any sane user and adjusting should be obvious and easy.
 134
 135 * Many commands that create commits, e.g. "pull" and "rebase",
 136   learned to take the "--gpg-sign" option on the command line.
 137
 138 * "git commit" can be told to always GPG sign the resulting commit
 139   by setting the "commit.gpgsign" configuration variable to "true"
 140   (the command-line option "--no-gpg-sign" should override it).
 141
 142 * "git pull" can be told to only accept fast-forward by setting the
 143   new "pull.ff" configuration variable.
 144
 145 * "git reset" learned the "-N" option, which does not reset the index
 146   fully for paths the index knows about but the tree-ish the command
 147   resets to does not (these paths are kept as intend-to-add entries).
 148
 149
 150Performance, Internal Implementation, etc.
 151
 152 * The compilation options to port to AIX and to MSVC have been
 153   updated.
 154
 155 * We started using wildmatch() in place of fnmatch(3) a few releases
 156   ago; complete the process and stop using fnmatch(3).
 157
 158 * Uses of curl's "multi" interface and "easy" interface do not mix
 159   well when we attempt to reuse outgoing connections.  Teach the RPC
 160   over HTTP code, used in the smart HTTP transport, not to use the
 161   "easy" interface.
 162
 163 * The bitmap-index feature from JGit has been ported, which should
 164   significantly improve performance when serving objects from a
 165   repository that uses it.
 166
 167 * The way "git log --cc" shows a combined diff against multiple
 168   parents has been optimized.
 169
 170 * The prefixcmp() and suffixcmp() functions are gone.  Use
 171   starts_with() and ends_with(), and also consider if skip_prefix()
 172   suits your needs better when using the former.
 173
 174
 175Also contains various documentation updates and code clean-ups.  Many
 176of them came from flurry of activities as GSoC candidate microproject
 177exercises.
 178
 179
 180Fixes since v1.9 series
 181-----------------------
 182
 183Unless otherwise noted, all the fixes since v1.9 in the maintenance
 184track are contained in this release (see the maintenance releases'
 185notes for details).
 186
 187 * "git p4" was broken in 1.9 release to deal with changes in binary
 188   files.
 189   (merge 749b668 cl/p4-use-diff-tree later to maint).
 190
 191 * The shell prompt script (in contrib/), when using the PROMPT_COMMAND
 192   interface, used an unsafe construct when showing the branch name in
 193   $PS1.
 194   (merge 1e4119c8 rh/prompt-pcmode-avoid-eval-on-refname later to maint).
 195
 196 * "git rebase" used a POSIX shell construct FreeBSD's /bin/sh does not
 197   work well with.
 198   (merge 8cd6596 km/avoid-non-function-return-in-rebase later to maint).
 199
 200 * zsh prompt (in contrib/) leaked unnecessary error messages.
 201
 202 * Bash completion (in contrib/) did not complete the refs and remotes
 203   correctly given "git pu<TAB>" when "pu" is aliased to "push".
 204
 205 * Some more Unicode code points, defined in Unicode 6.3 as having zero
 206   width, have been taught to our display column counting logic.
 207   (merge d813ab9 tb/unicode-6.3-zero-width later to maint).
 208
 209 * Some tests used shell constructs that did not work well on FreeBSD
 210   (merge ff7a1c6 km/avoid-bs-in-shell-glob later to maint).
 211   (merge 00764ca km/avoid-cp-a later to maint).
 212
 213 * "git update-ref --stdin" did not fail a request to create a ref
 214   when the ref already existed.
 215   (merge b9d56b5 mh/update-ref-batch-create-fix later to maint).
 216
 217 * "git diff --no-index -Mq a b" fell into an infinite loop.
 218   (merge ad1c3fb jc/fix-diff-no-index-diff-opt-parse later to maint).
 219
 220 * "git fetch --prune", when the right-hand side of multiple fetch
 221   refspecs overlap (e.g. storing "refs/heads/*" to
 222   "refs/remotes/origin/*", while storing "refs/frotz/*" to
 223   "refs/remotes/origin/fr/*"), aggressively thought that lack of
 224   "refs/heads/fr/otz" on the origin site meant we should remove
 225   "refs/remotes/origin/fr/otz" from us, without checking their
 226   "refs/frotz/otz" first.
 227
 228   Note that such a configuration is inherently unsafe (think what
 229   should happen when "refs/heads/fr/otz" does appear on the origin
 230   site), but that is not a reason not to be extra careful.
 231   (merge e6f6371 cn/fetch-prune-overlapping-destination later to maint).
 232
 233 * "git status --porcelain --branch" showed its output with labels
 234   "ahead/behind/gone" translated to the user's locale.
 235   (merge 7a76c28 mm/status-porcelain-format-i18n-fix later to maint).
 236
 237 * A stray environment variable $prefix could have leaked into and
 238   affected the behaviour of the "subtree" script (in contrib/).
 239
 240 * When it is not necessary to edit a commit log message (e.g. "git
 241   commit -m" is given a message without specifying "-e"), we used to
 242   disable the spawning of the editor by overriding GIT_EDITOR, but
 243   this means all the uses of the editor, other than to edit the
 244   commit log message, are also affected.
 245   (merge b549be0 bp/commit-p-editor later to maint).
 246
 247 * "git mv" that moves a submodule forgot to adjust the array that
 248   uses to keep track of which submodules were to be moved to update
 249   its configuration.
 250   (merge fb8a4e8 jk/mv-submodules-fix later to maint).
 251
 252 * Length limit for the pathname used when removing a path in a deep
 253   subdirectory has been removed to avoid buffer overflows.
 254   (merge 2f29e0c mh/remove-subtree-long-pathname-fix later to maint).
 255
 256 * The test helper lib-terminal always run an actual test_expect_*
 257   when included, which screwed up with the use of skil-all that may
 258   have to be done later.
 259   (merge 7e27173 jk/lib-terminal-lazy later to maint).
 260
 261 * "git index-pack" used a wrong variable to name the keep-file in an
 262   error message when the file cannot be written or closed.
 263   (merge de983a0 nd/index-pack-error-message later to maint).
 264
 265 * "rebase -i" produced a broken insn sheet when the title of a commit
 266   happened to contain '\n' (or ended with '\c') due to a careless use
 267   of 'echo'.
 268   (merge cb1aefd us/printf-not-echo later to maint).
 269
 270 * There were a few instances of 'git-foo' remaining in the
 271   documentation that should have been spelled 'git foo'.
 272   (merge 3c3e6f5 rr/doc-merge-strategies later to maint).
 273
 274 * Serving objects from a shallow repository needs to write a
 275   new file to hold the temporary shallow boundaries, but it was not
 276   cleaned when we exit due to die() or a signal.
 277   (merge 7839632 jk/shallow-update-fix later to maint).
 278
 279 * When "git stash pop" stops after failing to apply the stash
 280   (e.g. due to conflicting changes), the stash is not dropped. State
 281   that explicitly in the output to let the users know.
 282   (merge 2d4c993 jc/stash-pop-not-popped later to maint).
 283
 284 * The labels in "git status" output that describe the nature of
 285   conflicts (e.g. "both deleted") were limited to 20 bytes, which was
 286   too short for some l10n (e.g. fr).
 287   (merge c7cb333 jn/wt-status later to maint).
 288
 289 * "git clean -d pathspec" did not use the given pathspec correctly
 290   and ended up cleaning too much.
 291   (merge 1f2e108 jk/clean-d-pathspec later to maint).
 292
 293 * "git difftool" misbehaved when the repository is bound to the
 294   working tree with the ".git file" mechanism, where a textual file
 295   ".git" tells us where it is.
 296   (merge fcfec8b da/difftool-git-files later to maint).
 297
 298 * "git push" did not pay attention to "branch.*.pushremote" if it is
 299   defined earlier than "remote.pushdefault"; the order of these two
 300   variables in the configuration file should not matter, but it did
 301   by mistake.
 302   (merge 98b406f jk/remote-pushremote-config-reading later to maint).
 303
 304 * Code paths that parse timestamps in commit objects have been
 305   tightened.
 306   (merge f80d1f9 jk/commit-dates-parsing-fix later to maint).
 307
 308 * "git diff --external-diff" incorrectly fed the submodule directory
 309   in the working tree to the external diff driver when it knew that it
 310   is the same as one of the versions being compared.
 311   (merge aba4727 tr/diff-submodule-no-reuse-worktree later to maint).
 312
 313 * "git reset" needs to refresh the index when working in a working
 314   tree (it can also be used to match the index to the HEAD in an
 315   otherwise bare repository), but it failed to set up the working
 316   tree properly, causing GIT_WORK_TREE to be ignored.
 317   (merge b7756d4 nd/reset-setup-worktree later to maint).
 318
 319 * "git check-attr" when working on a repository with a working tree
 320   did not work well when the working tree was specified via the
 321   "--work-tree" (and obviously with "--git-dir") option.
 322   (merge cdbf623 jc/check-attr-honor-working-tree later to maint).
 323
 324 * "merge-recursive" was broken in 1.7.7 era and stopped working in
 325   an empty (temporary) working tree, when there are renames
 326   involved.  This has been corrected.
 327   (merge 6e2068a bk/refresh-missing-ok-in-merge-recursive later to maint.)
 328
 329 * "git rev-parse" was loose in rejecting command-line arguments
 330   that do not make sense, e.g. "--default" without the required
 331   value for that option.
 332   (merge a43219f ds/rev-parse-required-args later to maint.)
 333
 334 * "include.path" variable (or any variable that expects a path that
 335   can use ~username expansion) in the configuration file is not a
 336   boolean, but the code failed to check it.
 337   (merge 67beb60 jk/config-path-include-fix later to maint.)
 338
 339 * Commands that take pathspecs on the command line misbehaved when
 340   the pathspec is given as an absolute pathname (which is a
 341   practice not particularly encouraged) that points at a symbolic
 342   link in the working tree.
 343   (merge 6127ff6 mw/symlinks later to maint.)
 344
 345 * "git diff --quiet -- pathspec1 pathspec2" sometimes did not return
 346   the correct status value.
 347   (merge f34b205 nd/diff-quiet-stat-dirty later to maint.)
 348
 349 * Attempting to deepen a shallow repository by fetching over smart
 350   HTTP transport failed in the protocol exchange, when the no-done
 351   extension was used.  The fetching side waited for the list of
 352   shallow boundary commits after the sending side stopped talking to
 353   it.
 354   (merge 0232852 nd/http-fetch-shallow-fix later to maint.)
 355
 356 * Allow "git cmd path/", when the 'path' is where a submodule is
 357   bound to the top-level working tree, to match 'path', despite the
 358   extra and unnecessary trailing slash (such a slash is often
 359   given by command-line completion).
 360   (merge 2e70c01 nd/submodule-pathspec-ending-with-slash later to maint.)
 361
 362 * Documentation and in-code comments had many instances of mistaken
 363   use of "nor", which have been corrected.
 364   (merge 235e8d5 jl/nor-or-nand-and later to maint).