summaryrefslogtreecommitdiff
path: root/Porting/git-deltatool
diff options
context:
space:
mode:
authorDavid Golden <dagolden@cpan.org>2010-06-27 23:01:49 -0400
committerDavid Golden <dagolden@cpan.org>2010-06-27 23:09:45 -0400
commite0c735689934c91bf6c2d34164b837a89d957eb1 (patch)
tree3d1f825b12c6772542ccec63089108c00e76eff6 /Porting/git-deltatool
parente6bf3f2c2be3b3dca41079f7bbba476eacf65aef (diff)
downloadperl-e0c735689934c91bf6c2d34164b837a89d957eb1.tar.gz
minor improvements to git-deltatool
Refactors comment stripping to be sure it always is applied before committing the note to git Adds some white space between commits for easier reading
Diffstat (limited to 'Porting/git-deltatool')
-rwxr-xr-xPorting/git-deltatool11
1 files changed, 6 insertions, 5 deletions
diff --git a/Porting/git-deltatool b/Porting/git-deltatool
index a40ef83a88..932f438cc8 100755
--- a/Porting/git-deltatool
+++ b/Porting/git-deltatool
@@ -84,6 +84,7 @@ sub assign {
$self->_iterate_commits(
sub {
my $log = shift;
+ say "";
say "-" x 75;
$self->show_header($log);
$self->show_body($log, 1);
@@ -100,9 +101,9 @@ sub review {
$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);
@@ -168,7 +169,7 @@ sub _iterate_commits {
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) {
@@ -354,7 +355,7 @@ sub do_edit {
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;
}
@@ -371,7 +372,7 @@ sub do_head2 {
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;
@@ -424,7 +425,7 @@ HERE
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;