Git::Raw::Diff - Git diff class
version 0.33
A Git::Raw::Diff represents the diff between two entities.
Git::Raw::Diff
WARNING: The API of this module is unstable and may change without warning (any change will be appropriately documented in the changelog).
Merge the given diff with the Git::Raw::Diff $from.
$from
Query how many diff records there are in the diff.
Return a list of Git::Raw::Patch objects for the diff.
Git::Raw::Patch
Generate text output from the diff object. The $callback will be called for each line of the diff with two arguments: the first one represents the type of the patch line ("ctx" for context lines, "add" for additions, "del" for deletions, "file" for file headers, "hunk" for hunk headers or "bin" for binary data) and the second argument contains the content of the patch line.
$callback
"ctx"
"add"
"del"
"file"
"hunk"
"bin"
The $format can be one of the following:
$format
"patch"
Full git diff.
"patch_header"
Only the file headers of the diff.
"raw"
Like git diff --raw.
git diff --raw
"name_only"
Like git diff --name-only.
git diff --name-only
"name_status"
Like git diff --name-status.
git diff --name-status
Alessandro Ghedini <alexbio@cpan.org>
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.
To install Git::Raw, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Git::Raw
CPAN shell
perl -MCPAN -e shell install Git::Raw
For more information on module installation, please visit the detailed CPAN module installation guide.