Git-Repository-Plugin-Log

 view release on metacpan or  search on metacpan

lib/Git/Repository/Log.pm  view on Meta::CPAN


# a few simple accessors
for my $attr (
    qw(
    commit diff_from tree
    author author_name author_email
    committer committer_name committer_email
    author_localtime author_tz author_gmtime
    committer_localtime committer_tz committer_gmtime
    raw_message message subject body
    gpgsig
    extra
    )
    )
{
    no strict 'refs';
    *$attr = sub { return $_[0]{$attr} };
}
for my $attr (qw( parent mergetag )) {
    no strict 'refs';
    *$attr = sub { return @{ $_[0]{$attr} || [] } };

lib/Git/Repository/Log.pm  view on Meta::CPAN

The author information.

=item committer

The committer information.

=item message

The log message (including the 4-space indent normally output by B<git log>).

=item gpgsig

The commit signature.

=item mergetag

The mergetag information.

=item diff_from

The commit from which the diff was taken.

lib/Git/Repository/Log.pm  view on Meta::CPAN

=item subject

=item body

=back

=head2 Signature-related information

=over 4

=item gpgsig

=item mergetag

=back

=head2 Extra information

=over 4

=item extra

t/41-multiline-log.t  view on Meta::CPAN

        my $id = $log->commit;
        return if !exists $commit{$id};
        my $commit = $commit{$id};
        is( $log->tree, $commit->{tree}, "commit $id tree" );
        is_deeply( [ $log->parent ], $commit->{parent}, "commit $id parent" );
        is( $log->author,    $commit->{author},    "commit $id author" );
        is( $log->committer, $commit->{committer}, "commit $id committer" );
        is( $log->subject,   $commit->{subject},   "commit $id subject" );
        is( $log->body,      $commit->{body},      "commit $id body" );
        is( $log->extra,     $commit->{extra},     "commit $id extra" );
        is( $log->gpgsig,    $commit->{gpgsig},    "commit $id gpgsig" );
        is_deeply(
            [ $log->mergetag ],
            $commit->{mergetag} || [],
            "commit $id mergetag"
        );
    }

    $num_tests = 9 * scalar keys %commit;
}

