stable

Clone or download

Read-only

Add a default LFS file preview in new Git UI

This is part of story #12325 use git-lfs objects in pull requests and web view Only blob view is done for now. The color corresponds to the theme used by the user. The regexp provided in the detector class was built regarding the current specification of the LFS file format[1]. The LFS text and SVG is directly handled by the Git plugin. We do this choice because these two plugins are harldy linked and because it was the best trade off regarding the feature / the code readability and the security aspects. [1] https://github.com/git-lfs/git-lfs/blob/v2.6.1/docs/spec.md#the-pointer Change-Id: Id51c843e6de07431d4235e6c0e33ac6434350fca

Modified Files

Name
A plugins/git/include/GitPHP/Events/DisplayFileContentInGitView.php +62 −0 Go to diff View file
M plugins/git/include/GitPHP/controller/Controller_Blob.php +10 −0 Go to diff View file
M plugins/git/site-content-gitphp/fr_FR/LC_MESSAGES/gitphp.po +3 −0 Go to diff View file
M plugins/git/site-content-gitphp/gitphp.pot +3 −0 Go to diff View file
A plugins/git/templates/gitphp/tuleap/blob-binary-lfs-file-svg.tpl +48 −0 Go to diff View file
M plugins/git/templates/gitphp/tuleap/blob.tpl +11 −1 Go to diff View file
M plugins/git/www/themes/BurningParrot/css/repository/gitphp/_blob.scss +1 −1 Go to diff View file
A plugins/gitlfs/include/Detector/Detector.php +31 −0 Go to diff View file
M plugins/gitlfs/include/gitlfsPlugin.class.php +11 −1 Go to diff View file
A plugins/gitlfs/phpunit/Detector/DetectorTest.php +105 −0 Go to diff View file