Jacques Germishuys > Git-Raw > Git::Raw::Diff

Download:
Git-Raw-0.40.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.40   Source  

NAME ^

Git::Raw::Diff - Git diff class

VERSION ^

version 0.40

DESCRIPTION ^

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

WARNING: The API of this module is unstable and may change without warning (any change will be appropriately documented in the changelog).

METHODS ^

merge( $from )

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

delta_count( )

Query how many diff records there are in the diff.

find_similar( [\%options] )

Transform the diff marking file renames, copies, etc. Valid fields for the %options hash include:

patches( )

Return a list of Git::Raw::Patch objects for the diff.

print( $format, $callback )

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.

The $format can be one of the following:

stats( )

Accumlated diff statistics for all patches in the diff.

AUTHOR ^

Alessandro Ghedini <alexbio@cpan.org>

Jacques Germishuys <jacquesg@striata.com>

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.

syntax highlighting: