diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-10-19 11:10:00 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-10-19 11:10:00 -0700 |
commit | 57898f3b612b3e5c8ba39e41f55a43127174a0d0 (patch) | |
tree | abf484ad57f004953d1c3a683de06e945d17f4d6 | |
parent | b652f375013537067ca73586e7899e3c25add36f (diff) | |
download | dotfiles-57898f3b612b3e5c8ba39e41f55a43127174a0d0.tar.gz |
make git-reporeview useful for non-mr repos
-rwxr-xr-x | bin/git-reporeview | 13 |
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; |