MCPcopy Create free account
hub / github.com/google/git-appraise / PullNotes

Method PullNotes

repository/git.go:1066–1075  ·  view source on GitHub ↗

PullNotes fetches the contents of the given notes ref from a remote repo, and then merges them with the corresponding local notes using the "cat_sort_uniq" strategy.

(remote, notesRefPattern string)

Source from the content-addressed store, hash-verified

1064// and then merges them with the corresponding local notes using the
1065// "cat_sort_uniq" strategy.
1066func (repo *GitRepo) PullNotes(remote, notesRefPattern string) error {
1067 remoteNotesRefPattern := getRemoteNotesRef(remote, notesRefPattern)
1068 fetchRefSpec := fmt.Sprintf("+%s:%s", notesRefPattern, remoteNotesRefPattern)
1069 err := repo.Fetch(remote, fetchRefSpec)
1070 if err != nil {
1071 return err
1072 }
1073
1074 return repo.MergeNotes(remote, notesRefPattern)
1075}
1076
1077func getRemoteDevtoolsRef(remote, devtoolsRefPattern string) string {
1078 relativeRef := strings.TrimPrefix(devtoolsRefPattern, devtoolsRefPrefix)

Callers

nothing calls this directly

Calls 3

FetchMethod · 0.95
MergeNotesMethod · 0.95
getRemoteNotesRefFunction · 0.85

Tested by

no test coverage detected