From 18f5c1632f51b7f7172441651b13ac267b421df2 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 26 Sep 2018 16:28:57 +0200 Subject: commands: detect when an edit title doesn't change it and abort the operation --- commands/title_edit.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'commands/title_edit.go') diff --git a/commands/title_edit.go b/commands/title_edit.go index 9d37dc5c..2d824383 100644 --- a/commands/title_edit.go +++ b/commands/title_edit.go @@ -38,6 +38,10 @@ func runTitleEdit(cmd *cobra.Command, args []string) error { } } + if titleEditTitle == snap.Title { + fmt.Println("No change, aborting.") + } + err = b.SetTitle(titleEditTitle) if err != nil { return err -- cgit