aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-26 16:28:57 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-26 16:28:57 +0200
commit18f5c1632f51b7f7172441651b13ac267b421df2 (patch)
treea06c5de78874d362b09cb9bd9f5ef427efb52495
parentac29b8253e85302d57c7fad0fe23388ce92f26a4 (diff)
downloadgit-bug-18f5c1632f51b7f7172441651b13ac267b421df2.tar.gz
commands: detect when an edit title doesn't change it and abort the operation
-rw-r--r--commands/title_edit.go4
1 files changed, 4 insertions, 0 deletions
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