[Bps-public-commit] smokingit branch, master, updated. a6b2fc70f41081dfa54f0443da0ccb5453c4742a

Alex Vandiver alexmv at bestpractical.com
Tue Jul 23 15:38:08 EDT 2013


The branch, master has been updated
       via  a6b2fc70f41081dfa54f0443da0ccb5453c4742a (commit)
       via  9deff579755e563e9179477ff1b184aeaa7e44d2 (commit)
      from  7ff1cfb5e1eb44fc614f09c9e1a796f921a73451 (commit)

Summary of changes:
 lib/Smokingit/IRC.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 9deff579755e563e9179477ff1b184aeaa7e44d2
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Jul 23 15:37:54 2013 -0400

    Ensure that we extract only the SHA, and not any whitespace

diff --git a/lib/Smokingit/IRC.pm b/lib/Smokingit/IRC.pm
index 015cd58..e00fde8 100644
--- a/lib/Smokingit/IRC.pm
+++ b/lib/Smokingit/IRC.pm
@@ -125,7 +125,7 @@ sub do_status {
 sub lookup_commitish {
     my $self = shift;
     my ($incoming, $what) = @_;
-    if ($what =~ /^\s*([a-fA-F0-9]{5,})\s*$/) {
+    if ($what =~ s/^\s*([a-fA-F0-9]{5,})\s*$/lc $1/e) {
         my $commits = Smokingit::Model::CommitCollection->new;
         $commits->limit( column => "sha", operator => "like", value => "$what%" );
         my @matches = @{ $commits->items_array_ref };

commit a6b2fc70f41081dfa54f0443da0ccb5453c4742a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Jul 23 15:38:05 2013 -0400

    Strip all trailing whitespace, for consistency

diff --git a/lib/Smokingit/IRC.pm b/lib/Smokingit/IRC.pm
index e00fde8..b0d63ba 100644
--- a/lib/Smokingit/IRC.pm
+++ b/lib/Smokingit/IRC.pm
@@ -69,6 +69,7 @@ sub incoming {
     }
 
     my $msg = $incoming->message;
+    $msg =~ s/\s*$//;
     my $nick = $self->interface->irc->nick;
     return if $incoming->isa("IM::Engine::Incoming::IRC::Channel")
         and not $msg =~ s/^\s*$nick(?:\s*[:,])?\s*(?:please\s+)?//i;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list