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:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-04-17 17:30:16 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-04-17 17:30:18 +0300
commite02f1271f5784fe7c17a9efae8612999e1e62ee3 (patch)
tree168b4a215a51cb980c8e6c34da51a052f75f6a7c /lib/gitlab/git
parent25cb70ba6087d86343a127df88394fbe97b381b1 (diff)
Return nil on empty path
The execution path wasn't clear from the error, but either way this is a fix. Closes gitlab-org/gitaly#1115
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r--lib/gitlab/git/commit.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/git/commit.rb b/lib/gitlab/git/commit.rb
index 0fb82441bf8..fabcd46c8e9 100644
--- a/lib/gitlab/git/commit.rb
+++ b/lib/gitlab/git/commit.rb
@@ -486,6 +486,8 @@ module Gitlab
end
def tree_entry(path)
+ return unless path.present?
+
@repository.gitaly_migrate(:commit_tree_entry) do |is_migrated|
if is_migrated
gitaly_tree_entry(path)