After upgrade from 2.16.27 to 3.6.1 Gerrit shows .sql files as binary

69 views
Skip to first unread message

Александр Ященко

unread,
Jul 6, 2022, 11:58:57 AM7/6/22
to Repo and Gerrit Discussion
We've faced with the issue from the Subject.
We've tried to adjust some parameters for the server (gerrit/etc/gerrit.config) but without results:
[core]
        streamFileThreshold = 2000m
        deltaBaseCacheLimit = 500m
        packedGitOpenFiles = 254
        packedGitMmap = true
        packedGitLimit = 100m
[change]
        cacheAutomerge = false
        maxUpdates = 100000
[cache "web_sessions"]
        maxAge = 7d
        diskLimit = 16384m
[cache "diff"]
        memoryLimit = 1000m
        timeout = 150000ms
[cache "git_file_diff"]
        memoryLimit = 1000m
[cache "diff_intraline"]
        memoryLimit = 1000m
        timeout = 150000ms

Thanks in advance for your reply

Oleksandr Yashchenko

unread,
Jul 22, 2022, 6:40:11 AM7/22/22
to Repo and Gerrit Discussion
Hi,
Maybe this will help someone.

OK, finally I found the reason:
The issue caused by "^M" control characters. Windows uses these characters(aka CR - Carriage Return bitecode) to mark a line break in a text file. 

So, to find these characters I used the following command:
grep -n -U $'\015' file.sql | cat -A  

After that I made two commits and voilà  it shows diff again!!!

среда, 6 июля 2022 г. в 18:58:57 UTC+3, Oleksandr Yashchenko:

Matthias Sohn

unread,
Jul 22, 2022, 9:58:30 AM7/22/22
to Oleksandr Yashchenko, Repo and Gerrit Discussion
On Fri, Jul 22, 2022 at 12:40 PM Oleksandr Yashchenko <ssa...@gmail.com> wrote:
Hi,
Maybe this will help someone.

OK, finally I found the reason:
The issue caused by "^M" control characters. Windows uses these characters(aka CR - Carriage Return bitecode) to mark a line break in a text file. 

So, to find these characters I used the following command:
grep -n -U $'\015' file.sql | cat -A  

After that I made two commits and voilà  it shows diff again!!!

Yes, recently JGit learnt to consider files containing lone CRs as binary to match how native git does that.
 

среда, 6 июля 2022 г. в 18:58:57 UTC+3, Oleksandr Yashchenko:
We've faced with the issue from the Subject.
We've tried to adjust some parameters for the server (gerrit/etc/gerrit.config) but without results:
[core]
        streamFileThreshold = 2000m
        deltaBaseCacheLimit = 500m
        packedGitOpenFiles = 254
        packedGitMmap = true
        packedGitLimit = 100m
[change]
        cacheAutomerge = false
        maxUpdates = 100000
[cache "web_sessions"]
        maxAge = 7d
        diskLimit = 16384m
[cache "diff"]
        memoryLimit = 1000m
        timeout = 150000ms
[cache "git_file_diff"]
        memoryLimit = 1000m
[cache "diff_intraline"]
        memoryLimit = 1000m
        timeout = 150000ms

Thanks in advance for your reply

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/9a65a561-e867-4205-8c41-e427fd6d46bfn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages