Skip to content

WIP: Add an ability to define custom encoding of blob content via gitattributes.

What does this MR do?

Adds an ability to define custom encoding of blob content via gitattributes to fix issues when a diff or a file content is shown corrupted.

Why was this MR needed?

To fix bugs.

Screenshots (if relevant)

See related issues.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

#18151 (moved), #14048 (moved)

P.S.

Original patch by @kolesar (see gitlab-ce!7302), updated to the recent GitLab version by @apollo13 (gitlab-ce!10913). Rebased onto GitLab v10.1.1.

Tests failure

This patch needs commit 50995b5def6012680554dac82f2449524b2d21c3 as a branch named custom-encoding-gitattributes in gitlab-tests repository (see gitlab-test!26) to pass tests. I've run tests with the patch proposed by @godfat and it almost passed (except db:rollback-mysql and db:rollback-pg tests; I've tried to retry them, but with no luck; I do not know why they fail)

WIP: I suppose changelog must be added and documentation to be updated...

Edited by Alexey Shumkin

Merge request reports