t/bundle.pl  view on Meta::CPAN

    extra => "",
    parent => [
      "6015b6a34038fd16fa8393a066493e6fcc9a174a",
      "6ba823ece3063b52e1d44cdde497332645fb49e0"
    ],
    subject => "Merge branch 'slave'",
    tree => "a319709ffcce3607d752ca412bd1db7f932cce81"
  },
  "469cc551a1323d8a0285efa7047d72d99013fd36" => {
    author => "Example Author <author\@example.com> 1405523505 +0100",
    body => "# tag 'v1.1.0'\nsigned tag\n\n# gpg: Signature made Wed Jul 16 18:11:23 2014 CEST using RSA key ID 7621C403\n# gpg: Good signature from \"Example Author <author\@example.com>\"\n\n# tag 'v1.0.1'\n\343\201\223\343\202\223\343\201\253\343\...
    committer => "Example Committer <committer\@example.com> 1405527082 +0100",
    extra => "",
    mergetag => [
      "object fc862ff3b0b4eb337e6ed714031c6cdeaa42ffd9\ntype commit\ntag v1.1.0\ntagger Example Committer <committer\@example.com> 1405527082 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJTxq...
      "object 1f2e387e072680656acac623ea04e1b2b054e8c7\ntype commit\ntag v1.0.1\ntagger Example Committer <committer\@example.com> 1405527082 +0100\n\n\343\201\223\343\202\223\343\201\253\343\201\241\343\201\257\n-----BEGIN PGP SIGNATURE-----\nVersio...
    ],
    parent => [
      "32defe32456a053a9c391cdcf9a4292af6d3c80a",
      "fc862ff3b0b4eb337e6ed714031c6cdeaa42ffd9",
      "1f2e387e072680656acac623ea04e1b2b054e8c7"

t/bundle.pl  view on Meta::CPAN

    extra => "",
    parent => [],
    subject => "empty tree",
    tree => "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
  },
  "73dbff4c40d38f3d2b7be0476fd0cc40c2d29d15" => {
    author => "Example Author <author\@example.com> 1405523496 +0100",
    body => "",
    committer => "Example Committer <committer\@example.com> 1405527082 +0100",
    extra => "",
    gpgsig => "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJTxqQrAAoJEOX2RRt2IcQDUpIIAIkOUvX3834rFJcF18rEmfue\nzIFNi3C12S/G6APTg6V2WlwuVtJF6tFc4JScwzgFm4bYrb2JWOaIvAhjNlTnfhxf\nC+UTYcoxxYQKtPdyBNH9dafyrAnxo8FMoV...
    parent => [
      "1f2e387e072680656acac623ea04e1b2b054e8c7"
    ],
    subject => "ol\303\241 (pt)",
    tree => "33a90fc1da2f84bfc394fa886a3d70ae534dc03f"
  },
  "7bc08ae3886d74a575cd92c5f3877e481b45bb07" => {
    author => "Example Author <author\@example.com> 1405523489 +0100",
    body => "",
    committer => "Example Committer <committer\@example.com> 1405527082 +0100",

t/bundle.pl  view on Meta::CPAN

      "73dbff4c40d38f3d2b7be0476fd0cc40c2d29d15"
    ],
    subject => "",
    tree => "524a684865d9b37e0a7236df14ccde01501f063d"
  },
  c9a1ee109ebce2a8ce1ed4dffaec9c691c4915f0 => {
    author => "Example Author <author\@example.com> 1405523503 +0100",
    body => "",
    committer => "Example Committer <committer\@example.com> 1405527082 +0100",
    extra => "",
    gpgsig => "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJTxqQsAAoJEOX2RRt2IcQDDNwH/1vf113qFEZq04/i6ZN26sTc\ntTLK9n8Y4WbV+tj2MC930SsId1hn75OdFfHE6Lh4ZsMt8sBubCMPaWo1CnCmNcCr\nOWPiLvUj8WI6TC+ZuNCEAzKWVZsyWVn6pn...
    mergetag => [
      "object 73dbff4c40d38f3d2b7be0476fd0cc40c2d29d15\ntype commit\ntag v1.0.2\ntagger Example Committer <committer\@example.com> 1405527082 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJTxq...
    ],
    parent => [
      "fa59af7668ae3358b1e23a47630fbec5f3f1ef50",
      "73dbff4c40d38f3d2b7be0476fd0cc40c2d29d15"
    ],
    subject => "bom dia",
    tree => "7b8f01341e59251bbf067b1001cdd12f44c36847"
  },
  cb9416d5aae2ffdad123328812079a2302030dad => {
    author => "Example Author <author\@example.com> 1405523506 +0100",
    body => "",
    committer => "Example Committer <committer\@example.com> 1405527082 +0100",
    extra => "",
    gpgsig => "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJTxqQsAAoJEOX2RRt2IcQDTxcH/2nJwnVN0XH/gEbtObhmf3R8\neOcMlYmNZAFS5Yw7H7oVRK6WGcRVs+dWFGCf9vF62nQxU41zICs5Y9ycjb5/VeJc\nb2+mXYjz6f6y3n3LsRKqQHjNnkCB7KCrxr...
    mergetag => [
      "object fc862ff3b0b4eb337e6ed714031c6cdeaa42ffd9\ntype commit\ntag v1.1.0\ntagger Example Committer <committer\@example.com> 1405527082 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJTxq...
      "object 73dbff4c40d38f3d2b7be0476fd0cc40c2d29d15\ntype commit\ntag v1.0.2\ntagger Example Committer <committer\@example.com> 1405527082 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJTxq...
    ],
    parent => [
      "6ba823ece3063b52e1d44cdde497332645fb49e0",
      "fc862ff3b0b4eb337e6ed714031c6cdeaa42ffd9",
      "73dbff4c40d38f3d2b7be0476fd0cc40c2d29d15"
    ],
    subject => "buon giorno (it)",
    tree => "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
  },
  e2a207202a60cec5968c315a3249fdb4831a5d08 => {
    author => "Example Author <author\@example.com> 1405523504 +0100",
    body => "",
    committer => "Example Committer <committer\@example.com> 1405527082 +0100",
    extra => "",
    gpgsig => "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJTxqQsAAoJEOX2RRt2IcQDGfsH/jmgIgir/dqh6GnxqoHQxVCG\nWhQNAVv3fvods/nKX6mV8ZMh6omdFES9m7lWiT2ZKLfYzgyJwxEHSthGTK11gdRa\ngXmJHzdqul+/wjMpcL1LpR0vp3f73ylPsA...
    mergetag => [
      "object 989960e0d2f4195927a505447b5e641c41373d7f\ntype commit\ntag v1.0.3\ntagger Example Committer <committer\@example.com> 1405527082 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJTxq...
    ],
    parent => [
      "c9a1ee109ebce2a8ce1ed4dffaec9c691c4915f0",
      "989960e0d2f4195927a505447b5e641c41373d7f"
    ],
    subject => "buen d\303\255a (es)",
    tree => "7b8f01341e59251bbf067b1001cdd12f44c36847"
  },
  f2da33588f3c5678fd1d6700b0b7a3b500e285a6 => {
    author => "Example Author <author\@example.com> 1405523490 +0100",
    body => "",
    committer => "Example Committer <committer\@example.com> 1405527082 +0100",
    extra => "",
    gpgsig => "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJTxqQrAAoJEOX2RRt2IcQDEuYH/01zbzM4PEOY5EnDkKGc3SjE\niwJi0BmNTeZ7gISm1leMS1alXBeqN/Ex91xW4O0sfDx1TpIPT4T1fY1rMiAEyNZu\nZJOF3zLtwB99b00XELButxkag6y89bPkLY...
    parent => [
      "7bc08ae3886d74a575cd92c5f3877e481b45bb07"
    ],
    subject => "hej (da)",
    tree => "7b8f01341e59251bbf067b1001cdd12f44c36847"
  },
  f6812d818e65423551c0eb7ac899dbea5311eb56 => {
    author => "Andr\303\251 <author\@example.com> 1405523492 +0100",
    body => "",
    committer => "Example Committer <committer\@example.com> 1405527082 +0100",

t/bundle.pl  view on Meta::CPAN

    ],
    parent => [
      "fc862ff3b0b4eb337e6ed714031c6cdeaa42ffd9",
      "1f2e387e072680656acac623ea04e1b2b054e8c7"
    ],
    subject => "dobr\303\275 den (cs)",
    tree => "7b8f01341e59251bbf067b1001cdd12f44c36847"
  },
  fc862ff3b0b4eb337e6ed714031c6cdeaa42ffd9 => {
    author => "Example Author <author\@example.com> 1405523500 +0100",
    body => "signed tag\n\n# gpg: Signature made Wed Jul 16 18:11:23 2014 CEST using RSA key ID 7621C403\n# gpg: Good signature from \"Example Author <author\@example.com>\"\n",
    committer => "Example Committer <committer\@example.com> 1405527082 +0100",
    extra => "",
    mergetag => [
      "object f6812d818e65423551c0eb7ac899dbea5311eb56\ntype commit\ntag v1.0.0\ntagger Example Committer <committer\@example.com> 1405527082 +0100\n\nsigned tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\n\niQEcBAABAgAGBQJTxq...
    ],
    parent => [
      "f2da33588f3c5678fd1d6700b0b7a3b500e285a6",
      "f6812d818e65423551c0eb7ac899dbea5311eb56"
    ],
    subject => "Merge tag 'v1.0.0'",



( run in 0.511 second using v1.01-cache-2.11-cpan-df04353d9ac )