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

Making GIT XML aware?

From
Ddavid.hagood@gmail.com <david.hagood@gmail.com>
Date
Sep 1, 2009, 13:57 UTC
Message-ID
<fcdc4d8bb3b1ee0b1473a48ed79e7c61.squirrel@localhost>

I have a project that is committing several XML files into GIT, and we have a problem when doing merges.

The files are UML XMI 1.1 files generated by a UML tool (specifically Enterprise Architect by Sparx), and EA "helpfully" puts things like timestamps of modification and access into the files. As you can guess, these are conflict-magnets. Yes, the ideal solution would be to turn that off, and I am pursuing that avenue within EA.

However, it seems to me that if there were some way to plug into GIT's merging logic, it would be possible to design an XML aware merging tool that might help on this (generalizing: if you could have content-aware merging libraries you could make all sorts of merges go more smoothly). For the specific case of an XML file, if you could have some way to denote tags and/or attributes that are "don't cares" you could address problems like I am having. You could also theoretically exploit a knowledge of the format to better identify what chunks are changes and possibly track motion within the files better.

Absent that, is there a way to tell git "in case of an unresolvable merge conflict, don't modify the file but put the other version of the file somewhere (e.g. filename.other) so that I can use an external tool to resolve the differences"? In this case, EA doesn't know how to use the standard conflict tags within a file to extract deltas.

Next: Avery Pennarun
Message 1 of 3 in “Making GIT XML aware?”
  1. david.hagood@gmail.comSep 1, 2009
  2. Avery PennarunSep 1, 2009
  3. Jakub NarebskiSep 1, 2009

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.