[Bps-public-commit] App-Changeloggr branch, master, updated. c2eeb00886b457a4249e0253068192d91e28dfe5

sartak at bestpractical.com sartak at bestpractical.com
Thu Mar 26 18:40:17 EDT 2009


The branch, master has been updated
       via  c2eeb00886b457a4249e0253068192d91e28dfe5 (commit)
      from  c786ab8e5b8a35f7d2003117674587252d4e4f1e (commit)

Summary of changes:
 lib/App/Changeloggr/Model/ChangesCollection.pm |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit c2eeb00886b457a4249e0253068192d91e28dfe5
Author: Shawn M Moore <sartak at gmail.com>
Date:   Thu Mar 26 18:40:07 2009 -0400

    First stab at plucking out the first entry

diff --git a/lib/App/Changeloggr/Model/ChangesCollection.pm b/lib/App/Changeloggr/Model/ChangesCollection.pm
index d314385..73295dd 100644
--- a/lib/App/Changeloggr/Model/ChangesCollection.pm
+++ b/lib/App/Changeloggr/Model/ChangesCollection.pm
@@ -46,6 +46,23 @@ sub extract_change_data_from_text {
 sub extract_change_data_from_git {
     my $self = shift;
     my $text = shift;
+
+    # git log --format=fuller --stat
+    $text =~ s{
+        \A
+        (
+            ^ commit \  \w+ $
+            .*?
+        )
+        (?=
+            \Z
+            |
+            ^ commit \  \w+ $
+        )
+    }{}xms;
+
+    my $entry = $1
+        or return;
     my %fields;
 
     return (\%fields, $text);

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



More information about the Bps-public-commit mailing list