summaryrefslogtreecommitdiff
path: root/bin/git-reporeview
blob: 04a55c64091cade55996754af9d72a7eadba1c61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env perl

# should work for repos not properly registered with mr as uses Git repo
# subclasses

use 5.028;
use strict;
use warnings;
use lib "$ENV{HOME}/src/dotfiles/perl5";

use Local::MrRepo;

die 'not a git repo root' unless -e '.git';

unless (grep "--skip-update", @ARGV) {
    system qw|git pull-safe|;
    $! and die "failed to update repo";
}

# this picks between the git and git-annex repo subclasses
my $mr_repo = Local::MrRepo::new_repo('.');

my $issues = $mr_repo->review();
exit 1 if $issues;