diff options
Diffstat (limited to 'app/graphql/resolvers/last_commit_resolver.rb')
-rw-r--r-- | app/graphql/resolvers/last_commit_resolver.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/graphql/resolvers/last_commit_resolver.rb b/app/graphql/resolvers/last_commit_resolver.rb index 00c43bdfee6..acf7826ab13 100644 --- a/app/graphql/resolvers/last_commit_resolver.rb +++ b/app/graphql/resolvers/last_commit_resolver.rb @@ -11,7 +11,8 @@ 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, literal_pathspec: true) + commit = Gitlab::Git::Commit.last_for_path(tree.repository, + ExtractsRef.qualify_ref(tree.sha, tree.ref_type), path, literal_pathspec: true) ::Commit.new(commit, tree.repository.project) if commit end |