def _set_alternates(self, alts):
        alternates_path = os.path.join(self.path, 'objects', 'info', 'alternates') 
        if not alts:
            if os.path.isfile(alternates_path):
                os.remove(alternates_path)
        else:
            try:
                f = open(alternates_path, 'w')
                f.write("\n".join(alts))
            finally:
                f.close()
            # END file handling 
        # END alts handling
Sets the alternates
dataset/ETHPy150Open kergoth/git-origin/git-python/lib/git/repo.py/Repo._set_alternates