1Git v2.2 Release Notes 2====================== 3 4Updates since v2.1 5------------------ 6 7Ports 8 9 * Building on older MacOS X systems automatically sets 10 the necessary NO_APPLE_COMMON_CRYPTO build-time option. 11 12 * The support to build with NO_PTHREADS has been resurrected. 13 14 15UI, Workflows & Features 16 17 * "git archive" learned to filter what gets archived with pathspec. 18 19 * "git config --edit --global" starts from a skeletal per-user 20 configuration file contents, instead of a total blank, when the 21 user does not already have any. This immediately reduces the 22 need for a later "Have you forgotten setting core.user?" and we 23 can add more to the template as we gain more experience. 24 25 * "git stash list -p" used to be almost always a no-op because each 26 stash entry is represented as a merge commit. It learned to show 27 the difference between the base commit version and the working tree 28 version, which is in line with what "git show" gives. 29 30 * Sometimes users want to report a bug they experience on their 31 repository, but they are not at liberty to share the contents of 32 the repository. "fast-export" was taught an "--anonymize" option 33 to replace blob contents, names of people and paths and log 34 messages with bland and simple strings to help them. 35 36 * "log --date=iso" uses a slight variant of ISO 8601 format that is 37 made more human readable. A new "--date=iso-strict" option gives 38 datetime output that is more strictly conformant. 39 40 * A broken reimplementation of Git could write an invalid index that 41 records both stage #0 and higher stage entries for the same path. 42 We now notice and reject such an index, as there is no sensible 43 fallback (we do not know if the broken tool wanted to resolve and 44 forgot to remove higher stage entries, or if it wanted to unresolve 45 and forgot to remove the stage#0 entry). 46 47 * The temporary files "git mergetool" uses are named to avoid too 48 many dots in them (e.g. a temporary file for "hello.c" used to be 49 named e.g. "hello.BASE.4321.c" but now uses underscore instead, 50 e.g. "hello_BASE_4321.c"). 51 52 * The temporary files "git mergetools" uses can be placed in a newly 53 creted temporary directory, instead of the current directory, by 54 setting the mergetool.writeToTemp configuration variable. 55 56 * The "pre-receive" and "post-receive" hooks are no longer required 57 to consume their input fully (not following this requirement used 58 to result in intermittent errors in "git push"). 59 60 * The pretty-format specifier "%d", which expanded to " (tagname)" 61 for a tagged commit, gained a cousin "%D" that just gives the 62 "tagname" without frills. 63 64 * "git push" learned "--signed" push, that allows a push (i.e. 65 request to update the refs on the other side to point at a new 66 history, together with the transmission of necessary objects) to be 67 signed, so that it can be verified and audited, using the GPG 68 signature of the person who pushed, that the tips of branches at a 69 public repository really point the commits the pusher wanted to, 70 without having to "trust" the server. 71 72 * "git interpret-trailers" is a new filter to programatically edit 73 the tail end of the commit log messages. 74 75 * "git help everyday" shows the "Everyday Git in 20 commands or so" 76 document, whose contents have been updated to more modern Git 77 practice. 78 79 80Performance, Internal Implementation, etc. 81 82 * The API to manipulate the "refs" has been restructured to make it 83 more transactional, with the eventual goal to allow all-or-none 84 atomic updates and migrating the storage to something other than 85 the traditional filesystem based one (e.g. databases). 86 87 * The lockfile API and its users have been cleaned up. 88 89 * We no longer attempt to keep track of individual dependencies to 90 the header files in the build procedure, relying on automated 91 dependency generation support from modern compilers. 92 93 * In tests, we have been using NOT_{MINGW,CYGWIN} test prerequisites 94 long before negated prerequisites e.g. !MINGW were invented. 95 The former has been converted to the latter to avoid confusion. 96 97 * Looking up remotes configuration in a repository with very many 98 remotes defined has been optimized. 99 100 * There are cases where you lock and open to write a file, close it 101 to show the updated contents to external processes, and then have 102 to update the file again while still holding the lock, but the 103 lockfile API lacked support for such an access pattern. 104 105 * The API to allocate the structure to keep track of commit 106 decoration has been updated to make it less cumbersome to use. 107 108 * An in-core caching layer to let us avoid reading the same 109 configuration files number of times has been added. A few commands 110 have been converted to use this subsystem. 111 112 * Various code paths have been cleaned up and simplified by using 113 "strbuf", "starts_with()", and "skip_prefix()" APIs more. 114 115 * A few codepaths that died when large blobs that would not fit in 116 core are involved in their operation have been taught to punt 117 instead, by e.g. marking too large a blob as not to be diffed. 118 119 * A few more code paths in "commit" and "checkout" have been taught 120 to repopulate the cache-tree in the index, to help speed up later 121 "write-tree" (used in "commit") and "diff-index --cached" (used in 122 "status"). 123 124 * A common programming mistake to assign the same short option name 125 to two separate options is detected by parse_options() API to help 126 developers. 127 128 * The code path to write out the packed-refs file has been optimized, 129 which especially matters in a repository with a large number of 130 refs. 131 132 * The check to see if a ref $F can be created by making sure no 133 existing ref has $F/ as its prefix has been optimized, which 134 especially matters in a repository with a large number of existing 135 refs. 136 137 * "git fsck" was taught to check contents of tag objects a bit more. 138 139 * "git hash-object" was taught a "--literally" option to help 140 debugging. 141 142 * When running a required clean filter, we do not have to mmap the 143 original before feeding the filter. Instead, stream the file 144 contents directly to the filter and process its output. 145 146 * The scripts in the test suite can be run with "-x" option to show 147 a shell-trace of each command run in them. 148 149 * The "run-command" API learned to manage the argv and environment 150 array for child process, alleviating the need for the callers to 151 allocate and deallocate them. 152 153 154Also contains various documentation updates and code clean-ups. 155 156 157Fixes since v2.1 158---------------- 159 160Unless otherwise noted, all the fixes since v2.1 in the maintenance 161track are contained in this release (see the maintenance releases' 162notes for details). 163 164 * "git log --pretty/format=" with an empty format string did not 165 mean the more obvious "No output whatsoever" but "Use default 166 format", which was counterintuitive. 167 168 * "git -c section.var command" and "git -c section.var= command" 169 should pass the configuration differently (the former should be a 170 boolean true, the latter should be an empty string). 171 172 * Applying a patch not generated by Git in a subdirectory used to 173 check the whitespace breakage using the attributes for incorrect 174 paths. Also whitespace checks were performed even for paths 175 excluded via "git apply --exclude=<path>" mechanism. 176 177 * "git bundle create" with date-range specification were meant to 178 exclude tags outside the range, but it didn't. 179 180 * "git add x" where x that used to be a directory has become a 181 symbolic link to a directory misbehaved. 182 183 * The prompt script checked $GIT_DIR/ref/stash file to see if there 184 is a stash, which was a no-no. 185 186 * Pack-protocol documentation had a minor typo. 187 188 * "git checkout -m" did not switch to another branch while carrying 189 the local changes forward when a path was deleted from the index. 190 191 * "git daemon" (with NO_IPV6 build configuration) used to incorrectly 192 use the hostname even when gethostbyname() reported that the given 193 hostname is not found. 194 (merge 107efbe rs/daemon-fixes later to maint). 195 196 * With sufficiently long refnames, "git fast-import" could have 197 overflown an on-stack buffer. 198 199 * After "pack-refs --prune" packed refs at the top-level, it failed 200 to prune them. 201 202 * Progress output from "git gc --auto" was visible in "git fetch -q". 203 204 * We used to pass -1000 to poll(2), expecting it to also mean "no 205 timeout", which should be spelled as -1. 206 207 * "git rebase" documentation was unclear that it is required to 208 specify on what <upstream> the rebase is to be done when telling it 209 to first check out <branch>. 210 (merge 95c6826 so/rebase-doc later to maint). 211 212 * "git push" over HTTP transport had an artificial limit on number of 213 refs that can be pushed imposed by the command line length. 214 (merge 26be19b jk/send-pack-many-refspecs later to maint). 215 216 * When receiving an invalid pack stream that records the same object 217 twice, multiple threads got confused due to a race. 218 (merge ab791dd jk/index-pack-threading-races later to maint). 219 220 * An attempt to remove the entire tree in the "git fast-import" input 221 stream caused it to misbehave. 222 (merge 2668d69 mb/fast-import-delete-root later to maint). 223 224 * Reachability check (used in "git prune" and friends) did not add a 225 detached HEAD as a starting point to traverse objects still in use. 226 (merge c40fdd0 mk/reachable-protect-detached-head later to maint). 227 228 * "git config --add section.var val" used to lose existing 229 section.var whose value was an empty string. 230 (merge c1063be ta/config-add-to-empty-or-true-fix later to maint). 231 232 * "git fsck" failed to report that it found corrupt objects via its 233 exit status in some cases. 234 (merge 30d1038 jk/fsck-exit-code-fix later to maint). 235 236 * Use of "--verbose" option used to break "git branch --merged". 237 (merge 12994dd jk/maint-branch-verbose-merged later to maint). 238 239 * Some MUAs mangled a line in a message that begins with "From " to 240 ">From " when writing to a mailbox file and feeding such an input 241 to "git am" used to lose such a line. 242 (merge 85de86a jk/mbox-from-line later to maint). 243 244 * "rev-parse --verify --quiet $name" is meant to quietly exit with a 245 non-zero status when $name is not a valid object name, but still 246 gave error messages in some cases. 247 248 * A handful of C source files have been updated to include 249 "git-compat-util.h" as the first thing, to conform better to our 250 coding guidelines. 251 (merge 1c4b660 da/include-compat-util-first-in-c later to maint). 252 253 * t7004 test, which tried to run Git with small stack space, has been 254 updated to give a bit larger stack to avoid false breakage on some 255 platforms. 256 (merge b9a1907 sk/tag-contains-wo-recursion later to maint). 257 258 * A few documentation pages had example sections marked up not quite 259 correctly, which passed AsciiDoc but failed with AsciiDoctor. 260 (merge c30c43c bc/asciidoc-pretty-formats-fix later to maint). 261 (merge f8a48af bc/asciidoc later to maint). 262 263 * "gitweb" used deprecated CGI::startfrom, which was removed from 264 CGI.pm as of 4.04; use CGI::start_from instead. 265 (merge 4750f4b rm/gitweb-start-form later to maint). 266 267 * Newer versions of 'meld' breaks the auto-detection we use to see if 268 they are new enough to support the `--output` option. 269 (merge b12d045 da/mergetool-meld later to maint). 270 271 * "git pack-objects" forgot to disable the codepath to generate 272 object recheability bitmap when it needs to split the resulting 273 pack. 274 (merge 2113471 jk/pack-objects-no-bitmap-when-splitting later to maint).