Fix directory and last commit not loading for special filenames
Filenames that contained special pathspec characters (see https://css-tricks.com/git-pathspecs-and-how-to-use-them) would not return a valid last commit or properly load in the repository browser. For example, `:wq` would cause the GraphQL endpoint to return a null `lastCommit`, and a file `:wq/test.txt` would not show the commit information in the repository browser. This requires https://gitlab.com/gitlab-org/gitaly/-/merge_requests/2303 to work.
显示
- GITALY_SERVER_VERSION 1 个添加, 1 个删除GITALY_SERVER_VERSION
- Gemfile 1 个添加, 1 个删除Gemfile
- Gemfile.lock 2 个添加, 2 个删除Gemfile.lock
- app/controllers/projects/blob_controller.rb 1 个添加, 1 个删除app/controllers/projects/blob_controller.rb
- app/graphql/resolvers/last_commit_resolver.rb 1 个添加, 1 个删除app/graphql/resolvers/last_commit_resolver.rb
- app/models/repository.rb 4 个添加, 3 个删除app/models/repository.rb
- app/services/files/base_service.rb 1 个添加, 1 个删除app/services/files/base_service.rb
- changelogs/unreleased/sh-fix-gitaly-bug-2857-for-dirs.yml 5 个添加, 0 个删除changelogs/unreleased/sh-fix-gitaly-bug-2857-for-dirs.yml
- lib/gitlab/git/commit.rb 3 个添加, 2 个删除lib/gitlab/git/commit.rb
- lib/gitlab/git/repository.rb 2 个添加, 2 个删除lib/gitlab/git/repository.rb
- lib/gitlab/gitaly_client/commit_service.rb 13 个添加, 5 个删除lib/gitlab/gitaly_client/commit_service.rb
- lib/gitlab/tree_summary.rb 1 个添加, 1 个删除lib/gitlab/tree_summary.rb
- spec/features/projects/commits/user_browses_commits_spec.rb 27 个添加, 0 个删除spec/features/projects/commits/user_browses_commits_spec.rb
- spec/features/projects/files/user_browses_files_spec.rb 1 个添加, 1 个删除spec/features/projects/files/user_browses_files_spec.rb
- spec/features/projects/tree/tree_show_spec.rb 7 个添加, 3 个删除spec/features/projects/tree/tree_show_spec.rb
- spec/graphql/resolvers/last_commit_resolver_spec.rb 25 个添加, 1 个删除spec/graphql/resolvers/last_commit_resolver_spec.rb
- spec/lib/gitlab/git/commit_spec.rb 28 个添加, 0 个删除spec/lib/gitlab/git/commit_spec.rb
- spec/lib/gitlab/gitaly_client/commit_service_spec.rb 8 个添加, 4 个删除spec/lib/gitlab/gitaly_client/commit_service_spec.rb
- spec/lib/gitlab/tree_summary_spec.rb 19 个添加, 6 个删除spec/lib/gitlab/tree_summary_spec.rb
- spec/models/repository_spec.rb 2 个添加, 2 个删除spec/models/repository_spec.rb
加载中
想要评论请 注册 或 登录