예제 #1
0
파일: pull.go 프로젝트: google/git-appraise
// pull updates the local git-notes used for reviews with those from a remote repo.
func pull(repo repository.Repo, args []string) error {
	if len(args) > 1 {
		return errors.New("Only pulling from one remote at a time is supported.")
	}

	remote := "origin"
	if len(args) == 1 {
		remote = args[0]
	}

	if err := repo.PullNotesAndArchive(remote, notesRefPattern, archiveRefPattern); err != nil {
		return err
	}
	return nil
}