1. XenForo 1.5.14 中文版——支持中文搜索!现已发布!查看详情
  2. Xenforo 爱好者讨论群:215909318 XenForo专区

新闻 libgit2 v0.23.0 RC1 发布,Git 开发包 下载

本帖由 漂亮的石头2015-06-30 发布。版面名称:软件资讯

  1. 漂亮的石头

    漂亮的石头 版主 管理成员

    注册:
    2012-02-10
    帖子:
    487,295
    赞:
    47
    libgit2 v0.23.0 RC1 发布,该版本对如何处理遥控器和子模块的配置作出重大变化,主要更新内容如下:

    变化和性能提升


    • Patience and minimal diff drivers can now be used for merges.


    • Merges can now ignore whitespace changes.


    • Updated binary identification in CRLF filtering to avoid false positives in
      UTF-8 files.


    • Rename and copy detection is enabled for small files.


    • Checkout can now handle an initial checkout of a repository, making
      GIT_CHECKOUT_SAFE_CREATE unnecessary for users of clone.


    • The signature parameter in the ref-modifying functions has been
      removed. Use git_repository_set_ident() and
      git_repository_ident() to override the signature to be used.


    • The local transport now auto-scales the number of threads to use
      when creating the packfile instead of sticking to one.


    • Reference renaming now uses the right id for the old value.


    • The annotated version of branch creation, HEAD detaching and reset
      allow for specifying the expression from the user to be put into the
      reflog.


    • git_rebase_commit now returns GIT_EUNMERGED when you attempt to
      commit with unstaged changes.


    • On Mac OS X, we now use SecureTransport to provide the cryptographic
      support for HTTPS connections insead of OpenSSL.


    • Checkout can now accept an index for the baseline computations via the
      baseline_index member.


    • The configuration for fetching is no longer stored inside the
      git_remote struct but has been moved to a git_fetch_options. The
      remote functions now take these options or the callbacks instead of
      setting them beforehand.


    • git_submodule instances are no longer cached or shared across
      lookup. Each submodule represents the configuration at the time of
      loading.


    • The index now uses diffs for add_all() and update_all() which
      gives it a speed boost and closer semantics to git.


    • The ssh transport now reports the stderr output from the server as
      the error message, which allows you to get the "repository not
      found" messages.


    • git_index_conflict_add() will remove staged entries that exist for
      conflicted paths.


    • The flags for a git_diff_file will now have the GIT_DIFF_FLAG_EXISTS
      bit set when a file exists on that side of the diff. This is useful
      for understanding whether a side of the diff exists in the presence of
      a conflict.


    • The constructor for a write-stream into the odb now takes
      git_off_t instead of size_t for the size of the blob, which
      allows putting large files into the odb on 32-bit systems.


    • The remote's push and pull URLs now honor the url.$URL.insteadOf
      configuration. This allows modifying URL prefixes to a custom
      value via gitconfig.


    • git_diff_foreach, git_diff_blobs, git_diff_blob_to_buffer,
      and git_diff_buffers now accept a new binary callback of type
      git_diff_binary_cb that includes the binary diff information.


    • The race condition mitigations described in racy-git.txt have been
      implemented.


    • If libcurl is installed, we will use it to connect to HTTP(S)
      servers.
    API 新增


    • The git_merge_options gained a file_flags member.


    • Parsing and retrieving a configuration value as a path is exposed
      via git_config_parse_path() and git_config_get_path()
      respectively.


    • git_repository_set_ident() and git_repository_ident() serve to
      set and query which identity will be used when writing to the
      reflog.


    • git_config_entry_free() frees a config entry.


    • git_config_get_string_buf() provides a way to safely retrieve a
      string from a non-snapshot configuration.


    • git_annotated_commit_from_revspec() allows to get an annotated
      commit from an extended sha synatx string.


    • git_repository_set_head_detached_from_annotated(),
      git_branch_create_from_annotated() and
      git_reset_from_annotated() allow for the caller to provide an
      annotated commit through which they can control what expression is
      put into the reflog as the source/target.


    • git_index_add_frombuffer() can now create a blob from memory
      buffer and add it to the index which is attached to a repository.


    • The structure git_fetch_options has been added to determine the
      runtime configuration for fetching, such as callbacks, pruning and
      autotag behaviour. It has the runtime initializer
      git_fetch_init_options().


    • The enum git_fetch_prune_t has been added, letting you specify the
      pruning behaviour for a fetch.


    • A push operation will notify the caller of what updates it indends
      to perform on the remote, which provides similar information to
      git's pre-push hook.


    • git_stash_apply() can now apply a stashed state from the stash list,
      placing the data into the working directory and index.


    • git_stash_pop() will apply a stashed state (like git_stash_apply())
      but will remove the stashed state after a successful application.


    • A new error code GIT_EEOF indicates an early EOF from the
      server. This typically indicates an error with the URL or
      configuration of the server, and tools can use this to show messages
      about failing to communicate with the server.


    • A new error code GIT_EINVALID indicates that an argument to a
      function is invalid, or an invalid operation was requested.


    • git_diff_index_to_workdir() and git_diff_tree_to_index() will now
      produce deltas of type GIT_DELTA_CONFLICTED to indicate that the index
      side of the delta is a conflict.


    • The git_status family of functions will now produce status of type
      GIT_STATUS_CONFLICTED to indicate that a conflict exists for that file
      in the index.


    • git_index_entry_is_conflict() is a utility function to determine if
      a given index entry has a non-zero stage entry, indicating that it is
      one side of a conflict.


    • It is now possible to pass a keypair via a buffer instead of a
      path. For this, GIT_CREDTYPE_SSH_MEMORY and
      git_cred_ssh_key_memory_new() have been added.


    • git_filter_list_contains will indicate whether a particular
      filter will be run in the given filter list.


    • git_commit_header_field() has been added, which allows retrieving
      the contents of an arbitrary header field.


    • git_submodule_set_branch() allows to set the configured branch for
      a submodule.

    更多内容请查看更新日志

    该版本下载地址:Source code (zip)

    ibgit2 是一个可移植、纯C语言实现的 Git 核心开发包,你可以使用它来编写自定义的 Git 应用。

    libgit2已被广泛应用在许多应用程序上,包括GitHub网站,还被应用在Plastic SCM和强大的微软Visual Studio工具箱。
    libgit2 v0.23.0 RC1 发布,Git 开发包下载地址
     
正在加载...