There is a further discussion on the Git mailing list on this subject [1]. The key point is that this is not a "warning" (in the 'treat warnings as errors' vein [2]), rather is a statement about the presence or absence of a particular 'white space' in the file. Unix tend to believe that a complete (text) file is a sequence of lines, each terminated by a line feed (LF), so this is only a 'warning' in the social sense, and is hence informative. It's not a bug, but part of the flip side of diff needing some technical clarity as to how to deal with this 'change'.
[1] https://lore.kernel.org/git/xmqq35bsk9og.fsf@gitster.g/T/#u [2] https://blog.submain.com/treat-warnings-errors/ On Thursday, October 13, 2022 at 5:20:39 AM UTC+1 Thorsten Schöning wrote: > Guten Tag 'Daniel Gutson' via Git for human beings, > am Mittwoch, 12. Oktober 2022 um 23:12 schrieben Sie: > > > this actually is not a question, but a potential bug report. I > > think git should not complain about the lack of the newline for symlinks. > > The contents of what GIT maintains as symlinks are plain textual paths > and are therefore handled like every other plain text. So things are > consistent as they are, including the warning. If symlink contents aka > their paths wouldn't be treated as plain text like all other texts, you > wouldn't be able to diff anything anyway. > > So the real question is: How do you think symlinks should be diffed? > As textual path would be the wrong answer, as that's what's done > right now. > > Alternatively you would need to discuss why the missing newline ending > is warned about for ANY textual content, as it's up to the user if > that is necessary or not anyway. GIT can't decide such things. > > And besides, one needs to make sure where that warning comes from at > all as well. Is it really GIT itself or some default text editor > involved like VI or ... > > To make a long story short: I don't think it's worth it to report that > as a bug and I guess it won't be "fixed". > > Mit freundlichen Grüßen > > Thorsten Schöning > > -- > AM-SoFT IT-Service - Bitstore Hameln GmbH > Mitglied der Bitstore Gruppe - Ihr Full-Service-Dienstleister für IT und TK > > E-Mail: thorsten....@am-soft.de > Web: http://www.AM-SoFT.de/ > > Tel: +49 5151- 9468- 0 <+49%205151%2094680> > Tel: +49 5151- 9468-55 <+49%205151%20946855> > Mobil: +49 178-8 9468-04 > > AM-SoFT IT-Service - Bitstore Hameln GmbH, Brandenburger Str. 7c, 31789 > Hameln > AG Hannover HRB 221853 - Geschäftsführer: Janine Galonska > > > Für Rückfragen stehe ich Ihnen jederzeit zur Verfügung. > > Mit freundlichen Grüßen, > > Thorsten Schöning > > > Telefon: +49 5151 9468-55 <+49%205151%20946855> > Fax: > E-Mail: tscho...@am-soft.de > > AM-Soft IT-Service - Bitstore Hameln GmbH > Brandenburger Straße 7c > 31789 Hameln > > Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte > Informationen und ist ausschliesslich für den Adressaten bestimmt. > Jeglicher Zugriff auf diese E-Mail durch andere Personen als den Adressaten > ist untersagt. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail > irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und > vernichten Sie diese E-Mail. Sollten Sie nicht der für diese E-Mail > bestimmte Adressat sein, ist Ihnen jede Veröffentlichung, Vervielfältigung > oder Weitergabe wie auch das Ergreifen oder Unterlassen von Massnahmen im > Vertrauen auf erlangte Information untersagt. > > This e-mail may contain confidential and/or privileged information and is > intended solely for the addressee. Access to this email by anyone else is > unauthorized. If you are not the intended recipient (or have received this > e-mail in error) please notify the sender immediately and destroy this > e-mail. If you are not the intended recipient, any disclosure, copying, > distribution or any action taken or omitted to be taken in reliance on it, > is prohibited and may be unlawful. > > Hinweise zum Datenschutz: bitstore.group/datenschutz > > > > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/c4f53bb2-cff6-4a76-8fa7-cd34ca88ce63n%40googlegroups.com.