jgit/org.eclipse.jgit.pgm
Thomas Wolf 83eddaf7fd 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>
2021-10-31 13:02:04 +01:00
..
.settings Enable compiler option --release 2021-09-29 17:13:01 +02:00
META-INF Fix split package in bundle org.eclipse.jgit.ssh.jsch 2021-09-29 17:13:05 +02:00
resources [pgm] Fix default meta variable defined in StopOptionHandler 2021-06-28 01:10:41 +02:00
src/org/eclipse/jgit Binary and CR-LF detection: lone CRs -> binary 2021-10-31 13:02:04 +01:00
.classpath Bump minimum required Java version to 11 2021-09-29 17:12:12 +02:00
.gitignore Finish removing Apache Felix maven-bundle-plugin 2010-01-12 11:46:55 -08:00
.project Enforce the use of Java5 API:s only (with a few exceptions) 2011-12-16 01:01:36 +01:00
BUILD Decouple JSch from JGit Core 2020-06-01 01:46:59 +02:00
about.html Add missing about.html files to all shipped bundles 2011-06-08 21:51:51 +02:00
build.properties Do not include log4j implementation in jgit 2020-06-01 01:56:33 +02:00
jgit.sh Enable passing java options to jgit command line executable 2020-04-28 13:57:42 +02:00
plugin.properties Fix bundle localization of Apache SSH bundle 2019-06-21 17:54:06 +02:00
pom.xml Prepare 5.13.0-SNAPSHOT builds 2021-06-14 01:49:05 +02:00