format: Simplify logic for printing separator line between messages

Josh Triplett created

Change summary

src/main.rs | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Detailed changes

src/main.rs 🔗

@@ -1147,11 +1147,8 @@ fn format(out: &mut Output, repo: &Repository, m: &ArgMatches) -> Result<()> {
         try!(writeln!(out, "{}", signature));
     }
 
-    let mut need_sep = cover_entry.is_some();
     for (commit_num, commit) in commits.iter().enumerate() {
-        if !need_sep {
-            need_sep = true;
-        } else if to_stdout {
+        if to_stdout && (commit_num > 0 || cover_entry.is_some()) {
             try!(writeln!(out, ""));
         }