From: Sebastian Setzer <sebastianspublicaddress@googlemail.com>
To: git@vger.kernel.org
Subject: How do you best store structured data in git repositories?
Date: Wed, 02 Dec 2009 22:08:17 +0100 [thread overview]
Message-ID: <1259788097.3590.29.camel@nord26-amd64> (raw)
Hi,
when you design a file format to store structured data, and you want to
manage these files with git, how do you do this best?
I'd like to hear about best practices, experiences, links to discussions
on this subject, ...
Here are some of my questions:
Do you store everything in a single file and configure git to use
special diff- and merge-tools?
Do you use XML for this purpose?
Do you take care that the contents of your file is as stable as possible
when it's saved or do you let your diff tools cope with issues like
reordering, reassignment of identifiers (for example when identifiers
are offsets in the file), ...?
Do you store one object/record per file (with filename=id, for example
with GUID-s) and hope that git will not mess them up when it merges
them?
Do you store records as directories, with very small files which contain
single attributes (because records can be considered sets of
key-value-pairs and the same applies to directories)? Do you configure
git to do a scalar merge on non-text "attributes" (with special file
extensions)?
When you don't store everything in a single, binary file: Do you use git
hooks to update an index for efficient queries on your structured data?
Do you update the whole index for every change? Or do you use git hashes
to decide which segment of your index needs to be updated?
greetings,
Sebastian
next reply other threads:[~2009-12-02 21:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-02 21:08 Sebastian Setzer [this message]
2009-12-02 21:17 ` How do you best store structured data in git repositories? Avery Pennarun
2009-12-04 0:14 ` David Aguilar
2009-12-04 1:45 ` Avery Pennarun
2009-12-04 8:00 ` jamesmikedupont
2009-12-07 21:20 ` Sebastian Setzer
2009-12-08 7:14 ` David Aguilar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1259788097.3590.29.camel@nord26-amd64 \
--to=sebastianspublicaddress@googlemail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).