diff options
author | Rubén Dávila <ruben@gitlab.com> | 2018-06-06 13:49:38 -0500 |
---|---|---|
committer | Rubén Dávila <ruben@gitlab.com> | 2018-06-06 13:49:38 -0500 |
commit | 29818672e12fe779034920933098f47269fdef16 (patch) | |
tree | b71983e6a7909a81294e14be777fe7b8bd9e102b /lib/gitlab/git/raw_diff_change.rb | |
parent | 90a5bcc5c9bcf90b4eb17ace072212335b85ea29 (diff) | |
download | gitlab-ce-29818672e12fe779034920933098f47269fdef16.tar.gz |
Improve performance used to check LFS integrityrd-45062-further-improve-lfs-integrity-check-performance
Instead of using `git rev-list` and loading each Blob to inspect its
content, we're now relying on the usage of `git diff` and `git
cat-file`. This has the main advantage
that we're reusing the same technique used for other existing checks,
hence all the Blobs are cached.
Diffstat (limited to 'lib/gitlab/git/raw_diff_change.rb')
-rw-r--r-- | lib/gitlab/git/raw_diff_change.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/git/raw_diff_change.rb b/lib/gitlab/git/raw_diff_change.rb index 98de9328071..a2815c5603d 100644 --- a/lib/gitlab/git/raw_diff_change.rb +++ b/lib/gitlab/git/raw_diff_change.rb @@ -17,6 +17,10 @@ module Gitlab end end + def deleted? + operation == :deleted + end + private # Input data has the following format: |