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