summaryrefslogtreecommitdiff
path: root/internal/sync/repository_setup.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/sync/repository_setup.go')
-rw-r--r--internal/sync/repository_setup.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/sync/repository_setup.go b/internal/sync/repository_setup.go
index 3ebafbd..7e2c40e 100644
--- a/internal/sync/repository_setup.go
+++ b/internal/sync/repository_setup.go
@@ -54,12 +54,12 @@ func (s *Syncer) setupNewRepository(repoPath string) error {
continue // Skip the first org we already cloned from
}
org := &s.config.Organizations[i]
-
+
// Skip backup locations if backup is not enabled
if org.BackupLocation && !s.backupEnabled {
continue
}
-
+
if err := s.addRemote(repoPath, org); err != nil {
return fmt.Errorf("failed to add remote %s: %w", s.getRemoteName(org), err)
}
@@ -75,12 +75,12 @@ func (s *Syncer) setupExistingRepository(repoPath string) error {
// Check and add any missing remotes
for i := range s.config.Organizations {
org := &s.config.Organizations[i]
-
+
// Skip backup locations if backup is not enabled
if org.BackupLocation && !s.backupEnabled {
continue
}
-
+
remoteName := s.getRemoteName(org)
// Check if remote exists
@@ -115,14 +115,14 @@ func (s *Syncer) getRemotesMap() map[string]*config.Organization {
remotes := make(map[string]*config.Organization)
for i := range s.config.Organizations {
org := &s.config.Organizations[i]
-
+
// Skip backup locations if backup is not enabled
if org.BackupLocation && !s.backupEnabled {
continue
}
-
+
remoteName := s.getRemoteName(org)
remotes[remoteName] = org
}
return remotes
-} \ No newline at end of file
+}