summaryrefslogtreecommitdiff
path: root/app/graphql/resolvers/last_commit_resolver.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/resolvers/last_commit_resolver.rb')
-rw-r--r--app/graphql/resolvers/last_commit_resolver.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/graphql/resolvers/last_commit_resolver.rb b/app/graphql/resolvers/last_commit_resolver.rb
index 7a433d6556f..dd89c322617 100644
--- a/app/graphql/resolvers/last_commit_resolver.rb
+++ b/app/graphql/resolvers/last_commit_resolver.rb
@@ -9,7 +9,7 @@ module Resolvers
def resolve(**args)
# Ensure merge commits can be returned by sending nil to Gitaly instead of '/'
path = tree.path == '/' ? nil : tree.path
- commit = Gitlab::Git::Commit.last_for_path(tree.repository, tree.sha, path)
+ commit = Gitlab::Git::Commit.last_for_path(tree.repository, tree.sha, path, literal_pathspec: true)
::Commit.new(commit, tree.repository.project) if commit
end