Git::Diff - Git submodule to convert git diff into a perl hash-ref
Version 0.000102
Constructor with given params
Returns the full categorized hashref with file changes
Returns non categorized file changes
Returns string from git diff command
my $o_diff = Git::Diff->new( directory => $ENV{GIT_DIR}, worktree => $ENV{GIT_WORK_TREE}, base_branch => $ENV{BASE_BRANCH} ); $o_diff->changes_by_line;
Returns following structure
{ some/file/in/git { addition { 23 " my ( $string ) = @_;" }, changed { '-23 +23 ' "sub is_identifier { - my ($string) = @_; + my ( $string ) = @_; " }, raw undef, subtraction { 23 " my ($string) = @_;" }, } }
perlcritic:
Internal usage
Git
A list of current bugs and issues can be found at the CPAN site
https://gitlab.com/mziescha/git-diff/issues
To report a new bug or problem, use the link on this page.
Run and prase git diff command for perl hash structure
Need same git configs like Git
Mario Zieschang, <mziescha at cpan.org>
<mziescha at cpan.org>
To install Git::Diff, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Git::Diff
CPAN shell
perl -MCPAN -e shell install Git::Diff
For more information on module installation, please visit the detailed CPAN module installation guide.