Jakob Voß > Git-Repository-Plugin-Status > Git::Repository::Status

Download:
Git-Repository-Plugin-Status-0.03.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.03   Source  

NAME ^

Git::Repository::Status - git repository status information as Perl module

SYNOPSIS ^

    # load the Status plugin
    use Git::Repository 'Status';

    # get the status of all files
    my @status = Git::Repository->new->status('--ignored');

    # print all files with status with color
    use Term::ANSIColor;
    for (@status) {
        say colored($_->index,$_->index_color) 
          . colored($_->work, $_->work_color) 
          . " " . $_->path1 . "\t" 
          . colored($_->meaning,'yellow');
    }

DESCRIPTION ^

Instances of Git::Repository::Status represent a path in a git working tree with its status. The constructor should not be called directly but by calling the status method of Git::Repository, provided by Git::Repository::Plugin::Status.

ACCESSORS ^

index

Returns the status code of the path in the index, or the status code of side 1 in a merge conflict.

work

Returns the status code of the path in the work tree, or the status code of side 2 in a merge conflict.

status

Returns the two character status code (index and work combined).

path1

Returns the path of the status.

path2

Returns the path that path1 was copied or renamed to.

unmerged

Returns true if the path is part of a merge conflict.

ignored

Returns true if the path is being ignored.

tracked

Returns true if the path is being tracked.

meaning

Returns the human readable status meaning as listed in the git manual.

work_color

Returns a color (either red or green) for display of work status.

work_color

Returns a color (either red or green) for display of index status.

SEE ALSO ^

https://www.kernel.org/pub/software/scm/git/docs/git-status.html

AUTHOR ^

Jakob Voß

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2014 by Jakob Voß.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: