class documentation

Git client that talks to a server using a subprocess.

Class Method from_parsedurl Create an instance of SubprocessGitClient from a parsed URL.
Class Variable git_command Undocumented
Method _connect Create a connection to the server.

Inherited from TraditionalGitClient:

Method __init__ Initialize a TraditionalGitClient.
Method archive Request an archive of a specific commit.
Method fetch_pack Retrieve a pack from a git smart server.
Method get_refs Retrieve the current refs from a git smart server.
Method send_pack Upload a pack to a remote repository.
Constant DEFAULT_ENCODING Undocumented
Instance Variable protocol_version Undocumented
Instance Variable _remote_path_encoding Undocumented
Instance Variable _report_status_parser Undocumented

Inherited from GitClient (via TraditionalGitClient):

Method clone Clone a repository.
Method close Close the client and release any resources.
Method fetch Fetch into a target repository.
Method fetch_with_bundle_uri Fetch into a target repository, using bundle URIs for bootstrap.
Method get_url Retrieves full url to given path.
Static Method _should_send_pack Undocumented
Static Method _warn_filter_objects Undocumented
Method _handle_receive_pack_tail Handle the tail of a 'git-receive-pack' request.
Method _negotiate_receive_pack_capabilities Undocumented
Method _negotiate_upload_pack_capabilities Undocumented
Instance Variable _fetch_capabilities Undocumented
Instance Variable _report_activity Undocumented
Instance Variable _send_capabilities Undocumented
def from_parsedurl(cls, parsedurl: ParseResult, thin_packs: bool = True, report_activity: Callable[[int, str], None] | None = None, quiet: bool = False, include_tags: bool = False, dumb: bool = False, username: str | None = None, password: str | None = None, config: Config | None = None) -> SubprocessGitClient:

Create an instance of SubprocessGitClient from a parsed URL.

Parameters
parsedurl:ParseResultResult of urlparse()
thin_packs:boolWhether or not thin packs should be retrieved
report_activity:Callable[[int, str], None] | NoneOptional callback for reporting transport activity
quiet:boolWhether to suppress progress output
include_tags:boolWhether to include tags
dumb:boolWhether to use dumb protocol (not used for SubprocessGitClient)
username:str | NoneUsername for authentication (not used for SubprocessGitClient)
password:str | NonePassword for authentication (not used for SubprocessGitClient)
config:Config | NoneConfiguration object (not used for SubprocessGitClient)
Returns
SubprocessGitClientA SubprocessGitClient instance
git_command: list[str] | None =

Undocumented

def _connect(self, service: bytes, path: bytes | str, protocol_version: int | None = None) -> tuple[Protocol, Callable[[], bool], IO[bytes] | None]:

Create a connection to the server.

This method is abstract - concrete implementations should implement their own variant which connects to the server and returns an initialized Protocol object with the service ready for use and a can_read function which may be used to see if reads would block.

Parameters
service:bytesUndocumented
path:bytes | strThe path we should pass to the service. (as bytestirng)
protocol_version:int | NoneDesired Git protocol version. By default the highest mutually supported protocol version will be used.
cmdThe git service name to which we should connect.
Returns
tuple[Protocol, Callable[[], bool], IO[bytes] | None]Undocumented