christianspecht / scm-backup

Makes offline backups of your cloud hosted source code repositories
https://scm-backup.org/
GNU General Public License v3.0
61 stars 20 forks source link

Remove duplication in *Backup #38

Closed christianspecht closed 4 years ago

christianspecht commented 4 years ago

There are multiple places like this:

   public override void BackupRepo(string subdir, ScmCredentials credentials)
    {
        InitScm();
        scm.PullFromRemote(this.repo.CloneUrl, subdir, credentials);

        if (!scm.DirectoryIsRepository(subdir))
        {
            throw new InvalidOperationException(Resource.DirectoryNoRepo);
        }
    }

There's already a "default" method in df37341, but it needs to be called in: