aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ssh.jsch
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2021-10-31 01:35:52 +0200
committerThomas Wolf <thomas.wolf@paranor.ch>2021-10-31 13:02:04 +0100
commit83eddaf7fda22ca64e9c3852df67ccef0dacdaf5 (patch)
treeda257cd574e6b83c93bc277a5ea5cad742c0630d /org.eclipse.jgit.ssh.jsch
parent3444a3be8c8a567f944fd7b81838e615852d787a (diff)
downloadjgit-83eddaf7fda22ca64e9c3852df67ccef0dacdaf5.tar.gz
jgit-83eddaf7fda22ca64e9c3852df67ccef0dacdaf5.zip
Binary and CR-LF detection: lone CRs -> binary
C git considers not only files containing NUL bytes as binary but also files containing lone CRs. Implement this also for JGit. C git additionally counts printable vs. non-printable characters and considers files that have non_printable_count > printable_count / 128 also as binary. This is not implemented because such counting probably only makes sense if one looks at the full file or blob content. The Auto[CR]LF* streams in JGit look only at the first few KiB of a stream in order not to buffer too much. For the C git implementation, see [1]. [1] https://github.com/git/git/blob/7e27bd589d/convert.c#L35 Bug: 576971 Change-Id: Ia169b59bdbf1477f32ee2014eeb8406f81d4b1ab Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.ssh.jsch')
0 files changed, 0 insertions, 0 deletions