NAME

Git::Raw::Diff - Git diff class

VERSION

version 0.14

DESCRIPTION

A Git::Raw::Diff represents the diff between two entities.

METHODS

merge( $from )

Merge the given diff with the Git::Raw::Diff $from.

patch( $callback )

Generate text output from a Git::Raw::Diff. The $callback will be called for each line of the diff, with two arguments: the first one represents the type of patch line (either "ctx" for context lines, "add" for additions, "del" for deletions, "file" for file headers, "hunk" for hunk headers and "bin" for binary data) and the second argument contains the actual patch line.

compact( $callback )

Generate compact text output from a Git::Raw::Diff. Differently from patch(), this function only passes names and status of changed files.

AUTHOR

Alessandro Ghedini <alexbio@cpan.org>

LICENSE AND COPYRIGHT

Copyright 2012 Alessandro Ghedini.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.