summaryrefslogtreecommitdiff
path: root/internal/sync/git_operations.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-29 17:07:22 +0300
committerPaul Buetow <paul@buetow.org>2026-05-29 17:07:22 +0300
commitb076c5e2ac5403de28c5d0ba44fddf216f3034ce (patch)
treea979b40edc269005879d6be2c4a2fced4210156c /internal/sync/git_operations.go
parenta956a672859e92190149506197ad0fa682e964e2 (diff)
fix(vq): handle ignored stash/pop and parse errors explicitly
Diffstat (limited to 'internal/sync/git_operations.go')
-rw-r--r--internal/sync/git_operations.go9
1 files changed, 7 insertions, 2 deletions
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