MergeNotes merges in the remote's state of the notes reference into the local repository's.
(remote, notesRefPattern string)
| 1046 | // MergeNotes merges in the remote's state of the notes reference into the |
| 1047 | // local repository's. |
| 1048 | func (repo *GitRepo) MergeNotes(remote, notesRefPattern string) error { |
| 1049 | remoteRefPattern := getRemoteNotesRef(remote, notesRefPattern) |
| 1050 | refsMap, err := repo.getRefHashes(remoteRefPattern) |
| 1051 | if err != nil { |
| 1052 | return err |
| 1053 | } |
| 1054 | for remoteRef := range refsMap { |
| 1055 | localRef := getLocalNotesRef(remote, remoteRef) |
| 1056 | if _, err := repo.runGitCommand("notes", "--ref", localRef, "merge", remoteRef, "-s", "cat_sort_uniq"); err != nil { |
| 1057 | return err |
| 1058 | } |
| 1059 | } |
| 1060 | return nil |
| 1061 | } |
| 1062 | |
| 1063 | // PullNotes fetches the contents of the given notes ref from a remote repo, |
| 1064 | // and then merges them with the corresponding local notes using the |
no test coverage detected