git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What's cooking in git.git (Jun 2010, #04; Wed, 23)

From
Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
Date
Jun 24, 2010, 12:23 UTC
Message-ID
<71BD27DC-9CA7-40E8-8253-ABF61083E53C@gmail.com>
In-Reply-To
<4C2344C0.2010402@viscovery.net>
On 24. juni 2010, at 13.42, Johannes Sixt wrote:
Show 21 quoted lines
> Am 6/24/2010 13:17, schrieb Finn Arne Gangstad:
>> Assume you start out with a repo that has a lot of text files with
>> CRLF checked in (A).
>> 
>>  C----
>> /     \
>> A---B---D
>> 
>> B: Add "* text=auto" to .gitattributes and normalize all files to LF
>> only in repo
>> 
>> D: try to merge C
>> 
>> Without this patch you will get a ridiculous number of lf/crlf
>> conflicts when trying to merge C into D, since the repository contents
>> for C are "wrong" wrt the new .gitattributes file.
> 
> What should happen when you have C checked out (i.e., you do not yet have
> the updated .gitattributes in your worktree nor index) and merge B?
> Currently, you get the identical conflicts, but I suspect that the patch
> does not help in this situation. IOW, it breaks the merge symmetry.
I confess that I didn't expect this to work either, but it does: the merge completes without conflict.  This is even covered in the included test script ("Check merging addition of text=auto").
I've cleaned the patch up a bit and added automatic delete/normalize conflict resolution.  Will submit a new version soon.
-- 
Eyvind Bernhardsen
Previous: Finn Arne GangstadNext: Junio C Hamano
Message 8 of 24 in “What's cooking in git.git (Jun 2010, #04; Wed, 23)”
  1. Junio C HamanoJun 23, 2010
  2. Ævar Arnfjörð BjarmasonJun 23, 2010
  3. Nazri RamliyJun 24, 2010
  4. Tay Ray ChuanJun 24, 2010
  5. Finn Arne GangstadJun 24, 2010
  6. Johannes SixtJun 24, 2010
  7. Finn Arne GangstadJun 24, 2010
  8. Eyvind BernhardsenJun 24, 2010
  9. Junio C HamanoJun 24, 2010
  10. Eyvind BernhardsenJun 24, 2010
  11. Junio C HamanoJun 24, 2010
  12. Finn Arne GangstadJun 25, 2010
  13. Eyvind BernhardsenJun 25, 2010
  14. Junio C HamanoJun 25, 2010
  15. Johannes SixtJun 25, 2010
  16. Finn Arne GangstadJun 25, 2010
  17. Johannes SixtJun 24, 2010
  18. git log --objectsHolger Hellmuth, Jun 24, 2010
  19. Santi BéjarJun 25, 2010
  20. Clément PoulainJun 24, 2010
  21. Christian CouderJun 25, 2010
  22. Ævar Arnfjörð BjarmasonJun 25, 2010
  23. Michael J GruberJun 25, 2010
  24. Shawn O. PearceJun 23, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.