From 9570df7b5426b50c4256d0804cc8a30b14d77039 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 11 Mar 2026 18:34:32 +0200 Subject: fix(sync): stop relying on process cwd --- internal/sync/branch_sync.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/sync/branch_sync.go') diff --git a/internal/sync/branch_sync.go b/internal/sync/branch_sync.go index eafb551..a667ee2 100644 --- a/internal/sync/branch_sync.go +++ b/internal/sync/branch_sync.go @@ -24,7 +24,7 @@ func (s *Syncer) trackRemotesWithBranch(branch string, remotes map[string]*confi } // mergeFromRemotes merges changes from all remotes that have the branch -func mergeFromRemotes(branch string, remotesWithBranch map[string]bool) error { +func mergeFromRemotes(repoPath, branch string, remotesWithBranch map[string]bool) error { if len(remotesWithBranch) == 0 { fmt.Printf(" Branch %s is local only, will push to all remotes\n", branch) return nil @@ -32,7 +32,7 @@ func mergeFromRemotes(branch string, remotesWithBranch map[string]bool) error { // Merge changes from all remotes that have this branch for remoteName := range remotesWithBranch { - if err := mergeBranch(remoteName, branch); err != nil { + if err := mergeBranch(repoPath, remoteName, branch); err != nil { return err } } @@ -41,7 +41,7 @@ func mergeFromRemotes(branch string, remotesWithBranch map[string]bool) error { } // pushToAllRemotes pushes the branch to all configured remotes -func pushToAllRemotes(branch string, remotes map[string]*config.Organization, remotesWithBranch map[string]bool) error { +func pushToAllRemotes(repoPath, branch string, remotes map[string]*config.Organization, remotesWithBranch map[string]bool) error { for remoteName, org := range remotes { // Check if this remote has the branch remoteHasBranch := remotesWithBranch[remoteName] @@ -52,7 +52,7 @@ func pushToAllRemotes(branch string, remotes map[string]*config.Organization, re fmt.Printf(" Pushing to %s (%s)...\n", remoteName, org.Host) } - if err := pushBranchWithBackupSupport(remoteName, branch, remoteHasBranch, org); err != nil { + if err := pushBranchWithBackupSupport(repoPath, remoteName, branch, remoteHasBranch, org); err != nil { return err } } -- cgit v1.2.3