summaryrefslogtreecommitdiff
path: root/bin/git-reporeview
diff options
context:
space:
mode:
Diffstat (limited to 'bin/git-reporeview')
-rwxr-xr-xbin/git-reporeview13
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/git-reporeview b/bin/git-reporeview
index f2b6a519..291c298a 100755
--- a/bin/git-reporeview
+++ b/bin/git-reporeview
@@ -1,5 +1,8 @@
#!/usr/bin/perl
+# should work for repos not properly registered with mr as uses Git repo
+# subclasses
+
use 5.028;
use strict;
use warnings;
@@ -8,8 +11,14 @@ 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('.');
-$mr_repo->update();
-die "couldn't update repo" unless $mr_repo->updated;
+
my $issues = $mr_repo->review();
exit 1 if $issues;