summaryrefslogtreecommitdiff
path: root/internal/sync/repository_setup.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-11 18:34:32 +0200
committerPaul Buetow <paul@buetow.org>2026-03-11 18:34:32 +0200
commit9570df7b5426b50c4256d0804cc8a30b14d77039 (patch)
treeadafdb51b9a3b76f3fe015728ecd3bbd69df14ac /internal/sync/repository_setup.go
parent9706e53620045c20bf732054a286183c70f77581 (diff)
fix(sync): stop relying on process cwd
Diffstat (limited to 'internal/sync/repository_setup.go')
-rw-r--r--internal/sync/repository_setup.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/internal/sync/repository_setup.go b/internal/sync/repository_setup.go
index 7e2c40e..e255274 100644
--- a/internal/sync/repository_setup.go
+++ b/internal/sync/repository_setup.go
@@ -96,20 +96,6 @@ func (s *Syncer) setupExistingRepository(repoPath string) error {
return nil
}
-// changeToRepoDirectory changes to the repository directory and returns a function to restore the original directory
-func changeToRepoDirectory(repoPath string) (func(), error) {
- originalDir, err := os.Getwd()
- if err != nil {
- return nil, fmt.Errorf("failed to get current directory: %w", err)
- }
-
- if err := os.Chdir(repoPath); err != nil {
- return nil, fmt.Errorf("failed to change to repository directory: %w", err)
- }
-
- return func() { os.Chdir(originalDir) }, nil
-}
-
// getRemotesMap creates a map of remote names to organizations
func (s *Syncer) getRemotesMap() map[string]*config.Organization {
remotes := make(map[string]*config.Organization)