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

Function push_notes_to_remote

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

Push the notes to the remote repository.

(
    config: EvoGitConfig, async_push: bool = True
)

Source from the content-addressed store, hash-verified

775
776
777def push_notes_to_remote(
778 config: EvoGitConfig, async_push: bool = True
779) -> subprocess.Popen | None:
780 """Push the notes to the remote repository."""
781 remote_notes_namespace = f"refs/notes/{config.hostname}-commits"
782 cmd = [
783 "git",
784 "push",
785 "-q",
786 "origin",
787 f"refs/notes/commits:{remote_notes_namespace}",
788 ]
789 if async_push:
790 # spawn the push process and return immediately
791 # don't wait for the push to finish
792 return subprocess.Popen(
793 cmd,
794 cwd=config.git_dir,
795 stdout=subprocess.DEVNULL,
796 stderr=subprocess.DEVNULL,
797 )
798 else:
799 subprocess.run(
800 cmd,
801 cwd=config.git_dir,
802 check=True,
803 stdout=subprocess.DEVNULL,
804 stderr=subprocess.DEVNULL,
805 )
806
807
808def fetch_from_remote(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected