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

Method MergeArchives

repository/git.go:1089–1102  ·  view source on GitHub ↗

MergeArchives merges in the remote's state of the archives reference into the local repository's.

(remote, archiveRefPattern string)

Source from the content-addressed store, hash-verified

1087// MergeArchives merges in the remote's state of the archives reference into
1088// the local repository's.
1089func (repo *GitRepo) MergeArchives(remote, archiveRefPattern string) error {
1090 remoteRefPattern := getRemoteDevtoolsRef(remote, archiveRefPattern)
1091 refsMap, err := repo.getRefHashes(remoteRefPattern)
1092 if err != nil {
1093 return err
1094 }
1095 for remoteRef := range refsMap {
1096 localRef := getLocalDevtoolsRef(remote, remoteRef)
1097 if err := repo.mergeArchives(localRef, remoteRef); err != nil {
1098 return err
1099 }
1100 }
1101 return nil
1102}
1103
1104// FetchAndReturnNewReviewHashes fetches the notes "branches" and then susses
1105// out the IDs (the revision the review points to) of any new reviews, then

Callers 1

PullNotesAndArchiveMethod · 0.95

Calls 4

getRefHashesMethod · 0.95
mergeArchivesMethod · 0.95
getRemoteDevtoolsRefFunction · 0.85
getLocalDevtoolsRefFunction · 0.85

Tested by

no test coverage detected