Fixed bug where C<-T>/C<-B> were being called on strings.
[catagits/Gitalist.git] / lib / Gitalist / Git / Repository.pm
index 7e873cd..0d0c884 100644 (file)
@@ -135,7 +135,7 @@ class Gitalist::Git::Repository with Gitalist::Git::HasUtils {
             if !$sha1 || $sha1 !~ $SHA1RE;
 
         my @search_opts;
-        if ($search) {
+        if ($search and exists $search->{text}) {
             $search->{type} = 'grep'
                 if $search->{type} eq 'commit';
             @search_opts = (