From: Yue Lin Ho <yuelinho777@gmail.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: git@vger.kernel.org, msysGit <msysgit@googlegroups.com>
Subject: Re: The different EOL behavior between libgit2-based software and official Git
Date: Fri, 20 Jun 2014 16:30:52 +0800 [thread overview]
Message-ID: <CAO_ghTLq-a3dJGXvmspaCYS19RhTJzT0teWO5XSfVSiRUN7rrQ@mail.gmail.com> (raw)
In-Reply-To: <53A3DB01.7090904@web.de>
[-- Attachment #1: Type: text/plain, Size: 3942 bytes --]
Hi:
2014-06-20 14:56 GMT+08:00 Torsten Bögershausen <tboegi@web.de>:
> Hm,
> I feeled puzzled here.
> Even if I wouldn't recommend to use core.autocrlf, and prefer to use
> .gitattributes,
> the CRLF conversion should work under Git, but it doensn't seem to do so.
>
> Clone this repo:
> origin https://github.com/YueLinHo/TestAutoCrlf.git
> Try to see if LF or CRLF can be converted into CRLF,
> when core.autocrlf is true.
>
>
> Neither msysgit nor Git under Linux produces CRLF (?)
>
> Git under Mac OS produces the CRLF:
> both Git 2.0.0 and the latest msygit code base (7e872d24a9bd03),
> compiled under Mac OS
>
> What do I miss ?
>
> git --version
> git version 2.0.0
> tb@Linux:~/EOL_Test/TestAutoCrlf$ t=MIX-more_LF.txt && rm -f $t && git
> -c core.eol=CRLF checkout $t && od -c $t
> 0000000 L i n e 1 \n l i n e ( 2 ) \r
> 0000020 \n l i n e 3 . \n t h i s i s
> 0000040 l i n e 4 \n l i n e
> 0000060 N o . 5 \n L i n e N u m b e
> 0000100 r 6 \n
>
> =============================================
> $ git --version
> git version 1.9.2.msysgit.0.1206.g7e872d2
>
> tb@msgit ~/EOL_test/TestAutoCrlf (master)
> $ t=MIX-more_LF.txt && rm -f $t && git -c core.eol=CRLF checkout $t
> && od -c $t
> 0000000 L i n e 1 \n l i n e ( 2 ) \r
> 0000020 \n l i n e 3 . \n t h i s i s
> 0000040 l i n e 4 \n l i n e
> 0000060 N o . 5 \n L i n e N u m b e
> 0000100 r 6 \n
>
> =============================================
> tb@mac:~/EOL_Test/TestAutoCrlf> git --version
> git version 2.0.0.622.g9478935
> tb@mac:~/EOL_Test/TestAutoCrlf> t=MIX-more_LF.txt && rm -f $t && git
> -c core.eol=CRLF checkout $t && od -c $t
> 0000000 L i n e 1 \r \n l i n e ( 2 )
> 0000020 \r \n l i n e 3 . \r \n t h i s
> 0000040 i s l i n e 4 \r \n l i n
> 0000060 e N o . 5 \r \n L i n e N
> 0000100 u m b e r 6 \r \n
>
> ==============================================
> tb@mac:~/EOL_Test/TestAutoCrlf> t=MIX-more_LF.txt && rm -f $t &&
> ~/projects/git/tb.msygit/git -c core.eol=CRLF checkout $t && od -c $t
> 0000000 L i n e 1 \r \n l i n e ( 2 )
> 0000020 \r \n l i n e 3 . \r \n t h i s
> 0000040 i s l i n e 4 \r \n l i n
> 0000060 e N o . 5 \r \n L i n e N
> 0000100 u m b e r 6 \r \n
>
>
>
>
Wow!
P.S.
libgit2 just has a PR that try to be identical with official git.
See https://github.com/libgit2/libgit2/pull/2432
Yue Lin Ho
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #2: Type: text/html, Size: 6187 bytes --]
next prev parent reply other threads:[~2014-06-20 8:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 2:59 The different EOL behavior between libgit2-based software and official Git Yue Lin Ho
2014-06-19 6:39 ` Torsten Bögershausen
2014-06-19 7:25 ` Yue Lin Ho
2014-06-20 6:56 ` Torsten Bögershausen
2014-06-20 8:30 ` Yue Lin Ho [this message]
2014-06-20 10:33 ` [msysGit] " Torsten Bögershausen
2014-06-20 16:33 ` Junio C Hamano
2014-06-22 6:46 ` [msysGit] " Torsten Bögershausen
2014-06-23 17:29 ` Junio C Hamano
2014-06-20 8:44 ` Yue Lin Ho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAO_ghTLq-a3dJGXvmspaCYS19RhTJzT0teWO5XSfVSiRUN7rrQ@mail.gmail.com \
--to=yuelinho777@gmail.com \
--cc=git@vger.kernel.org \
--cc=msysgit@googlegroups.com \
--cc=tboegi@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).