From: David Aguilar Date: Tue, 08 Dec 2009 07:14:09 GMT Subject: Re: How do you best store structured data in git repositories? 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: > 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 > > > 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