$self->_iterate_commits(
sub {
my $log = shift;
+ say "";
say "-" x 75;
$self->show_header($log);
$self->show_body($log, 1);
$self->_iterate_commits(
sub {
my $log = shift;
+ say "";
say "-" x 75;
$self->show_header($log);
- $self->show_body($log, 1);
$self->show_notes($log, 1);
say "-" x 75;
return $self->dispatch( $self->prompt( @choices ), $log);
sub add_note {
my ($self, $id, $note) = @_;
- my @lines = split "\n", $note;
+ my @lines = split "\n", _strip_comments($note);
pop @lines while @lines && $lines[-1] =~ m{^\s*$};
my $tempfh = File::Temp->new;
if (@lines) {
my ($self, $choice, $log) = @_;
my $old_note = $log->notes;
my $new_note = $self->edit_text( $self->note_template( $log, $old_note) );
- $self->add_note( $log->id, _strip_comments($new_note) );
+ $self->add_note( $log->id, $new_note );
return 1;
}
my $note = $self->edit_text( $template );
if ( ($note ne $template) or $self->y_n("Note unchanged. Commit it?") ) {
- $self->add_note( $log->id, _strip_comments($note) );
+ $self->add_note( $log->id, $note );
return 1;
}
return;
my $note = $self->edit_text( $template );
if ( ($note ne $template) or $self->y_n("Note unchanged. Commit it?") ) {
- $self->add_note( $log->id, _strip_comments($note) );
+ $self->add_note( $log->id, $note );
return 1;
}
return;