#!perl

our $DATE = '2014-07-18'; # DATE
our $VERSION = '0.02'; # VERSION

use 5.010;
use strict;
use warnings;

use App::GitUtils;
use Perinci::CmdLine::Lite;

my $p = '/App/GitUtils/'; # prefix
Perinci::CmdLine::Lite->new(
    url => $p,
    subcommands => {
        'info'        => {url => "${p}info"},
        'run-hook'    => {url => "${p}run_hook"},
        'rh'          => {url => "${p}run_hook",
                          summary => 'Alias for run-hook'},
        'post-commit' => {url => "${p}post_commit"},
    },
    default_subcommand => 'info',
    get_subcommand_from_arg => 2,
)->run;

# ABSTRACT: Day-to-day command-line utilities for git
# PODNAME: gu

__END__

=pod

=encoding UTF-8

=head1 NAME

gu - Day-to-day command-line utilities for git

=head1 VERSION

This document describes version 0.02 of gu (from Perl distribution App-GitUtils), released on 2014-07-18.

=head1 SYNOPSIS

To activate bash completion:

 % complete -C gu gu; # can be put in bash startup file e.g. .bashrc
 % gu <tab>
 % gu run-hook <tab>

To list available subcommands:

 % gu --subcommands

For help:

 % gu --help

=head1 SUBCOMMANDS

=head2 info

This is the default subcommand when no subcommand is specified.

 % gu
 % gu info

It displays repo information (currently only C<.git> location).

=head2 run-hook (alias: rh)

 % gu run-hook post-commit
 % gu rh pre-commit

are basically the same as:

 % .git/hooks/post-commit
 % .git/hooks/pre-commit

except they can be run anywhere inside the repo, and can use tab completion.

=head2 post-commit

 % gu post-commit

is shortcut for:

 % gu run-hook post-commit

=head2 info

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/App-GitUtils>.

=head1 SOURCE

Source repository is at L<https://github.com/sharyanto/perl-App-GitUtils>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-GitUtils>

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 AUTHOR

Steven Haryanto <stevenharyanto@gmail.com>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Steven Haryanto.

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

=cut
