(remote, localNotesRef string)
| 1025 | } |
| 1026 | |
| 1027 | func getRemoteNotesRef(remote, localNotesRef string) string { |
| 1028 | // Note: The pattern for remote notes deviates from that of remote heads and devtools, |
| 1029 | // because the git command line tool requires all notes refs to be located under the |
| 1030 | // "refs/notes/" prefix. |
| 1031 | // |
| 1032 | // Because of that, we make the remote refs a subset of the local refs instead of |
| 1033 | // a parallel tree, which is the pattern used for heads and devtools. |
| 1034 | // |
| 1035 | // E.G. ("refs/notes/..." -> "refs/notes/remotes/<remote>/...") |
| 1036 | // versus ("refs/heads/..." -> "refs/remotes/<remote>/...") |
| 1037 | relativeNotesRef := strings.TrimPrefix(localNotesRef, notesRefPrefix) |
| 1038 | return notesRefPrefix + "remotes/" + remote + "/" + relativeNotesRef |
| 1039 | } |
| 1040 | |
| 1041 | func getLocalNotesRef(remote, remoteNotesRef string) string { |
| 1042 | relativeNotesRef := strings.TrimPrefix(remoteNotesRef, notesRefPrefix+"remotes/"+remote+"/") |
no outgoing calls
no test coverage detected