@@ -278,7 +278,7 @@ class Diff:
278278 @staticmethod
279279 def from_c (diff , repo ) -> Diff : ...
280280 @staticmethod
281- def parse_diff (git_diff : str ) -> Diff : ...
281+ def parse_diff (git_diff : str | bytes ) -> Diff : ...
282282 def __getitem__ (self , index : int ) -> Patch : ... # Diff_getitem
283283 def __iter__ (self ) -> Iterator [Patch ]: ... # -> DiffIter
284284 def __len__ (self ) -> int : ...
@@ -332,7 +332,7 @@ class Mailmap:
332332 def __init__ (self , * args ) -> None : ...
333333 def add_entry (self , real_name : str = ..., real_email : str = ..., replace_name : str = ..., replace_email : str = ...) -> None : ...
334334 @staticmethod
335- def from_buffer (buffer : str ) -> Mailmap : ...
335+ def from_buffer (buffer : str | bytes ) -> Mailmap : ...
336336 @staticmethod
337337 def from_repository (repository : Repository ) -> Mailmap : ...
338338 def resolve (self , name : str , email : str ) -> tuple [str ,str ]: ...
@@ -342,7 +342,7 @@ class Note:
342342 annotated_id : Oid
343343 id : Oid
344344 message : str
345- def remove (self , author : Signature , committer : Signature , ref : str = ... ) -> None : ...
345+ def remove (self , author : Signature , committer : Signature , ref : str = "refs/notes/commits" ) -> None : ...
346346
347347class Odb :
348348 backends : Iterator [OdbBackend ] = ...
@@ -449,8 +449,8 @@ class Repository:
449449 def _disown (self , * args , ** kwargs ) -> None : ...
450450 def _from_c (self , * args , ** kwargs ) -> None : ...
451451 def add_worktree (self , name : str , path : str , ref : Reference = ...) -> Worktree : ...
452- def applies (self , diff : Diff , location : int = ... ) -> bool : ...
453- def apply (self , diff : Diff , location : int = ... ) -> None : ...
452+ def applies (self , diff : Diff , location : int = GIT_APPLY_LOCATION_INDEX ) -> bool : ...
453+ def apply (self , diff : Diff , location : int = GIT_APPLY_LOCATION_WORKDIR ) -> None : ...
454454 def cherrypick (self , id : _OidArg ) -> None : ...
455455 def compress_references (self ) -> None : ...
456456 def create_blob (self , data : bytes ) -> Oid : ...
@@ -459,7 +459,7 @@ class Repository:
459459 def create_blob_fromworkdir (self , path : str ) -> Oid : ...
460460 def create_branch (self , name : str , commit : Commit , force = ...) -> Branch : ...
461461 def create_commit (self , reference_name : str , author : Signature , committer : Signature , message : str , tree : _OidArg , parents : list [_OidArg ], encoding : str = ...) -> Oid : ...
462- def create_note (self , message : str , author : Signature , committer : Signature , annotated_id : str , ref : str = ... , force : bool = ... ) -> Oid : ...
462+ def create_note (self , message : str , author : Signature , committer : Signature , annotated_id : str , ref : str = "refs/notes/commits" , force : bool = False ) -> Oid : ...
463463 def create_reference_direct (self , name : str , target , force = ..., message : str = ...) -> Reference : ...
464464 def create_reference_symbolic (self , name , source , force , message = ...) -> Reference : ...
465465 def create_tag (self , name : str , oid : _OidArg , type : int , tagger : Signature , message : str ) -> Oid : ...
@@ -469,13 +469,13 @@ class Repository:
469469 def git_object_lookup_prefix (self , oid : _OidArg ) -> Object : ...
470470 def init_submodules (self , submodules : list [pygit2 .Submodule ] = ..., overwrite = ...) -> None : ...
471471 def list_worktrees (self ) -> list [str ]: ...
472- def listall_branches (self , flag : int = ... ) -> list [str ]: ...
472+ def listall_branches (self , flag : int = GIT_BRANCH_LOCAL ) -> list [str ]: ...
473473 def listall_reference_objects (self ) -> list [Reference ]: ...
474474 def listall_references (self ) -> list [str ]: ...
475475 def listall_stashes (self ) -> list [Stash ]: ...
476476 def listall_submodules (self ) -> list [str ]: ...
477- def lookup_branch (self , branch_name : str , branch_type : int = ... ) -> Branch : ...
478- def lookup_note (self , annotated_id : str , ref : str = ... ) -> Note : ...
477+ def lookup_branch (self , branch_name : str , branch_type : int = GIT_BRANCH_LOCAL ) -> Branch : ...
478+ def lookup_note (self , annotated_id : str , ref : str = "refs/notes/commits" ) -> Note : ...
479479 def lookup_reference (self , name : str ) -> Reference : ...
480480 def lookup_reference_dwim (self , name : str ) -> Reference : ...
481481 def lookup_worktree (self , name : str ) -> Worktree : ...
@@ -486,7 +486,7 @@ class Repository:
486486 def merge_base_octopus (self , oids : list [_OidArg ]) -> Oid : ...
487487 def notes (self ) -> Iterator [Note ]: ...
488488 def path_is_ignored (self , path : str ) -> bool : ...
489- def raw_listall_branches (self , flag : int = ... ) -> list [bytes ]: ...
489+ def raw_listall_branches (self , flag : int = GIT_BRANCH_LOCAL ) -> list [bytes ]: ...
490490 def raw_listall_references (self ) -> list [bytes ]: ...
491491 def reset (self , oid : _OidArg , reset_type : int ) -> None : ...
492492 def revparse (self , revspec : str ) -> RevSpec : ...
@@ -496,7 +496,7 @@ class Repository:
496496 def set_refdb (self , refdb : Refdb ) -> None : ...
497497 def status (self ) -> dict [str ,int ]: ...
498498 def status_file (self , path : str ) -> int : ...
499- def walk (self , oid : _OidArg | None , sort_mode : int = ... ) -> Walker : ...
499+ def walk (self , oid : _OidArg | None , sort_mode : int = GIT_SORT_NONE ) -> Walker : ...
500500
501501class RevSpec :
502502 flags : int
@@ -574,13 +574,12 @@ class Worktree:
574574 path : str
575575 def prune (self , force = ...) -> None : ...
576576
577- def discover_repository (path : str , across_fs : bool = ... , ceiling_dirs : str = ...) -> str : ...
577+ def discover_repository (path : str , across_fs : bool = False , ceiling_dirs : str = ...) -> str : ...
578578def hash (data : bytes ) -> Oid : ...
579579def hashfile (path : str ) -> Oid : ...
580- def init_file_backend (path : str , flags : int = ... ) -> object : ...
580+ def init_file_backend (path : str , flags : int = 0 ) -> object : ...
581581def option (* args , ** kwargs ) -> None : ...
582582def reference_is_valid_name (refname : str ) -> bool : ...
583583def tree_entry_cmp (a : Object , b : Object ) -> int : ...
584584
585585_OidArg = str | Oid
586-
0 commit comments