[
https://issues.apache.org/jira/browse/MRELEASE-1025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17005856#comment-17005856
]
Steinar Bang commented on MRELEASE-1025:
----------------------------------------
I've found why [authservice|https://github.com/steinarb/authservice] was
different when running release:prepare:
It had the following settings in .git/config:
{noformat}
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
eol = lf
autocrlf = input
{noformat}
I added the following settings to the [core] section of .git/config of a
different project:
{noformat}
eol = lf
autocrlf = input
{noformat}
After that when running "mvn release:prepare" the commits were OK and I could
unmess the CRLF with
{noformat}
git rm -rf --cached .
git reset --hard HEAD
{noformat}
Ie. "release:prepare" is still broken but there is a workaround.
> release:prepare and release:update-version sets line endings to crlf for all
> lines except the first and last lines of the pom.xml files
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MRELEASE-1025
> URL: https://issues.apache.org/jira/browse/MRELEASE-1025
> Project: Maven Release Plugin
> Issue Type: Bug
> Affects Versions: 2.5.3
> Environment: debian 9.8 "stretch", amd64, openjdk 8u212-b01-1~deb9u1,
> maven 3.3.9-4
> Reporter: Steinar Bang
> Priority: Major
> Labels: debian-issue
>
> For these two projects
> * https://github.com/steinarb/authservice
> * https://github.com/steinarb/osgi-service
> line endings in the pom.xml files are messed up when I do
> {noformat}
> mvn release:prepare
> {noformat}
> or bump versions with e.g.
> {noformat}
> mvn --batch-mode release:update-versions -DdevelopmentVersion=1.0.2-SNAPSHOT
> {noformat}
> What happens to the line endings are:
> # First line stays at lf
> # Last line stays at lf
> # All of the intervening lines get crlf
> # The line endings were initially lf (at least they were meant to be)
> # I run the "mvn release:prepare" and "mvn:update-version" commands from a
> command line on Debian GNU/linux
--
This message was sent by Atlassian Jira
(v8.3.4#803005)