Skip to content

Commit d42a3c2

Browse files
skarimCopilot
andauthored
add error message for save failure
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent d7c99e4 commit d42a3c2

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

cmd/utils.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,8 @@ func pickRemote(cfg *config.Config, branch, remoteOverride string) (string, erro
10941094
cfg.Successf("Saved %q as the default remote for gh stack", selectedRemote)
10951095
cfg.Printf("To change later, run: %s", cfg.ColorCyan("git config gh-stack.remote <other-remote>"))
10961096
cfg.Printf("To clear, run: %s", cfg.ColorCyan("git config --unset gh-stack.remote"))
1097+
} else {
1098+
cfg.Warningf("Could not save remote preference: %v", saveErr)
10971099
}
10981100
}
10991101

internal/git/git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func SaveRerereDeclined() error {
191191
}
192192

193193
// GetSavedRemote returns the remote saved via gh-stack.remote git config,
194-
// or an empty string if none is saved.
194+
// or an error if none is configured.
195195
func GetSavedRemote() (string, error) {
196196
return ops.GetSavedRemote()
197197
}

0 commit comments

Comments
 (0)