Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Fix precommit on Windows with native line endings

Steve Rowe440747c066c4
diff --git a/build.xml b/build.xml
index cc1aff699f6..1176dc7dbad 100644
--- a/build.xml
+++ b/build.xml
@@ -208,6 +208,7 @@
def lineNumber = 0;
singleLineSplitter.split(text).each {
++lineNumber;
+ it.trim(); // remove trailing carriage return after split on Windows with native line endings
if (underSourceHeader) { // This line is either a single source line, or the boundary of a code block
inCodeBlock = blockBoundaryPattern.matcher(it).matches();
if ( ! blockTitlePattern.matcher(it).matches()) { // Keep underSourceHeader=true