diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-02 12:17:51 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-02 13:16:59 -0700 |
commit | 30917b11f94e73941a9344096215afb2e7677e9a (patch) | |
tree | 1e39030ce5205d253f009e13175e7925208e3a3c /perl5 | |
parent | 9e8744978050498efe51e0824df584f1c1bcd98d (diff) | |
download | dotfiles-30917b11f94e73941a9344096215afb2e7677e9a.tar.gz |
style tweaks
Diffstat (limited to 'perl5')
-rw-r--r-- | perl5/Local/MrRepo/Repo/Git/Annex.pm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/perl5/Local/MrRepo/Repo/Git/Annex.pm b/perl5/Local/MrRepo/Repo/Git/Annex.pm index 7bf976f5..4330dc49 100644 --- a/perl5/Local/MrRepo/Repo/Git/Annex.pm +++ b/perl5/Local/MrRepo/Repo/Git/Annex.pm @@ -48,8 +48,10 @@ sub review { # another command we could consider running is `git annex fsck --fast` # 1. Check for files stored only locally where that's not okay - my @annex_find_output = $self->git->annex("find", "--json", - "--in", "here", "--and", "--not", "--copies=2", "--and", "--lackingcopies=1"); + my @annex_find_output + = $self->git->annex( + qw(find --json --in here --and --not --copies=2 --and --lackingcopies=1) + ); unless (@annex_find_output == 0) { say_spaced_bullet("Some annex content is present only locally:"); say " $_" for map { ${decode_json($_)}{file} } @annex_find_output; @@ -140,7 +142,7 @@ sub review_unused { if ($opts{interactive}) { # truncate log output if necessary to ensure user's # terminal does not scroll - my (undef, $height, undef, undef) = GetTerminalSize(); + my (undef, $height) = GetTerminalSize(); splice @log_lines, (($height - 5) - @log_lines) if @log_lines > ($height - 5); } @@ -152,7 +154,7 @@ sub review_unused { # before prompting, clear out stdin, to avoid # registered a keypress more than once ReadMode 4; - while (defined ReadKey(-1)) { } + 1 while defined ReadKey(-1); my @opts = ('y', 'n'); push @opts, 'o' if defined $contentlocation; @@ -311,12 +313,13 @@ sub abs_contentlocation { my $key = shift; my $contentlocation; + #<<< try { ($contentlocation) = $self->git->annex("contentlocation", $key); - } - catch { + } catch { undef $contentlocation; }; + #>>> return (defined $contentlocation) ? rel2abs($contentlocation, $self->toplevel) : undef; |