Python 的 Git 开发包,Pygit2 0.22.1 发布
Pygit2是libgit2共享库的一组Python绑定,libgit2是Git核心的实现。 Pygit2支持Python 2.7, 3.2, 3.3, 3.4 和 pypy。
Pygit2 0.22.1 发布,Pygit2 是 Python 的 Git 开发包,更新内容如下:不同接口重构#346(in progress):
-
新
iter(pygit2.Blame)
-
新
pygit2.DiffDelta
,pygit2.DiffFile
和pygit.DiffLine
-
API 改进和翻译提供:
Hunk => DiffHunk Patch.old_file_path => Patch.delta.old_file.path Patch.new_file_path => Patch.delta.new_file.path Patch.old_id => Patch.delta.old_file.id Patch.new_id => Patch.delta.new_file.id Patch.status => Patch.delta.status Patch.similarity => Patch.delta.similarity Patch.is_binary => Patch.delta.is_binary Patch.additions => Patch.line_stats[1] Patch.deletions => Patch.line_stats[2]
-
DiffHunk.lines
是列表DiffLine
的对象,而不是元组
新特性
-
New
Repository.expand_id(...)
andRepository.ahead_behind(...)
#448 -
New
prefix
parameter inRepository.write_archive
#481 -
New
Repository.merge_trees(...)
#489 -
New
Repository.merge_file_from_index(...)
#503 -
Now
Repository.diff
supports diffing two blobs#508 -
New optional
fetch
parameter inRemote.create
#526 -
New
Repository.get_attr(...)
#528 -
New
level
optional parameter inIndex.remove
#533 -
New
repr(TreeEntry)
#543
构建和安装改进:
Bugs 修复:
-
Repository.write_archive
fix handling of symlinks#480 -
Fix type check in
Diff[...]
#495 -
Fix error when merging files with unicode content#505
其他:
-
Documentation 改进和修复 #448#491#497#507#517#518#519#521#523#527#536
-
Expose the
pygit2.GIT_REPOSITORY_INIT_*
constants#483