| 1 | package Git::Raw::Diff::Delta; | ||
| 2 | 1 | $Git::Raw::Diff::Delta::VERSION = '0.90'; | |
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | ▶ | use Git::Raw; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | Git::Raw::Diff::Delta - Git diff delta class | ||
| 11 | |||
| 12 | =head1 VERSION | ||
| 13 | |||
| 14 | version 0.90 | ||
| 15 | |||
| 16 | =head1 DESCRIPTION | ||
| 17 | |||
| 18 | A L<Git::Raw::Diff::Delta> represents a delta in the diff between two entities. | ||
| 19 | |||
| 20 | B<WARNING>: The API of this module is unstable and may change without warning | ||
| 21 | (any change will be appropriately documented in the changelog). | ||
| 22 | |||
| 23 | =head1 METHODS | ||
| 24 | |||
| 25 | =head2 status( ) | ||
| 26 | |||
| 27 | Retrieve the status of the delta. Returns one of the following: | ||
| 28 | |||
| 29 | =over 4 | ||
| 30 | |||
| 31 | =item * "unmodified" | ||
| 32 | |||
| 33 | No changes. | ||
| 34 | |||
| 35 | =item * "added" | ||
| 36 | |||
| 37 | The entry does not exist in the old version. | ||
| 38 | |||
| 39 | =item * "deleted" | ||
| 40 | |||
| 41 | The entry does not exist in the new version. | ||
| 42 | |||
| 43 | =item * "modified" | ||
| 44 | |||
| 45 | The entry content changed between the old and new versions. | ||
| 46 | |||
| 47 | =item * "renamed" | ||
| 48 | |||
| 49 | The entry was renamed between the old and new versions. | ||
| 50 | |||
| 51 | =item * "copied" | ||
| 52 | |||
| 53 | The entry was copied from another old entry. | ||
| 54 | |||
| 55 | =item * "ignored" | ||
| 56 | |||
| 57 | The entry is an ignored item in the working directory. | ||
| 58 | |||
| 59 | =item * "untracked" | ||
| 60 | |||
| 61 | The entry is an untracked item in the working directory. | ||
| 62 | |||
| 63 | =item * "type_change" | ||
| 64 | |||
| 65 | The type of the entry changed between the old and new versions. | ||
| 66 | |||
| 67 | =item * "unreadable" | ||
| 68 | |||
| 69 | The entry is unreadable. | ||
| 70 | |||
| 71 | =item * "conflicted" | ||
| 72 | |||
| 73 | The entry represents a conflict. | ||
| 74 | |||
| 75 | =back | ||
| 76 | |||
| 77 | =head2 flags( ) | ||
| 78 | |||
| 79 | Retrieve the flags associated with the delta. Returns an array reference | ||
| 80 | with zero or more of the following: | ||
| 81 | |||
| 82 | =over 4 | ||
| 83 | |||
| 84 | =item * "binary" | ||
| 85 | |||
| 86 | Files treated as binary data. | ||
| 87 | |||
| 88 | =item * "valid_id" | ||
| 89 | |||
| 90 | C<"id"> value is known correct. | ||
| 91 | |||
| 92 | =back | ||
| 93 | |||
| 94 | =head2 similarity( ) | ||
| 95 | |||
| 96 | Retrieve the similarity score between 0 and 100 between C<"old_file"> | ||
| 97 | and C<"new_file">. | ||
| 98 | |||
| 99 | =head2 file_count( ) | ||
| 100 | |||
| 101 | Retrieve the number of files in the delta. | ||
| 102 | |||
| 103 | =head2 old_file( ) | ||
| 104 | |||
| 105 | The C<"old_file"> represents the C<"from"> side of the diff. Returns | ||
| 106 | a L<Git::Raw::Diff::File> object. | ||
| 107 | |||
| 108 | =head2 new_file( ) | ||
| 109 | |||
| 110 | The C<"new_file"> represents to C<"to"> side of the diff. Returns | ||
| 111 | a L<Git::Raw::Diff::File> object. | ||
| 112 | |||
| 113 | =head1 AUTHOR | ||
| 114 | |||
| 115 | Alessandro Ghedini <alexbio@cpan.org> | ||
| 116 | |||
| 117 | Jacques Germishuys <jacquesg@cpan.org> | ||
| 118 | |||
| 119 | =head1 LICENSE AND COPYRIGHT | ||
| 120 | |||
| 121 | Copyright 2014 Alessandro Ghedini. | ||
| 122 | |||
| 123 | This program is free software; you can redistribute it and/or modify it | ||
| 124 | under the terms of either: the GNU General Public License as published | ||
| 125 | by the Free Software Foundation; or the Artistic License. | ||
| 126 | |||
| 127 | See http://dev.perl.org/licenses/ for more information. | ||
| 128 | |||
| 129 | =cut | ||
| 130 | |||
| 131 | 1 | 1; # End of Git::Raw::Diff::Delta | |