Re: [PATCH master] convert: The native line-ending is \r\n on MinGW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 15, 2013 at 11:43 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Erik Faye-Lund <kusmabite@xxxxxxxxx> writes:
>
>> This is absolutely the right thing to do. However, stuff have changed
>> a bit since the patch was written; this change now needs to go in
>> config.mak.uname instead of config.mak.
>
> Thanks for a quick response.
>
> What's your preference?  I could just ignore a patch I won't be able
> to test myself and have you guys carry it in your tree forever, but
> I do not think that is necessary for something small like this.

I should probably clarify; conceptually, this is the right thing to
do. Git for Windows is a Windows application, and should have CRLF as
the native newline. I hadn't tested this patch myself, though. Our
tree is currently way behind yours, and I tried to do a rebase, but it
turned out much trickier than I was hoping for.

I've given it a go on top of your tree + some essential patches I'll
need to get things to run, and it seems to do what it claims to do.
However, I haven't been able to run the test-suite, because I need a
bunch more patches from the msysGit-tree for that.

> I think this is low impact enough that it can directly go to
> 'master' or even 'maint' if I were to apply to my tree.
>

I agree. I don't think we need it in maint; we don't track that branch
for msysGit.

> Thanks.
>
> -- >8 --
> From: Jonathan Nieder <jrnieder@xxxxxxxxx>
> Date: Sat, 4 Sep 2010 03:25:09 -0500
> Subject: [PATCH] convert: The native line-ending is \r\n on MinGW
>
> If you try this:
>
>  1. Install Git for Windows (from the msysgit project)
>
>  2. Put
>
>         [core]
>                 autocrlf = false
>                 eol = native
>
>     in your .gitconfig.
>
>  3. Clone a project with
>
>         *.txt text
>
>     in its .gitattributes.
>
> Then with current git, any text files checked out have LF line
> endings, instead of the expected CRLF.
>
> Cc: Johannes Schindelin <johannes.schindelin@xxxxxx>
> Cc: Johannes Sixt <j6t@xxxxxxxx>
> Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
> ---
>  config.mak.uname | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/config.mak.uname b/config.mak.uname
> index 9080054..d78fd3d 100644
> --- a/config.mak.uname
> +++ b/config.mak.uname
> @@ -507,6 +507,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
>                 compat/win32/dirent.o
>         EXTLIBS += -lws2_32
>         PTHREAD_LIBS =
> +       NATIVE_CRLF = YesPlease
>         X = .exe
>         SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
>  ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
> --
> 1.8.2.1-542-g3613165
>

Looks fine to me.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]