Releases: libgit2/libgit2
libgit2 v0.21.0 RC1
Hello and welcome to a release candidate for libgit2. This is something new for us because we've never tagged a RC before but:
- We haven't shipped a release in a long ass time
- The current tip of development is not as stable as I'd like it to be
Hence, a release candidate. The tip of development will be frozen to bugfixes only until we tag the final version. Please play with it and make sure we're good.
Here are the current release notes, which I've updated to the best of my ability:
- Top-level Improvements
- We've dropped support for Windows XP. We're evil like that.
- Added a new config snapshotting API to fix race issues when different applications (e.g. Git and a libgit2 client) access the same repository simultaneously.
- Added reflog support to all APIs that could alter a reference. These APIs gained two new parameters:
const git_signature *signature
andconst char *log_message
to control what is written to the reflog. Passing NULL for these values will use defaults from the user's configuration. - Avoided race conditions when updating references. Any function that alters a reference will check if the underlying reference data has been changed since libgit2 looked up the data and cancel the operation with error
GIT_EMODIFIED
if the reference has been changed. - Converted all APIs that output string data to use
git_buf
objects for the return value. Previously these would typically take a pointer to an output buffer and a size, and generate an error if the output buffer was not large enough. - Added standard
git_<object>_init_options
functions to initialize options structures when static initialization is not possible, and renamed options structures to standardgit_<object>_options
(replacing_opts
suffix used in some places) - Improved use of
const
on pointers in many APIs (which may affect some bindings). - Replaced use of
oid
with simplyid
for references togit_oid
value.s - Previously, when a callback function returned an error value (i.e. non-zero), libgit2 converted it to
GIT_EUSER
for the parent function's return value. Now, libgit2 tries to pass through the callback's return value all the way back to the caller. To disambiguate between an error generated by the callback vs. an error generated internally by libgit2, a callback can still explicitly return theGIT_EUSER
value -- libgit2 will never use that error code for errors that it raises. - All inline functions were eliminated from the public libgit2 API
- Removed all Apache licensed code from library
- CRLF handling is much improved in the platforms where it matters (Windows)
- Attributes
- Improved compatability with core Git for filename patterns including support for
**
matches - Cache validation improvements
- Faster attribute checks
- Improved compatability with core Git for filename patterns including support for
- Blame
- Added
GIT_BLAME_FIRST_PARENT
to simplify search
- Added
- Clone
- Local clones are now supported. Rejoice!
- Checkout
- Added ability to write out conflict data using either MERGE or DIFF3 style
- Improved support for
core.autocrlf
andcore.safecrlf
- Improved handling of empty and ignored directories (impacts
git_reset
APIs, too)
- Cherry Pick
- Completely new API
- New API:
git_cherry_pick_commit
generates a newgit_index *
with result - New API:
git_cherry_pick
updates existing index and working directory
- Commit
- Faster commit parsing
- New API:
git_commit_summary
returns first paragraph of commit message with whitespace trimmed and squashed - New API:
git_commit_amend
creates a new commit that is a clone of an existing commit with selected fields overwritten - New API:
git_commit_create_from_callback
allows creating a new commit using a callback to provide parent information (ininclude/git2/sys/commit.h
) - When given a reference to update,
git_commit_create
now checks that the first parent is the current value of said reference and checks that the old value of the reference is correct when updating it. - The comment character can now be specified when parsing commit messages.
- Diff
- Faster diffs due to reduced calculation of SHAs for unknown files on disk
- Added flag
GIT_DIFF_UPDATE_INDEX
to optionally update the index stat cache while performing index-to-workdir diffs. This can yield performance improvements when doing repeated diffs (or status checks) - Added support for builtin diff drivers that is compatible (and derived from) core Git (e.g. setting attribute "*.html diff=html" will now change diff output in libgit2, whereas previously the "html" diff driver was not internally defined)
git_diff_find_similar
will now fall back to thediff.renames
config setting if no explicit options are passed ingit_diff_find_similar
gainedGIT_DIFF_FIND_REMOVE_UNMODIFIED
flag to removeGIT_DELTA_UNMODIFIED
records from a diff after rename detection is done. This allows you to generate a diff that includes UNMODIFIED records (so they can be considered as possible sources forCOPIED
files) and then remove unused ones from the final diff.- New API:
git_diff_buffers
runs diff on two in-memory buffers - New API:
git_diff_get_stats
createsgit_diff_stats
to emulate--stat
,--numstat
, and--shortstat
output - New API:
git_diff_stats_free
to freegit_diff_stats
object - New API:
git_diff_stats_to_buf
outputsgit_diff_stats
in formats like Git - New APIs:
git_diff_stats_files_changed
,git_diff_stats_insertions
, andgit_diff_stats_deletions
are accessors forgit_diff_stats
object - New API:
git_diff_format_email
to generate an email patch (in agit_buf
) from agit_diff
usinggit_diff_format_email_options
settings - New API:
git_diff_commit_as_email
to generate an email-ready patch from agit_commit
- New API:
git_diff_print_callback__to_buf
helper function for use withgit_diff_print
andgit_patch_print
to accumulate output into agit_buf *
(ininclude/git2/sys/diff.h
) - New API:
git_diff_print_callback__to_file_handle
helper function for use withgit_diff_print
andgit_patch_print
to send output to aFILE *
(ininclude/git2/sys/diff.h
) - New API:
git_diff_get_perfdata
gets low-level performance data for agit_diff
(ininclude/git2/sys/diff.h
)
- Errors
- New error code:
GIT_EMODIFIED
returned when a reference-modifying operation finds that the underlying reference was changed underneath the libgit2 call
- New error code:
- Graph
- New API:
git_graph_descendant_of
checks if one commit is the descendant of another
- New API:
- Ignores
- Lots of bug fixes
- Improved compatability with core Git for filename patterns including support for
**
matches - Cache validation improvements
- Index
- The index no longer allows tree and blob path collisions.
- Mempack
- Completely new API (in
include/git2/sys/mempack.h
) - Custom ODB backend to pack objects in memory
- Completely new API (in
- Merge
- Major changes to how the Merge APIs work
git_merge
previously produced a new commit, now stages a new commit, including writing conflicts to the index and working tree; has new function signature.- New API:
git_merge_analysis
checks if an array of merge heads can be merged, fast-forwarded, are up-to-date, or otherwise - New API:
git_merge_base_octopus
finds a merge base for an octopus merge - New API:
git_merge_head_id
returns the commit id that agit_merge_head
object refers to - New API:
git_merge_commits
merges two commits and generates new index representing merge result - New API:
git_merge_file
merges two files in memory, producing agit_merge_file_result
object - New API:
git_merge_file_from_index
merges two index entries in memory, producing agit_merge_file_result
object - New API:
git_merge_file_result_free
frees angit_merge_file_result
object
- Object
- New API:
git_object_short_id
returns unambiguous abbreviated ID string for object
- New API:
- ODB
- New API:
git_odb_exists_prefix
checks for existence of object by partialgit_oid
- New API:
- Pack
- New API:
git_packbuilder_write_buf
writes packfile togit_buf *
in memory - Delta resolution now happens iteratively instead of recursively, so no more stack overflows.
- Deflate buffer usage is now more efficient
- New API:
- Patch
- New API:
git_patch_from_buffers
createsgit_patch
object from the diff of two in-memory buffers - Added support for deflated binary patches.
- New API:
- References
- New API:
git_reference_create_matching
safely creates a direct reference to update from an expected oldconst git_oid *
value - New API:
git_reference_symbolic_create_matching
safely creates a symbolic reference to update from an expected oldconst char *
value - New API:
git_reference_remove
removes a reference by name - New API:
git_reference_ensure_log
makes sure there is a log file for a reference - New API:
git_reference_is_note
checks if reference lives inrefs/notes
namespace
- New API:
- Remotes
- New API:
git_remote_dup
copies an existing remote (except for callback functions) - New API:
git_remote_get_callbacks
gets callbacks struct from existing remote
- New API:
- Revert
- Completely new API
- New API:
git_revert_commit
generates newgit_index
with result of reverting commit - New API:
git_revert
reverts commit in working directory
- Revwalk
- APIs that previous tooks commits or references to commits can now take a "committish" (i.e. tags will be peeled to reach a commit)
git_revwalk_{push,hide}_glob
now ignores a reference if it is not a commitish instead of erroring out.- New API:
git_revwalk_add_hide_cb
enables callback to make decisions about hiding commits during a revwalk
- Status
- Faster status due to reduced calculation of SHAs for unknown files on disk
- Added flag
GIT_STATUS_OPT_UPDATE_INDEX
to optionally update the index stat cache while performing status. This can yield performance improvement...
libgit2 v0.20.0 "Anmeldung"
Apologies for the delay. This release is chunky, but you're probably used to chunky releases by now.
Full changelog follows:
Internal changes
- Added support for decomposed Unicode paths in Mac OS X
- Added support for junctions in win32
- Fixed issues with HTTP redirects in the network stack
- Performance improvements (as always)
git2/blame.h
- added full support for blame operations
git2/blob.h
- added
git_blob_filtered_content
to load blobs in memory with their corresponding filters applied
git2/branch.h
- added branch iterators as an alternative to the callback-based API
git2/buffer.h
- exported the git_buf struct to allow binary buffers to be passed from/to the library. This simplifies several APIs
git2/checkout.h
- implemented additional checkout options ('skip unmerged', 'use ours' and 'use theirs')
git2/clone.h
- simplified the clone API
- added new
git_clone_into
to clone into an existing (empty) repository
git2/commit.h
- added APIs to access the raw (uncleaned) text of a commit message
git2/common.h
- added global options to set the default paths to load templates from
git2/config.h
- added multivar iterators
- added globbing iterator
- added
git_config_foreach_match
to perform operations on every single var in a config file
git2/diff.h
- restructured and simplified the diff API
git2/filter.h
- added external APIs to configure and apply custom filters to checked out blobs
git2/index.h
git_index_read
can now force a reload of the index file even if it hasn't changed on-disk
git2/indexer.h
- improved the streaming indexer APIs
git2/merge.h
- added support for merge!
git2/object.h
- added helper API to lookup a generic object by path
git2/pack.h
- added progress callbacks to the packbuilder
git2/patch.h
- added support for patch generation as part of the Diff API revamp
git2/pathspec.h
- added helper APIs to work with pathspecs and match files in the workdir or diffs
git2/push.h
- added progress callbacks to push
git2/reflog.h
- changed reflog APIs to work on reference names instead of the references themselves, so they become less racy
git2/remote.h
- added support for setting refspecs on remotes, either at creation or on existing ones
- simplified the remotes API
git2/revwalk.h
- add API to simplify parents during a walk
git2/signature.h
- add helper to create a signature with the default values for a repository (i.e. the set
user.name
anduser.email
values, and the current time)
git2/submodules.h
- improve the status detection for submodules
git2/sys/
- exported many new internal APIs, such as pluggabe transport APIs
vmg, out
v0.19.0
Minor point release! We got a lot of rather large features that we
wanted to get settled in:
- New (threadsafe) cache for objects
- Iterator for Status
- New Merge APIs
- SSH support on *NIX
- Function context on diff
- Namespaces support
- Index add/update/remove with wildcard support
- Iterator for References
- Fetch and push refspecs for Remotes
- Rename support in Status
- New 'sys/` namespace for external headers with low-level APIs
As always, this comes with hundreds of bug fixes and performance
improvements. We're faster and better than ever. And we haven't broken
many APIs this time!
Build stuff.
libgit2 0.18.0 "Big Ben"
This is the last minor release before 1.0preview1.
Highlights of this release include:
- Branch API
- Checkout head, index and tree
- Finished clone support
- Abstracted reference API to use custom backends
- Full diff support
- New (faster) packbuilder
- Push support
- New Remotes API
- Revparse support (single and range commits)
- Stash support
- Submodules support
As always, the full changelog is available at http://libgit2.github.com/libgit2/#p/changelog.
Yeah, it's a huge release. Releasing stuff sucks.
Expect 1.0 and API freeze in less than a month.
Your faithful maintainer,
vmg