lib/git_topic/comment.rb in git-topic-0.2.4.1 vs lib/git_topic/comment.rb in git-topic-0.2.5

- old
+ new

@@ -245,13 +245,20 @@ notes_with_reply = append_reply( notes, content, :author => git_author_name_short ) - + File.open( edit_file, 'w' ){ |f| f.write( notes_with_reply )} - git "notes --ref #{notes_ref} edit -F #{edit_file}", - :must_succeed => true + + + if notes_with_reply != notes + git "notes --ref #{notes_ref} edit -F #{edit_file}", + :must_succeed => true + else + # No comments to add. + return false + end end def attrib( author, indent=0, max_w=16 ) w = max_w - indent attrib =