Download Git 2.18.0

Spread the love

The developers behind Git have released version 2.18.0 of their software. Git allows software and project developers, among others, to perform management and version control over data and source code. The program can be seen as a competitor to Subversion or Mercurial. It has, among other things, complete branching and mergingfunctions, and is released under the gpl version 2. For an overview of comparisons between Git and other version control systems, see this page. The list of changes looks like this:

UI, Workflows & Features

  • Rename detection logic that is used in “merge” and “cherry-pick” has learned to guess when all of x/a, x/b and x/c have moved to z/a, z/b and z/c, it is likely that x/d added in the meantime would also want to move to z/d by taking the hint that the entire directory ‘x’ moved to ‘z’. A bug causing dirty files involved in a rename to be overwritten during merge has also been fixed as part of this work. Incidentally, this also avoids updating a file in the working tree after a (non-trivial) merge whose result matches what our side originally had.
  • “git filter-branch” learned to use a different exit code to allow the callers to tell the case where there was no new commits to rewrite from other error cases.
  • When built with more recent cURL, GIT_SSL_VERSION can now specify “tlsv1.3” as its value.
  • “git gui” learned that “~/.ssh/id_ecdsa.pub” and “~/.ssh/id_ed25519.pub” are also possible SSH key files.
  • “git gui” performs commit upon CTRL/CMD+ENTER but the CTRL/CMD+KP_ENTER (ie enter key on the numpad) did not have the same key binding. It now does.
  • “git gui” has been taught to work with old versions of tk (like 8.5.7) that do not support “ttk::style theme use” as a way to query the current theme.
  • “git rebase” has learned to honor “–signoff” option when using backends other than “am” (but not “–preserve-merges”).
  • “git branch –list” during an interrupted “rebase -i” now lets users distinguish the case where a detached HEAD is being rebased and a normal branch is being rebased.
  • “git merge tools” learned talking to guiffy.
  • The scripts in contrib/emacs/ have outlived their usefulness and have been replaced with a stub that errors out and tells the user there are replacements.
  • The new “working-tree-encoding” attribute can ask Git to convert the contents to the specified encoding when checking out to the working tree (and the other way around when checking in).
  • The “git config” command uses separate options eg “–int”, “–bool”, etc. to specify what type the caller wants the value to be interpreted as. A new “–type=” option has been introduced, which would make it cleaner to define new types.
  • “git config –get” learned the “–default” option, to help the calling script. Building on top of the above changes, the “git config” learns “–type=color” type. Taken together, you can do things like “git config –get foo.color –default blue” and get the ANSI color sequence for the color given to foo.color variable, or “blue” if the variable does not exist.
  • “git ls-remote” learned an option to allow sorting its output based on the refnames being shown.
  • The command line completion (in contrib/) has been taught that “git stash save” has been deprecated (“git stash push” is the preferred spelling in the new world) and does not offer it as a possible completion candidate when “git stash push” can be.
  • “git gc –prune=nonsense” spent long time repacking and then silently failed when underlying “git prune –expire=nonsense” failed to parse its command line. This has been corrected.
  • Error messages from “git push” can be painted for more visibility.
  • “git http-fetch” (deprecated) had an optional and experimental “feature” to fetch only commits and/or trees, which nobody used. This has been removed.
  • The functionality of “$GIT_DIR/info/grafts” has been superseded by the “refs/replace/” mechanism for some time now, but the internal code had support for it in many places, which has been cleaned up in order to drop support of the “grafts” mechanism.
  • “git worktree add” learned to check out an existing branch.
  • “git –no-pager cmd” did not have short-and-sweet single letter option. Now it does as “-P”.
  • “git rebase” learned “–rebase-merges” to transplant the whole topology of commit graph elsewhere.
  • “git status” learned to pay attention to UI related diff configuration variables such as diff.renames.
  • The command line completion mechanism (in contrib/) learned to load custom completion file for “git $command” where $command is a custom “git-$command” that the end user has on the $PATH when using newer version of bash- completion.
  • “git send-email” can sometimes offer confirmation dialog “Send this email?” with choices ‘Yes’, ‘No’, ‘Quit’, and ‘All’. A new action ‘Edit’ has been added to this dialog’s choice.
  • With merge.renames configuration set to false, the recursive merge strategy can be told not to spend cycles trying to find renamed paths and merge them accordingly.
  • “git status” learned to honor a new status.renames configuration to skip rename detection, which could be useful for those who want to do so without disabling the default rename detection done by the “git diff” command.
  • Command line completion (in contrib/) learned to complete pathnames for various commands better.
  • “git blame” learns to unhighlight uninteresting metadata from the originating commit on lines that are the same as the previous one, and also paint lines in different colors depending on the age of the commit.
  • Transfer protocol v2 learned to support the partial clone.
  • When a short hexadecimal string is used to name an object but there are multiple objects that share the string as the prefix of their names, the code lists these ambiguous candidates in a help message. These object names are now sorted according to their types for easier eyeballing.
  • “git fetch $there $refspec” that talks about protocol v2 can take advantage of server-side ref filtering; the code has been extended so that this mechanism triggers also when fetching with configured refspec.
  • Our HTTP client code used to advertise that we accept gzip encoding from the other side; instead, just let cURL library to advertise and negotiate the best one.
  • “git p4” learned to “unshelve” shelved commit from P4.

