aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <jas@mocca.josefsson.org>2007-05-25 16:28:03 +0200
committerSimon Josefsson <jas@mocca.josefsson.org>2007-05-25 16:28:03 +0200
commit24a0ff7f7e60203d8515345fd2ae43097466b806 (patch)
treeb216dfd6a078f1d5dcf14d400ebccdbd1d2a459e
parentcdb8e30a50507ca69f887c00b3a6609481c41340 (diff)
downloadgit2cl-24a0ff7f7e60203d8515345fd2ae43097466b806.zip
git2cl-24a0ff7f7e60203d8515345fd2ae43097466b806.tar.gz
git2cl-24a0ff7f7e60203d8515345fd2ae43097466b806.tar.bz2
Don't fail on empty input.
-rwxr-xr-xgit2cl10
1 files changed, 6 insertions, 4 deletions
diff --git a/git2cl b/git2cl
index aa204f5..a6d0f68 100755
--- a/git2cl
+++ b/git2cl
@@ -287,7 +287,9 @@ while (<>) {
}
}
-print (strftime "%Y-%m-%d $author\n\n", @date);
-my $msg = wrap_log_entry($comment, "\t", 69, 69);
-$msg =~ s/[ \t]+\n/\n/g;
-print "\t* $msg\n";
+if (@files) {
+ print (strftime "%Y-%m-%d $author\n\n", @date);
+ my $msg = wrap_log_entry($comment, "\t", 69, 69);
+ $msg =~ s/[ \t]+\n/\n/g;
+ print "\t* $msg\n";
+}