# core.autocrlf and merge conflict output

6 messages from 2008-06-22 to 2008-06-23. Participants: Edward Z. Yang, Junio C Hamano, Johannes Schindelin.
Thread: https://gitlist.dev/t/14092

## Edward Z. Yang, 2008-06-22 22:08

Subject: core.autocrlf and merge conflict output
Message-ID: <g3miho$se5$1@ger.gmane.org>
URL: https://gitlist.dev/e/g3miho%24se5%241%40ger.gmane.org

```
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Apparently, the conflict information Git writes to the working copy
during merge doesn't respect core.autocrlf, magically converting files
to LF and causing problems when you try to commit the files, when
core.safecrlf is on.

I'm in the process of making a patch, but I'm having difficulty getting
builtin-merge-file.c and convert.c to play together. Part of the problem
is the lack of documentation in convert.c, which I'd also like to fix
(but in a different patch).

So, here's an appeal to the Git gods:

* Should I even bother trying to document this? While good docs are
always a definite plus, poor documentation can hurt code.

* Would crlf_to_worktree (apparently an internal function) or
convert_to_working_tree be more appropriate for this task?

* Where can I get a sensible value for *path in convert.c from
builtin-merge-file.c?

Thanks!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIXs17qTO+fYacSNoRAuAEAJ9LekfdUzU8WjbYxdhDOLaUfN67HACgg6gR
3kpT/5CbV3X7bbfkwJFDpAI=
=lega
-----END PGP SIGNATURE-----

```

## Junio C Hamano, 2008-06-23 00:45

Subject: Re: core.autocrlf and merge conflict output
Message-ID: <7vy74xj7ww.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vy74xj7ww.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <g3miho$se5$1@ger.gmane.org>

```
"Edward Z. Yang" <edwardzyang@thewritingpot.com> writes:

> Apparently, the conflict information Git writes to the working copy
> during merge doesn't respect core.autocrlf,...

Is this an old news before 249c61a (merge-recursive: respect core.autocrlf
when writing out the result, 2008-06-09) happened?

```

## Edward Z. Yang, 2008-06-23 01:47

Subject: Re: core.autocrlf and merge conflict output
Message-ID: <g3mvbh$mmj$1@ger.gmane.org>
URL: https://gitlist.dev/e/g3mvbh%24mmj%241%40ger.gmane.org
In-Reply-To: <7vy74xj7ww.fsf@gitster.siamese.dyndns.org>

```
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Junio C Hamano wrote:
> Is this an old news before 249c61a (merge-recursive: respect core.autocrlf
> when writing out the result, 2008-06-09) happened?

Apparently, yes. :o) Thus are the perils of working off a "downstream"
branch. I'll go bug the git/mingw/4msysgit.git maintainers to get this
change merged in. Thanks!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIXwC4qTO+fYacSNoRAi8RAJ4/ZF0C0XB9QSPgCnQYae/33YSRUgCff/y5
5Dd9vy/pQQsNJbyQ+xfc4lY=
=fyGn
-----END PGP SIGNATURE-----

```

## Junio C Hamano, 2008-06-23 01:54

Subject: Re: core.autocrlf and merge conflict output
Message-ID: <7vk5ggkjan.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vk5ggkjan.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <g3mvbh$mmj$1@ger.gmane.org>

```
"Edward Z. Yang" <edwardzyang@thewritingpot.com> writes:

> Junio C Hamano wrote:
>> Is this an old news before 249c61a (merge-recursive: respect core.autocrlf
>> when writing out the result, 2008-06-09) happened?
>
> Apparently, yes. :o) Thus are the perils of working off a "downstream"
> branch. I'll go bug the git/mingw/4msysgit.git maintainers to get this
> change merged in. Thanks!

Did cherry-picking that particular commit locally fixes the issue for you?

```

## Johannes Schindelin, 2008-06-23 02:00

Subject: Re: core.autocrlf and merge conflict output
Message-ID: <alpine.DEB.1.00.0806230259140.6439@racer>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0806230259140.6439%40racer
In-Reply-To: <g3mvbh$mmj$1@ger.gmane.org>

```
Hi,

On Sun, 22 Jun 2008, Edward Z. Yang wrote:

> Junio C Hamano wrote:
> > Is this an old news before 249c61a (merge-recursive: respect 
> > core.autocrlf when writing out the result, 2008-06-09) happened?
> 
> Apparently, yes. :o) Thus are the perils of working off a "downstream" 
> branch. I'll go bug the git/mingw/4msysgit.git maintainers to get this 
> change merged in. Thanks!

Funny.  And I thought 1.5.6 contained that patch...  Because 1.5.6 was 
merged by Steffen recently, and announced on both the msysgit list as well 
as this one.

Ciao,
Dscho

```

## Edward Z. Yang, 2008-06-23 02:23

Subject: Re: core.autocrlf and merge conflict output
Message-ID: <485F093F.8020300@thewritingpot.com>
URL: https://gitlist.dev/e/485F093F.8020300%40thewritingpot.com
In-Reply-To: <alpine.DEB.1.00.0806230259140.6439@racer>

```
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Johannes Schindelin wrote:
> Funny.  And I thought 1.5.6 contained that patch...  Because 1.5.6 was 
> merged by Steffen recently, and announced on both the msysgit list as well 
> as this one.

And I'm wrong once again. My git checkout was on a detached head and
wasn't updating (apparently, I'm no good at reading error messages).
Switching back to master, pulling and then re-compiling fixed it.

While 99% of this is my fault, there might be a bug in netinstall.
However, I'm going to take that one to the msysgit list.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIXwk/qTO+fYacSNoRAkIhAJ9LU6jH5ThQbu0tSjmkbp7ynEyh5wCdHvbJ
pFVPllbiXjfLrgEYuY+uVlM=
=ZxbH
-----END PGP SIGNATURE-----

```
