Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/tree.rb')
-rw-r--r--lib/gitlab/git/tree.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/git/tree.rb b/lib/gitlab/git/tree.rb
index df3d8165ef2..140dc791135 100644
--- a/lib/gitlab/git/tree.rb
+++ b/lib/gitlab/git/tree.rb
@@ -26,6 +26,11 @@ module Gitlab
repository.gitaly_commit_client.tree_entries(
repository, sha, path, recursive, skip_flat_paths, pagination_params)
end
+
+ # Incorrect revision or path could lead to index error.
+ # We silently handle such errors by returning an empty set of entries and cursor.
+ rescue Gitlab::Git::Index::IndexError
+ [[], nil]
end
private