Checkout the targeted branches/tags from the git_pillar remotes

def checkout(self):
        '''
        Checkout the targeted branches/tags from the git_pillar remotes
        '''
        self.pillar_dirs = OrderedDict()
        self.pillar_linked_dirs = []
        for repo in self.remotes:
            cachedir = self.do_checkout(repo)
            if cachedir is not None:
                # Figure out which environment this remote should be assigned
                if repo.branch == '__env__' and hasattr(repo, 'all_saltenvs'):
                    env = self.opts.get('pillarenv') \
                        or self.opts.get('saltenv') \
                        or self.opts.get('git_pillar_base')
                elif repo.env:
                    env = repo.env
                else:
                    if repo.branch == repo.base:
                        env = 'base'
                    else:
                        tgt = repo.get_checkout_target()
                        env = 'base' if tgt == repo.base else tgt
                if repo._mountpoint:
                    if self.link_mountpoint(repo):
                        self.pillar_dirs[repo.linkdir] = env
                        self.pillar_linked_dirs.append(repo.linkdir)
                else:
                    self.pillar_dirs[cachedir] = env