Пример #1
0
// 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
}