Commit d5341588 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'sh-partial-revert-mr-54662' into 'master'

Restore original index error check for snippet commit check

See merge request gitlab-org/gitlab!54737
parents 109bbd76 364da026
...@@ -115,10 +115,8 @@ class SnippetRepository < ApplicationRecord ...@@ -115,10 +115,8 @@ class SnippetRepository < ApplicationRecord
end end
def invalid_path_error?(err) def invalid_path_error?(err)
(err.is_a?(Gitlab::Git::Index::IndexError) && err.is_a?(Gitlab::Git::Index::IndexError) &&
err.message.downcase.start_with?('invalid path', 'path cannot include directory traversal')) || err.message.downcase.start_with?('invalid path', 'path cannot include directory traversal')
(err.is_a?(Gitlab::Git::CommandError) &&
err.message.include?('CreateFile: invalid path'))
end end
def invalid_signature_error?(err) def invalid_signature_error?(err)
......
---
title: Fix snippet commit bug because of different Gitaly error
merge_request: 54662
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment