# Gitlab, sha512 and images files

**URL:** https://discourse.paraview.org/t/gitlab-sha512-and-images-files/2529
**Category:** Development
**Created:** [September 10, 2019, 2:52am UTC](https://discourse.paraview.org/t/gitlab-sha512-and-images-files/2529 "2019-09-10T02:52:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 10, 2019, 2:52am UTC](https://discourse.paraview.org/t/gitlab-sha512-and-images-files/2529/1 "2019-09-10T02:52:19Z")

</div>

I know this is a long shot, but here goes.

Gitlab has some awesome image comparison builtin diff, that looks like this :

> **[changed cat image (!2) · Merge Requests · Dimitrie Hoekstra /...](https://gitlab.com/dimitrieh/comment-on-pictures/merge_requests/2/diffs)**
>
> changed an existing image

Would there be a way to inform gitlab that it can, instead of only showing sha512 number for the sha512 file, actually recover the image files and show the diff the same way ?

That would be awesome !

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [September 10, 2019, 2:23pm UTC](https://discourse.paraview.org/t/gitlab-sha512-and-images-files/2529/2 "2019-09-10T14:23:23Z")

</div>

In principle, it shouldn’t be hard. The URL for the test image can easily be deduced from the sha512 and displayed in the Changes tab in an MR with some customization to GitLab… easier said than done, I’m sure.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [October 17, 2019, 1:06pm UTC](https://discourse.paraview.org/t/gitlab-sha512-and-images-files/2529/3 "2019-10-17T13:06:19Z")

</div>

I’d rather we look into just using git-lfs in the longer term. AFAIK, all of the features we’d want are in the latest release(s), but we just need to integrate it with the `ExternalData` CMake logic. [https://gitlab.kitware.com/cmake/cmake/issues/18487](https://gitlab.kitware.com/cmake/cmake/issues/18487)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 17, 2019, 2:13pm UTC](https://discourse.paraview.org/t/gitlab-sha512-and-images-files/2529/4 "2019-10-17T14:13:59Z")

</div>

I have been using git-lfs for a repository with test data. The size of the files are around 7Gb.  
The total size of the repository is over 15Gb now and a git diff can takes around 5 minutes (subsequent call are normal, only the first one after a while does that).

All that to say that there are some limitations to git-lfs. I know our data is not as big, but this still may impact us.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [October 17, 2019, 2:16pm UTC](https://discourse.paraview.org/t/gitlab-sha512-and-images-files/2529/5 "2019-10-17T14:16:50Z")

</div>

The goal would be to still retain these behaviors with `git-lfs`:

- Only download data as necessary (e.g., the test is enabled)
- Ability to share data between repository builds (though now it’s attached to the source trees)

Newer `git` and `git-lfs` versions support batch smudge/clean filtering, so I recommend seeing if upgrading to using those would improve the performance of the core `git` operations.
