Fetch the notes from the remote repository.
(
config: EvoGitConfig, prune=True, async_fetch: bool = True
)
| 806 | |
| 807 | |
| 808 | def 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 | |
| 835 | def list_remote_notes_namespaces(config: EvoGitConfig) -> list[str]: |
no outgoing calls
no test coverage detected