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

Re: [PATCH] Clarify text filter merge conflict reduction docs

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 30, 2010, 15:15 UTC
Message-ID
<7vbpas8scr.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4718B1FE-4525-41C2-A4D3-27E99C5A6973@gmail.com>
Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com> writes:
> Are you thinking that we could check changes in .gitattributes during a
> merge and only turn on normalization for those files where relevant
> attributes have changed?
Nothing that elaborate.

I was envisioning that we would compare object names of the .gitattributes files in directories that lead to the path being merged in three trees, and we use the new slowpath unless all three match. You could look _into_ the actual contents of .gitattributes and decide that a particular change does not affect the path you are merging, but I don't think it is worth it; sane people are expected not to flip CRLF/LF around many times a day anyway, so changes to .gitattributes should already be rare events.

We will be walking the trees in parallel while merging anyway, so when you have to merge a/b/c.txt, we would already have opened the top-level tree, tree "a", and tree "a/b" already, and we should be able pick up the object name of .gitattributes, a/.gitattributes and b/.gitattributes cheaply without opening any extra object.

Previous: Eyvind BernhardsenNext: Eyvind Bernhardsen
Message 12 of 14 in “CRLF merge conflict reduction, take 4”
  1. 0/3 CRLF merge conflict reduction, take 4Eyvind Bernhardsen, Jun 27, 2010
  2. 1/3 Avoid conflicts when merging branches with mixed normalizationEyvind Bernhardsen, Jun 27, 2010
  3. Finn Arne GangstadJun 28, 2010
  4. Clarify text filter merge conflict reduction docsEyvind Bernhardsen, Jun 28, 2010
  5. Finn Arne GangstadJun 28, 2010
  6. Junio C HamanoJun 29, 2010
  7. Eyvind BernhardsenJun 29, 2010
  8. Junio C HamanoJun 30, 2010
  9. Eyvind BernhardsenJun 30, 2010
  10. Junio C HamanoJul 1, 2010
  11. Eyvind BernhardsenJun 30, 2010
  12. Junio C HamanoJun 30, 2010
  13. 2/3 Try normalizing files to avoid delete/modify conflicts when mergingEyvind Bernhardsen, Jun 27, 2010
  14. 3/3 Don't expand CRLFs when normalizing text during mergeEyvind Bernhardsen, Jun 27, 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.