From 3d1bc652cb9a603bc1cf4430c2f7e7f868e32207 Mon Sep 17 00:00:00 2001 From: Martin Olsson Date: Fri, 27 Mar 2015 00:25:34 +0100 Subject: [PATCH 1/2] Fix two typos and add some periods --- git-cal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-cal b/git-cal index dd8289d..cd30ffa 100755 --- a/git-cal +++ b/git-cal @@ -426,8 +426,8 @@ git-cal - A simple tool to view commits calendar (similar to github contribution =head1 SYNOPSIS "git-cal" is a tool to visualize the git commit history in github's contribution calendar style. -The calendar shows how frequently the commits are made over the past year or some choosen period -Activity can be displayed using ascii, ansi or unicode characters, default is choosen based on ENV +The calendar shows how frequently the commits are made over the past year or some chosen period. +Activity can be displayed using ascii, ansi or unicode characters, default is chosen based on ENV. git-cal From fea02b94977c7a16870fb58f28bcb13c6ff42d0f Mon Sep 17 00:00:00 2001 From: Martin Olsson Date: Fri, 27 Mar 2015 00:28:24 +0100 Subject: [PATCH 2/2] Don't mix tabs and spaces for indent Replace TAB chars with 4 spaces instead. --- git-cal | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/git-cal b/git-cal index cd30ffa..07d60e1 100755 --- a/git-cal +++ b/git-cal @@ -397,19 +397,19 @@ sub configure { my $git_command = "git config --get-regexp 'calendar\.*'"; my @parts = split(/\s/, qx/$git_command/); if(@parts) { - my %config; - while(my ($key, $value) = splice(@parts, 0, 2)) { + my %config; + while(my ($key, $value) = splice(@parts, 0, 2)) { $key =~ s/calendar\.//; $config{$key} = $value; - } - local @ARGV = (map { ( "-$_" => $config{$_} ) } - grep { exists $config{$_} } @wanted); - GetOptions( + } + local @ARGV = (map { ( "-$_" => $config{$_} ) } + grep { exists $config{$_} } @wanted); + GetOptions( 'period=n' => $period, 'format=s' => sub { - if ($_[1] eq 'ascii') { $$ascii ||= 1; } - elsif ($_[1] eq 'ansi') { $$ansi ||= 1; } - elsif ($_[1] eq 'unicode') { $$unicode ||= 1; } + if ($_[1] eq 'ascii') { $$ascii ||= 1; } + elsif ($_[1] eq 'ansi') { $$ansi ||= 1; } + elsif ($_[1] eq 'unicode') { $$unicode ||= 1; } }, 'author=s' => $author );