nmatt commented on issue #8504: URL: https://github.com/apache/netbeans/issues/8504#issuecomment-2909829874
@mbien: I tested your build on Windows with default *core.eol* (= *native*, which means *crlf* on Windows) and *core.autocrlf* (= *false*) settings. Cloning the repository from GitHub with NetBeans correctly converts to CRLF upon checkout: ``` i/lf w/crlf attr/text=auto eol=crlf testfiles/auto.crlf i/lf w/lf attr/text=auto eol=lf testfiles/auto.lf i/lf w/crlf attr/text=auto testfiles/auto.native i/-text w/-text attr/text=auto testfiles/binary.auto i/-text w/-text attr/text=auto eol=crlf testfiles/binary.auto.crlf i/-text w/-text attr/text=auto eol=lf testfiles/binary.auto.lf i/crlf w/crlf attr/-text testfiles/binary.explicit.crlf i/lf w/lf attr/-text testfiles/binary.explicit.lf i/lf w/crlf attr/text eol=crlf testfiles/text.crlf i/lf w/lf attr/text eol=lf testfiles/text.lf i/lf w/crlf attr/text testfiles/text.native ``` However, NetBeans incorrectly shows all converted files as modified:  (I already observed this with prior versions of NetBeans.) After converting a CRLF file in the working directory to LF (so the same format as in the repository), NetBeans still shows it as modified, which is correct, as the file is different from its expected checked-out form, and `git status` also does show it as modified. This indicates that the modification detection in NetBeans doesn't just compare the file with the repository version as-is. Furthermore, changes to text files with CRLF line endings are incorrectly committed as-is instead of converting them back to LF upon check-in (tested with the auto.* and text.* files). Indicated by the "i/crlf" here: ``` i/crlf w/crlf attr/text=auto eol=crlf testfiles/auto.crlf i/lf w/lf attr/text=auto eol=lf testfiles/auto.lf i/crlf w/crlf attr/text=auto testfiles/auto.native i/-text w/-text attr/text=auto testfiles/binary.auto i/-text w/-text attr/text=auto eol=crlf testfiles/binary.auto.crlf i/-text w/-text attr/text=auto eol=lf testfiles/binary.auto.lf i/crlf w/crlf attr/-text testfiles/binary.explicit.crlf i/lf w/lf attr/-text testfiles/binary.explicit.lf i/crlf w/crlf attr/text eol=crlf testfiles/text.crlf i/lf w/lf attr/text eol=lf testfiles/text.lf i/crlf w/crlf attr/text testfiles/text.native ``` Reverting such a commit works (*Team* > *Revert/Recover* > *Revert Commit...*), in the sense that afterwards the files are again only LF in the repository. After reverting, NetBeans initially correctly shows the files as unmodified, but after a refresh (e.g. triggered by touching the files outside NetBeans) they are again incorrectly shown as modified. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists