diff --git a/.mailmap b/.mailmap index 5c3799b..453de86 100644 --- a/.mailmap +++ b/.mailmap @@ -4,4 +4,6 @@ J. David Ibáñez Martin Lenders Richo Healey Xavier Delannoy -Xu Tao +Xu Tao +Xu Tao + diff --git a/docs/blame.rst b/docs/blame.rst new file mode 100644 index 0000000..b0c7381 --- /dev/null +++ b/docs/blame.rst @@ -0,0 +1,46 @@ +********************************************************************** +Blame +********************************************************************** + +.. contents:: + + +.. automethod:: pygit2.Repository.blame + + +The Blame type +============== + +.. automethod:: pygit2.Blame.for_line +.. method:: iter(Blame) +.. method:: len(Blame) +.. method:: Blame[n] + + +The BlameHunk type +================== + +Attributes: + +.. autoattribute:: pygit2.BlameHunk.lines_in_hunk +.. autoattribute:: pygit2.BlameHunk.final_commit_id +.. autoattribute:: pygit2.BlameHunk.final_start_line_number +.. autoattribute:: pygit2.BlameHunk.orig_commit_id +.. autoattribute:: pygit2.BlameHunk.orig_path +.. autoattribute:: pygit2.BlameHunk.orig_start_line_number +.. autoattribute:: pygit2.BlameHunk.boundary + +Getters: + +.. autoattribute:: pygit2.BlameHunk.final_committer +.. autoattribute:: pygit2.BlameHunk.orig_committer + + +Constants +========= + +.. py:data:: GIT_BLAME_NORMAL +.. py:data:: GIT_BLAME_TRACK_COPIES_SAME_FILE +.. py:data:: GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES +.. py:data:: GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES +.. py:data:: GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES diff --git a/docs/diff.rst b/docs/diff.rst index d81fa9c..0e5fbaf 100644 --- a/docs/diff.rst +++ b/docs/diff.rst @@ -35,6 +35,10 @@ The Diff type ==================== .. autoattribute:: pygit2.Diff.patch +.. method:: len(Diff) + + Returns the number of deltas/patches in this diff. + .. automethod:: pygit2.Diff.merge .. automethod:: pygit2.Diff.find_similar @@ -42,6 +46,8 @@ The Diff type The Patch type ==================== +Attributes: + .. autoattribute:: pygit2.Patch.old_file_path .. autoattribute:: pygit2.Patch.new_file_path .. autoattribute:: pygit2.Patch.old_oid @@ -49,6 +55,12 @@ The Patch type .. autoattribute:: pygit2.Patch.status .. autoattribute:: pygit2.Patch.similarity .. autoattribute:: pygit2.Patch.hunks +.. autoattribute:: pygit2.Patch.additions +.. autoattribute:: pygit2.Patch.deletions + +Getters: + +.. autoattribute:: pygit2.Patch.is_binary The Hunk type diff --git a/docs/index.rst b/docs/index.rst index 5d25e68..f838b35 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -44,6 +44,7 @@ Usage guide: merge config remotes + blame Indices and tables diff --git a/docs/objects.rst b/docs/objects.rst index 73db010..377829e 100644 --- a/docs/objects.rst +++ b/docs/objects.rst @@ -109,6 +109,9 @@ This is their API: >>> print blob.size 130 +.. autoattribute:: pygit2.Blob.is_binary + + Creating blobs -------------- diff --git a/docs/references.rst b/docs/references.rst index 4db5eae..363e3ee 100644 --- a/docs/references.rst +++ b/docs/references.rst @@ -18,6 +18,7 @@ The Reference type ==================== .. autoattribute:: pygit2.Reference.name +.. autoattribute:: pygit2.Reference.shorthand .. autoattribute:: pygit2.Reference.target .. autoattribute:: pygit2.Reference.type @@ -25,6 +26,7 @@ The Reference type .. automethod:: pygit2.Reference.rename .. automethod:: pygit2.Reference.resolve .. automethod:: pygit2.Reference.log +.. automethod:: pygit2.Reference.log_append .. automethod:: pygit2.Reference.get_object @@ -38,7 +40,7 @@ Example. These two lines are equivalent:: .. autoattribute:: pygit2.Repository.head .. autoattribute:: pygit2.Repository.head_is_detached -.. autoattribute:: pygit2.Repository.head_is_orphaned +.. autoattribute:: pygit2.Repository.head_is_unborn Branches ====================