App-GitGot

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Path::Tiny" : "0.072",
            "PerlX::Maybe" : "0",
            "Term::ANSIColor" : "0",
            "Test::MockObject" : "0",
            "Try::Tiny" : "0",
            "Type::Library" : "0",
            "Type::Utils" : "0",
            "Types::Standard" : "0",
            "YAML" : "0",
            "autodie" : "0",
            "namespace::autoclean" : "0",
            "overload" : "0",
            "perl" : "5.014",
            "warnings" : "0"
         },
         "suggests" : {
            "Net::GitHub" : "0.74"
         }
      },
      "test" : {
         "requires" : {

META.yml  view on Meta::CPAN

  Path::Tiny: '0.072'
  PerlX::Maybe: '0'
  Term::ANSIColor: '0'
  Test::MockObject: '0'
  Try::Tiny: '0'
  Type::Library: '0'
  Type::Utils: '0'
  Types::Standard: '0'
  YAML: '0'
  autodie: '0'
  namespace::autoclean: '0'
  overload: '0'
  perl: '5.014'
  warnings: '0'
resources: {}
version: '1.339'
x_Dist_Zilla:
  perl:
    version: '5.033003'
  plugins:
    -

Makefile.PL  view on Meta::CPAN

    "Path::Tiny" => "0.072",
    "PerlX::Maybe" => 0,
    "Term::ANSIColor" => 0,
    "Test::MockObject" => 0,
    "Try::Tiny" => 0,
    "Type::Library" => 0,
    "Type::Utils" => 0,
    "Types::Standard" => 0,
    "YAML" => 0,
    "autodie" => 0,
    "namespace::autoclean" => 0,
    "overload" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "App::Cmd::Tester" => 0,
    "Carp" => 0,
    "File::Spec" => 0,
    "File::Temp" => 0,
    "IO::Handle" => 0,
    "IPC::Open3" => 0,

Makefile.PL  view on Meta::CPAN

  "Test::File" => 0,
  "Test::MockObject" => 0,
  "Test::More" => "0.94",
  "Try::Tiny" => 0,
  "Type::Library" => 0,
  "Type::Utils" => 0,
  "Types::Standard" => 0,
  "YAML" => 0,
  "autodie" => 0,
  "lib" => 0,
  "namespace::autoclean" => 0,
  "overload" => 0,
  "parent" => 0,
  "strict" => 0,
  "warnings" => 0
);


unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
  delete $WriteMakefileArgs{TEST_REQUIRES};
  delete $WriteMakefileArgs{BUILD_REQUIRES};

lib/App/GitGot/Command.pm  view on Meta::CPAN

use Try::Tiny;
use Types::Standard -types;
use YAML                    qw/ DumpFile LoadFile /;

use App::GitGot::Repo::Git;
use App::GitGot::Repositories;
use App::GitGot::Types -all;

use Moo;
use MooX::HandlesVia;
use namespace::autoclean;

sub opt_spec {
  my( $class , $app ) = @_;

  return (
    [ 'all|a'            => 'use all available repositories' ] ,
    [ 'by_path|p'        => 'if set, output will be sorted by repo path (default: sort by repo name)' ] ,
    [ 'color_scheme|c=s' => 'name of color scheme to use' => { default => 'dark' } ] ,
    [ 'configfile|f=s'   => 'path to config file' => { default => path( File::HomeDir::Tiny::home() , '.gitgot') , required => 1 } ] ,
    [ 'no_color|C'       => 'do not use colored output' => { default => 0 } ] ,

lib/App/GitGot/Command/add.pm  view on Meta::CPAN

use List::Util               qw/ any pairmap /;
use Path::Tiny;
use PerlX::Maybe;
use Types::Standard -types;

use App::GitGot -command;
use App::GitGot::Repo::Git;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'defaults|D' => 'FIXME' => { default => 0 } ] ,
    [ 'origin|o=s' => 'FIXME' => { default => 'origin' } ] ,
    [ 'recursive'  => 'search all sub-directories for repositories' => { default => 0 } ],
  );
}

lib/App/GitGot/Command/chdir.pm  view on Meta::CPAN

package App::GitGot::Command::chdir;
our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Command::chdir::VERSION = '1.339';
# ABSTRACT: open a subshell in a selected project
use 5.014;

use App::GitGot -command;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub command_names { qw/ chdir cd / }

sub _execute {
  my( $self, $opt, $args ) = @_;

  unless ( $self->active_repos and $self->active_repos == 1 ) {
    say STDERR 'ERROR: You need to select a single repo';
    exit(1);
  }

lib/App/GitGot/Command/checkout.pm  view on Meta::CPAN

$App::GitGot::Command::checkout::VERSION = '1.339';
# ABSTRACT: checkout specific branch for managed repositories
use 5.014;

use Try::Tiny;

use App::GitGot -command;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'branch=s' => 'branch to checkout in the different repos' => { required => 1 } ] ,
    [ 'create|b' => 'create branch like checkout -b in each of the repos' ],
  );
}

sub _execute {

lib/App/GitGot/Command/clone.pm  view on Meta::CPAN

use Cwd;
use Path::Tiny;
use IO::Prompt::Simple;
use Types::Standard -types;

use App::GitGot -command;
use App::GitGot::Repo::Git;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'defaults|D'  => 'use the default choices for all prompts' ] ,
    [ 'recursive|r' => 'clone submodules recursively' => { default => 0 } ],
  );
}

sub _use_io_page { 0 }

lib/App/GitGot/Command/do.pm  view on Meta::CPAN

use 5.014;

use Capture::Tiny qw/ capture_stdout /;
use File::chdir;
use Types::Standard -types;

use App::GitGot -command;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'command|e=s' => 'command to execute in the different repos' => { required => 1 } ] ,
    [ 'with_repo'   => 'prepend all output lines with the repo name' => { default => 0 } ] ,
  );
}

sub _execute {

lib/App/GitGot/Command/fetch.pm  view on Meta::CPAN

package App::GitGot::Command::fetch;
our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Command::fetch::VERSION = '1.339';
# ABSTRACT: fetch remotes for managed repositories
use 5.014;

use App::GitGot -command;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub _execute {
  my ( $self, $opt, $args ) = @_;

  $self->_fetch( $self->active_repos );
}

1;

### FIXME docs

lib/App/GitGot/Command/fork.pm  view on Meta::CPAN

use Cwd;
use File::HomeDir::Tiny ();
use Path::Tiny;
use Types::Standard -types;

use App::GitGot -command;
use App::GitGot::Repo::Git;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'noclone|n'     => 'If set, do not check out a local working copy of the forked repo' ] ,
    [ 'noremoteadd|N' => 'If set, do not add the forked repo as the "upstream" repo in the new working copy' ] ,
  );
}

sub _execute {

lib/App/GitGot/Command/gc.pm  view on Meta::CPAN

our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Command::gc::VERSION = '1.339';
# ABSTRACT: Run the 'gc' command to garbage collect in git repos
use 5.014;

use Data::Dumper;
use Try::Tiny;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

# incremental output looks nicer for this command...
STDOUT->autoflush(1);
sub _use_io_page { 0 }

sub _execute {
  my( $self, $opt, $args ) = @_;

  my $max_len = $self->max_length_of_an_active_repo_label;

lib/App/GitGot/Command/lib.pm  view on Meta::CPAN

use 5.014;

use List::Util qw/ uniq /;
use Path::Tiny;
use Types::Standard -types;

use App::GitGot -command;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'gotlib=s'    => 'gotlib file' => { default => '.gotlib' } ] ,
    [ 'libvar=s'    => 'library environment variable' => { default => 'PERL5LIB' } ] ,
    [ 'separator=s' => 'library path separator' => { default => ':' } ] ,
  );
}

lib/App/GitGot/Command/list.pm  view on Meta::CPAN

$App::GitGot::Command::list::VERSION = '1.339';
# ABSTRACT: list managed repositories
use 5.014;

use Class::Load       'try_load_class';

use App::GitGot -command;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub command_names { qw/ list ls / }

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'json|j' => 'stream output as JSON' ] ,
  );
}

lib/App/GitGot/Command/milk.pm  view on Meta::CPAN

package App::GitGot::Command::milk;
our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Command::milk::VERSION = '1.339';
use 5.014;

# ABSTRACT: well, do you?
use App::GitGot -command;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub command_names { qw/ milk / }

sub _execute {
        # Doesn't use 'cowsay' in case it's not installed
  print " ___________\n";
  print "< got milk? >\n";
  print " -----------\n";
  print "        \\   ^__^\n";
  print "         \\  (oo)\\_______\n";

lib/App/GitGot/Command/move.pm  view on Meta::CPAN

use 5.014;

use Cwd;
use File::Copy::Recursive qw/ dirmove /;
use Path::Tiny;

use App::GitGot -command;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub command_names { qw/ move mv / }

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'destination=s' => 'FIXME' => { required => 1 } ] ,
  );
}

lib/App/GitGot/Command/mux.pm  view on Meta::CPAN

$App::GitGot::Command::mux::VERSION = '1.339';
# ABSTRACT: open a tmux window for a selected project
use 5.014;

use IO::Prompt::Simple;

use App::GitGot -command;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub command_names { qw/ mux tmux / }

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'dirty|D'   => 'open session or window for all dirty repos' ] ,
    [ 'exec|e=s'  => 'pass a command to the `tmux new-window` command (not valid in combination with -s option)'] ,
    [ 'session|s' => 'use tmux-sessions (default: tmux windows)' ] ,
  );

lib/App/GitGot/Command/push.pm  view on Meta::CPAN

# ABSTRACT: Push local changes to the default remote in git repos
use 5.014;

use Data::Dumper;
use Try::Tiny;

use App::GitGot -command;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

# incremental output looks nicer for this command...
STDOUT->autoflush(1);
sub _use_io_page { 0 }

sub _execute {
  my( $self, $opt, $args ) = @_;

  my $max_len = $self->max_length_of_an_active_repo_label;

lib/App/GitGot/Command/readd.pm  view on Meta::CPAN

our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Command::readd::VERSION = '1.339';
# ABSTRACT: update config metadata to match repo
use 5.014;

use App::GitGot -command;
use App::GitGot::Repo::Git;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub options {
  my( $class , $app ) = @_;
  return ();
}

sub _use_io_page { 0 }

sub _execute {
  my ( $self, $opt, $args ) = @_;

lib/App/GitGot/Command/remove.pm  view on Meta::CPAN

$App::GitGot::Command::remove::VERSION = '1.339';
# ABSTRACT: remove a managed repository from your config
use 5.014;

use List::Util qw/ any /;

use App::GitGot -command;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub command_names { qw/ remove rm / }

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'force' => 'FIXME' ] ,
  );
}

lib/App/GitGot/Command/status.pm  view on Meta::CPAN

package App::GitGot::Command::status;
our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Command::status::VERSION = '1.339';
# ABSTRACT: print status info about repos
use 5.014;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub command_names { qw/ status st / }

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'show-branch' => 'show which branch' => { default => 0 } ] ,
  );
}

lib/App/GitGot/Command/tag.pm  view on Meta::CPAN

package App::GitGot::Command::tag;
our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Command::tag::VERSION = '1.339';
# ABSTRACT: list/add/remove tags for the current repository
use 5.014;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'add|a' => 'assign tags to the current repository' => { default => 0 } ] ,
    [ 'all|A' => 'print out tags of all repositories' => { default => 0 } ] ,
    [ 'remove|rm' => 'remove tags from the current repository' => { default => 0 } ] ,
  );
}

lib/App/GitGot/Command/that.pm  view on Meta::CPAN

package App::GitGot::Command::that;
our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Command::that::VERSION = '1.339';
# ABSTRACT: check if a given repository is managed
use 5.014;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub _execute {
  my( $self, $opt, $args ) = @_;
  my $path = pop @$args;

  defined $path and -d $path
    or say STDERR 'ERROR: You must provide a path to a repo to check' and exit 1;

  $self->_path_is_managed( $path ) or exit 1;
}

lib/App/GitGot/Command/this.pm  view on Meta::CPAN

package App::GitGot::Command::this;
our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Command::this::VERSION = '1.339';
# ABSTRACT: check if the current repository is managed
use 5.014;

use Cwd;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub _execute {
  my( $self, $opt, $args ) = @_;

  $self->_path_is_managed( getcwd() ) or exit 1;
}

1;

## FIXME docs

lib/App/GitGot/Command/update.pm  view on Meta::CPAN

package App::GitGot::Command::update;
our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Command::update::VERSION = '1.339';
# ABSTRACT: update managed repositories
use 5.014;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub command_names { qw/ update up / }

sub _execute {
  my ( $self, $opt, $args ) = @_;

  $self->_update( $self->active_repos );
}

1;

lib/App/GitGot/Command/update_status.pm  view on Meta::CPAN

package App::GitGot::Command::update_status;
our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Command::update_status::VERSION = '1.339';
# ABSTRACT: update managed repositories then display their status
use 5.014;

use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;

sub command_names { qw/ update_status upst / }

sub options {
  my( $class , $app ) = @_;
  return (
    [ 'show-branch' => 'show which branch' => { default => 0 } ] ,
  );
}

lib/App/GitGot/Outputter.pm  view on Meta::CPAN

$App::GitGot::Outputter::VERSION = '1.339';
# ABSTRACT: Generic base class for outputting formatted messages.
use 5.014;

use Term::ANSIColor qw/ colored /;
use Types::Standard -types;

use App::GitGot::Types;

use Moo;
use namespace::autoclean;


has no_color => (
  is            => 'ro' ,
  isa           => Bool ,
  default       => 0 ,
  documentation => 'boolean indicating whether color messages should be output at all' ,
);


lib/App/GitGot/Outputter/dark.pm  view on Meta::CPAN

$App::GitGot::Outputter::dark::VERSION = '1.339';
# ABSTRACT: Color scheme appropriate for dark terminal backgrounds
use 5.014;

use Types::Standard -types;

use App::GitGot::Types;

use Moo;
extends 'App::GitGot::Outputter';
use namespace::autoclean;

has color_error => (
  is      => 'ro' ,
  isa     => Str ,
  default => 'bold white on_red'
);

has color_major_change => (
  is      => 'ro' ,
  isa     => Str ,

lib/App/GitGot/Outputter/light.pm  view on Meta::CPAN

$App::GitGot::Outputter::light::VERSION = '1.339';
# ABSTRACT: Color scheme appropriate for dark terminal backgrounds
use 5.014;

use Types::Standard -types;

use App::GitGot::Types;

use Moo;
extends 'App::GitGot::Outputter';
use namespace::autoclean;

has color_error => (
  is      => 'ro' ,
  isa     => Str ,
  default => 'bold red'
);

# Color choices by drdrang based on a conversation that started with
# <http://www.leancrew.com/all-this/2010/12/batch-comparison-of-git-repositories/>

lib/App/GitGot/Repo.pm  view on Meta::CPAN

$App::GitGot::Repo::VERSION = '1.339';
# ABSTRACT: Base repository objects
use 5.014;

use List::Util qw/ uniq /;
use Types::Standard -types;

use App::GitGot::Types;

use Moo;
use namespace::autoclean;


has label => (
  is  => 'ro' ,
  isa => Str ,
);


has name => (
  is       => 'ro',



( run in 0.460 second using v1.01-cache-2.11-cpan-4d50c553e7e )