MCPcopy Index your code
hub / github.com/google/git-appraise / PushNotesAndArchive

Method PushNotesAndArchive

repository/git.go:995–1003  ·  view source on GitHub ↗

PushNotesAndArchive pushes the given notes and archive refs to a remote repo.

(remote, notesRefPattern, archiveRefPattern string)

Source from the content-addressed store, hash-verified

993
994// PushNotesAndArchive pushes the given notes and archive refs to a remote repo.
995func (repo *GitRepo) PushNotesAndArchive(remote, notesRefPattern, archiveRefPattern string) error {
996 notesRefspec := fmt.Sprintf("%s:%s", notesRefPattern, notesRefPattern)
997 archiveRefspec := fmt.Sprintf("%s:%s", archiveRefPattern, archiveRefPattern)
998 err := repo.runGitCommandInline("push", remote, notesRefspec, archiveRefspec)
999 if err != nil {
1000 return fmt.Errorf("Failed to push the local archive to the remote '%s': %v", remote, err)
1001 }
1002 return nil
1003}
1004
1005func (repo *GitRepo) getRefHashes(refPattern string) (map[string]string, error) {
1006 if !strings.HasSuffix(refPattern, "/*") {

Callers

nothing calls this directly

Calls 1

runGitCommandInlineMethod · 0.95

Tested by

no test coverage detected