In the docstring for BaseRepository.diff, the kwarg argument should be flags, not flag (note the missing s).
|
flag |
|
A combination of GIT_DIFF_* constants. For a list of the constants, |
|
with a description, see git_diff_option_t in |
|
https://github.com/libgit2/libgit2/blob/master/include/git2/diff.h |
The function BaseRepository.diff maps to various other functions where the argument is flags, e.g.,
|
class Tree(Object): |
|
def diff_to_index(self, index: Index, flags: int = GIT_DIFF_NORMAL, context_lines: int = 3, interhunk_lines: int = 0) -> Diff: ... |
|
def diff_to_tree(self, tree: Tree = ..., flags: int = ..., context_lines: int = ..., interhunk_lines: int = ..., swap: bool = ...) -> Diff: ... |
|
def diff_to_workdir(self, flags: int = GIT_DIFF_NORMAL, context_lines: int = 3, interhunk_lines: int = 0) -> Diff: ... |
In the docstring for
BaseRepository.diff, thekwargargument should beflags, notflag(note the missing s).pygit2/pygit2/repository.py
Lines 509 to 512 in d327788
The function
BaseRepository.diffmaps to various other functions where the argument isflags, e.g.,pygit2/pygit2/_pygit2.pyi
Lines 543 to 546 in d327788