PushNotesAndArchive pushes the given notes and archive refs to a remote repo.
(remote, notesRefPattern, archiveRefPattern string)
| 993 | |
| 994 | // PushNotesAndArchive pushes the given notes and archive refs to a remote repo. |
| 995 | func (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 | |
| 1005 | func (repo *GitRepo) getRefHashes(refPattern string) (map[string]string, error) { |
| 1006 | if !strings.HasSuffix(refPattern, "/*") { |
nothing calls this directly
no test coverage detected