From b076c5e2ac5403de28c5d0ba44fddf216f3034ce Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 29 May 2026 17:07:22 +0300 Subject: fix(vq): handle ignored stash/pop and parse errors explicitly --- internal/sync/git_operations.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'internal/sync/git_operations.go') diff --git a/internal/sync/git_operations.go b/internal/sync/git_operations.go index 08eea34..1acfb95 100644 --- a/internal/sync/git_operations.go +++ b/internal/sync/git_operations.go @@ -43,8 +43,13 @@ func stashChanges(repoPath string) error { } // popStash attempts to pop the stash (used in defer) -func popStash(repoPath string) { - gitCommand(repoPath, "stash", "pop").Run() +func popStash(repoPath string) error { + output, err := gitCommand(repoPath, "stash", "pop").CombinedOutput() + if err != nil { + return fmt.Errorf("failed to restore stashed changes: %w\n%s", err, strings.TrimSpace(string(output))) + } + + return nil } // mergeBranch merges a branch from a remote -- cgit v1.2.3