MCPcopy Create free account
hub / github.com/BillHuang2001/evogit / fetch_from_remote

Function fetch_from_remote

python-impl/evogit/utils/git.py:808–832  ·  view source on GitHub ↗

Fetch the notes from the remote repository.

(
    config: EvoGitConfig, prune=True, async_fetch: bool = True
)

Source from the content-addressed store, hash-verified

806
807
808def fetch_from_remote(
809 config: EvoGitConfig, prune=True, async_fetch: bool = True
810) -> subprocess.Popen | None:
811 """Fetch the notes from the remote repository."""
812 cmd = ["git", "fetch", "-q"]
813 if prune:
814 cmd.append("--prune")
815
816 cmd.append("origin")
817
818 if async_fetch:
819 return subprocess.Popen(
820 cmd,
821 cwd=config.git_dir,
822 stdout=subprocess.DEVNULL,
823 stderr=subprocess.DEVNULL,
824 )
825 else:
826 subprocess.run(
827 cmd,
828 cwd=config.git_dir,
829 check=True,
830 stdout=subprocess.DEVNULL,
831 stderr=subprocess.DEVNULL,
832 )
833
834
835def list_remote_notes_namespaces(config: EvoGitConfig) -> list[str]:

Callers 1

delete_remote_branchesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected