App-GitWorkspaceScanner
view release on metacpan or search on metacpan
lib/App/GitWorkspaceScanner.pm view on Meta::CPAN
package App::GitWorkspaceScanner;
use strict;
use warnings;
# External dependencies.
use Carp qw( croak );
use Data::Dumper;
use File::Spec;
use Getopt::Long;
use Git::Repository;
use Log::Any qw( $log );
use Pod::Find qw();
use Pod::Usage qw();
use Readonly;
use Try::Tiny;
=head1 NAME
App::GitWorkspaceScanner - Scan git repositories in your workspace for local changes not synced up.
=head1 VERSION
Version 1.1.0
=cut
our $VERSION = '1.1.0';
=head1 DESCRIPTION
This module scans a workspace to find git repositories that are not in sync
with their remotes or that are not on an expected branch. This gives you a
snapshot of all outstanding changes in your entire workspace.
=head1 SYNOPSIS
sudo nice ./scan_git_repositories
=head1 OPTIONS
C<Git::WorkspaceScanner> provides a C<scan_git_repositories> utility as a command
line interface to the module. It supports the following command line options:
=over 4
=item * C<--verbose>
Print out information about the analysis performed. Off by default.
# Print out information.
./scan_git_repositories --verbose
=item * C<--workspace>
Root of the workspace to search git repositories into. By default, the search
is performed on '/', but you can use any absolute path.
./scan_git_repositories --workspace=$HOME
=item * C<--allow_untracked_files>
Set whether untracked files should generate a warning in the report. Currently
on by default, but this is likely to change in the near future as we add/clean
up our .gitignore files.
# Do not warn on untracked files (default).
./scan_git_repositories --allow_untracked_files=0
# Warn on untracked files.
( run in 0.956 second using v1.01-cache-2.11-cpan-39bf76dae61 )