Performance, Internal Implementation, Development Support etc.

  • A “git fetch” from a repository with insane number of refs into a repository that is already up-to-date still wasted too many cycles making many lstat(2) calls to see if these objects at the tips exist as loose objects locally. These lstat(2) calls are optimized away by enumerating all loose objects beforehand. It is unknown if the new strategy negatively affects existing use cases, fetching into a repository with many loose objects from a repository with small number of refs.
  • Git can be built to use either v1 or v2 of the PCRE library, and so far, the build-time configuration USE_LIBPCRE=YesPlease instructed the build procedure to use v1, but now it means v2. USE_LIBPCRE1 and USE_LIBPCRE2 can be used to explicitly choose which version to use, as before.
  • The build procedure learned to optionally use symbolic links (instead of hardlinks and copies) to install “git-foo” for built-in commands, whose binaries are all identical.
  • Conversion from uchar[20] to struct object_id continues.
  • The way “git worktree prune” worked internally has been simplified, by assuming how “git worktree move” moves an existing worktree to a different place.
  • Code cleanup for the “repository” abstraction.
  • Code to find the length to uniquely abbreviate object names based on packfile content, which is a relatively recent addtion, has been optimized to use the same fan-out table.
  • The mechanism to use parse-options API to automate the command line completion continues to get extended and polished.
  • Copies of old scripted Porcelain commands in contrib/examples/ have been removed.
  • Some tests that rely on the exact hardcoded values ​​of object names have been updated in preparation for hash function migration.
  • Perf test update.
  • Test helper update.
  • The effort continues to refactor the internal global data structure to make it possible to open multiple repositories, work with and then close them,
  • Small test-helper programs have been consolidated into a single binary.
  • API cleanup around ref filter code.
  • Shell completion (in contrib) that gives list of paths have been optimized somewhat.
  • The index file is updated to record the fsmonitor section after a full scan was made, to avoid wasting the effort that has already spent.
  • Performance measuring framework in t/perf learned to help bisecting performance regressions.
  • Some multi-word source filenames are being renamed to separate words with dashes instead of underscores.
  • An reusable “memory pool” implementation has been extracted from fast-import.c, which in turn has become the first user of the mem-pool API.
  • A build-time option has been added to allow Git to be told to refer to its associated files relative to the main binary, in the same way that has been possible on Windows for quite some time, for Linux, BSDs and Darwin.
  • Precompute and store information necessary for ancestry traversal in a separate file to optimize graph walking.
  • The effort to pass the repository in-core structure throughout the API continues. This round deals with the code that implements the refs/replace/ mechanism.
  • The build procedure “make DEVELOPER=YesPlease” learned to enable a bit more warning options depending on the compiler used to help developers more. There also is “make DEVOPTS=tokens” knob available now, for those who want to help fixing warnings we usually ignore, for example.
  • A new version of the transport protocol is being worked on.
  • The code to interface to GPG has been restructured somewhat to make it cleaner to integrate with other types of signature systems later.
  • The code has been taught to use the duplicated information stored in the commit-graph file to learn the tree object name for a commit to avoid opening and parsing the commit object when it makes sense to do so.
  • “git gc” in a large repository takes a lot of time as it considers to repack all objects into one pack by default. The command has been taught to pretend as if the largest existing packfile is marked with “.keep” so that it is left untouched while objects in other packs and loose ones are repacked.
  • The transport protocol v2 is getting updated further.
  • The codepath around object-info API has been taught to take the repository object (which in turn tells the API which object store the objects are to be located).
  • “git pack-objects” needs to allocate tons of “struct object_entry” while doing its work, and shrinking its size helps the performance quite a bit.
  • The implementation of “git rebase -i –root” has been updated to use the sequencer machinery more.
  • Developer support update, by using BUG() macro instead of die() to mark codepaths that should not happen more clearly.
  • developer support. Use newer GCC on one of the builds done at TravisCI.org to get more warnings and errors diagnosed.
  • Conversion from uchar[20] to struct object_id continues.
  • By code restructuring of submodule merge in merge-recursive, informational messages from the codepath are now given using the same mechanism as other output, and honor the merge.verbosity configuration. The code also learned to give a few new messages when a granule three-way merge resolves cleanly when one side records a descendant of the commit chosen by the other side.
  • Avoid unchecked snprintf() to make future code auditing easier.
  • Many tests hardcode the raw object names, which would change once we migrate away from SHA-1. While some of them must test against exact object names, most of them do not have to use hardcoded constants in the test. The latter kind of tests have been updated to test the moral equivalent of the original without hardcoding the actual object names.
  • The list of commands with their various attributes were spread across a few places in the build procedure, but it now is getting a bit more consolidated to allow more automation.
  • Quite a many tests assumed that newly created refs are made as loose refs using the files backend, which have been updated to use proper plumbing like rev-parse and update-ref, to avoid breakage once we start using different ref backends.

Also contains various documentation updates and code clean-ups.

Version number 2.18.0
Release status Final
Operating systems Windows 7, Linux, BSD, macOS, Solaris, UNIX, Windows Server 2008, Windows Server 2012, Windows 8, Windows 10, Windows Server 2016
Website git
Download
License type GPL
You might also like
Exit mobile version