PushNotes pushes git notes to a remote repo.
(remote, notesRefPattern string)
| 980 | |
| 981 | // PushNotes pushes git notes to a remote repo. |
| 982 | func (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. |
| 995 | func (repo *GitRepo) PushNotesAndArchive(remote, notesRefPattern, archiveRefPattern string) error { |
nothing calls this directly
no test coverage detected