diff options
Diffstat (limited to 'perl')
-rw-r--r-- | perl/Git.pm | 4 | ||||
-rw-r--r-- | perl/Git/SVN.pm | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/perl/Git.pm b/perl/Git.pm index d856930b2e..54c9ed0dde 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -563,7 +563,7 @@ sub get_record { Query user C<PROMPT> and return answer from user. Honours GIT_ASKPASS and SSH_ASKPASS environment variables for querying -the user. If no *_ASKPASS variable is set or an error occoured, +the user. If no *_ASKPASS variable is set or an error occurred, the terminal is tried as a fallback. If C<ISPASSWORD> is set and true, the terminal disables echo. @@ -980,7 +980,7 @@ sub cat_blob { return -1; } - if ($description !~ /^[0-9a-fA-F]{40} \S+ (\d+)$/) { + if ($description !~ /^[0-9a-fA-F]{40}(?:[0-9a-fA-F]{24})? \S+ (\d+)$/) { carp "Unexpected result returned from git cat-file"; return -1; } diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm index 76b2965905..4b28b87784 100644 --- a/perl/Git/SVN.pm +++ b/perl/Git/SVN.pm @@ -1491,6 +1491,10 @@ sub call_authors_prog { sub check_author { my ($author) = @_; + if (defined $author) { + $author =~ s/^\s+//g; + $author =~ s/\s+$//g; + } if (!defined $author || length $author == 0) { $author = '(no author)'; } |