Hello,

we are using GitLab on our server and strike the following problem. In our 
repository we store IPython notebooks (*.ipynb) that have inlined PNG 
images encoded as text within themselves. This makes the notebooks quite 
large -- megabytes or little tens of megabytes, which hugely slows down 
diffing and viewing the diffs in GitLab. We don't want to disable diffing 
of ipynb because they are important for us, but the huge slowdown makes 
GitLab hard to use.

I have prepared a filter script that takes the *.ipynb and replaces all PNG 
images with their MD5 hash. I could locally setup git, to use this filter 
before diffing ipynb by:

1. Putting .gitattributes in repository root with the following content:
   *.ipynb diff=ipynb

2. and adding the following section into .gitconfig:
    [diff "ipynb"] 
        textconv = "nbhashpng.py"

Having this, "git diff" displays the PNG hashes inside the *ipynb files 
instead of their encoded content, which makes the diff output more 
readable. Using this in GitLab should not only make diff more readable but 
also speedup the gitlab webpage rendering (instead of rendering megabytes 
of text it would render only kilobytes or so). We have tried to use the 
similar approach with GitLab, but it seems it ignores the .gitattribute 
settings.


So the questions are:

1. is it possible to force GitLab to use .gittatribues for generating diffs?

2. if no, is there another way to force GitLab to filter ipynb files using 
our filter scipt to generate diff views?


With regards,
Lukas

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitlabhq+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/4502f057-4f9c-43e1-8d59-5986bcf7f9fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to