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

Method PushNotes

repository/git.go:982–992  ·  view source on GitHub ↗

PushNotes pushes git notes to a remote repo.

(remote, notesRefPattern string)

Source from the content-addressed store, hash-verified

980
981// PushNotes pushes git notes to a remote repo.
982func (repo *GitRepo) PushNotes(remote, notesRefPattern string) error {
983 refspec := fmt.Sprintf("%s:%s", notesRefPattern, notesRefPattern)
984
985 // The push is liable to fail if the user forgot to do a pull first, so
986 // we treat errors as user errors rather than fatal errors.
987 err := repo.runGitCommandInline("push", remote, refspec)
988 if err != nil {
989 return fmt.Errorf("Failed to push to the remote '%s': %v", remote, err)
990 }
991 return nil
992}
993
994// PushNotesAndArchive pushes the given notes and archive refs to a remote repo.
995func (repo *GitRepo) PushNotesAndArchive(remote, notesRefPattern, archiveRefPattern string) error {

Callers

nothing calls this directly

Calls 1

runGitCommandInlineMethod · 0.95

Tested by

no test coverage detected