1- """Module with our own gitdb implementation - it uses the git command""" 
1+ """Module with our own gitdb implementation - it uses the git command.""" 
2+ 
23from  git .util  import  bin_to_hex , hex_to_bin 
34from  gitdb .base  import  OInfo , OStream 
45from  gitdb .db  import  GitDB 
2223
2324
2425class  GitCmdObjectDB (LooseObjectDB ):
25- 
2626    """A database representing the default git object store, which includes loose 
27-     objects, pack files and an alternates file 
27+     objects, pack files and an alternates file.  
2828
2929    It will create objects only in the loose object database. 
30-     :note: for now, we use the git command to do all the lookup, just until he 
31-         have packs and the other implementations 
30+ 
31+     :note: For now, we use the git command to do all the lookup, just until we 
32+         have packs and the other implementations. 
3233    """ 
3334
3435    def  __init__ (self , root_path : PathLike , git : "Git" ) ->  None :
35-         """Initialize this instance with the root and a git command""" 
36+         """Initialize this instance with the root and a git command. """ 
3637        super (GitCmdObjectDB , self ).__init__ (root_path )
3738        self ._git  =  git 
3839
@@ -48,11 +49,15 @@ def stream(self, binsha: bytes) -> OStream:
4849    # { Interface 
4950
5051    def  partial_to_complete_sha_hex (self , partial_hexsha : str ) ->  bytes :
51-         """:return: Full binary 20 byte sha from the given partial hexsha 
52+         """ 
53+         :return: Full binary 20 byte sha from the given partial hexsha 
54+ 
5255        :raise AmbiguousObjectName: 
5356        :raise BadObject: 
54-         :note: currently we only raise BadObject as git does not communicate 
55-             AmbiguousObjects separately""" 
57+ 
58+         :note: Currently we only raise :class:`BadObject` as git does not communicate 
59+             AmbiguousObjects separately. 
60+         """ 
5661        try :
5762            hexsha , _typename , _size  =  self ._git .get_object_header (partial_hexsha )
5863            return  hex_to_bin (hexsha )
0 commit comments