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

Re: How do you best store structured data in git repositories?

From
David Aguilar <davvid@gmail.com>
Date
Dec 8, 2009, 07:14 UTC
Message-ID
<20091208071356.GA4970@gmail.com>
In-Reply-To
<1260220821.3545.12.camel@nord26-amd64>
On Mon, Dec 07, 2009 at 10:20:21PM +0100, Sebastian Setzer wrote:
Show 23 quoted lines
> On Thursday, Dec 03 2009 at 16:14 -0800, David Aguilar wrote:
> > On Wed, Dec 02, 2009 at 04:17:10PM -0500, Avery Pennarun wrote:
> > > On Wed, Dec 2, 2009 at 4:08 PM, Sebastian Setzer
> > > <sebastianspublicaddress@googlemail.com> wrote:
> > > > Do you use XML for this purpose?
> > > 
> > > XML is terrible for most data storage purposes.
> > 
> > I agree 100%.
> > 
> > JSON's not too bad for data structures and is known to
> > be friendly to XML expats.
> > 
> Sorry, I didn't want to start a flamewar against XML. I'm no big friend
> of XML myself, but I don't know of an (open source) diff-/merge tool for
> any general purpose file format other than XML or plain text.
> When you mention other formats, I'd be interested in
>   - why this format is good for storage in git
>   - if there are merge tools available which ensure that, after a merge,
> the structure (and maybe additional contraints) is still valid.
> 
> Thanks for your comments,
> Sebastian

Sorry, didn't mean to sound xml-flaming. The only reason for mentioning json, yaml, etc. is that they're good data structure formats. They're all plain text formats, so you can use existing diff/merge tools.

I guess none of this has much to do with git aside from being able to write custom merge drivers to operate on them as data.

If there's a diff/merge tool for xml that works well then hooking it up to git-{diff,merge}tool might be something to try too.

-- 
		David
Previous: Sebastian Setzer
Message 7 of 7 in “How do you best store structured data in git repositories?”
  1. Sebastian SetzerDec 2, 2009
  2. Avery PennarunDec 2, 2009
  3. David AguilarDec 4, 2009
  4. Avery PennarunDec 4, 2009
  5. jamesmikedupont@googlemail.comDec 4, 2009
  6. Sebastian SetzerDec 7, 2009
  7. David AguilarDec 8, 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.