git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Holger Hellmuth <hellmuth@ira.uka.de>
To: Richard Hartmann <richih.mailinglist@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Merge-friendly text-based data storage
Date: Tue, 27 Mar 2012 11:12:54 +0200	[thread overview]
Message-ID: <4F718496.4030808@ira.uka.de> (raw)
In-Reply-To: <CAD77+gRTv4Aq_4FLAQcD9E0p7VBD7h6hQq3CJ9Wo5DU9Zjt+Hg@mail.gmail.com>

On 26.03.2012 16:19, Richard Hartmann wrote:
> Hi all,
>
> I am looking for information on how to design a merge-friendly data
> layout. Oddly enough, there does not seem to be much online other than
> the obvious "use text-based lines, one per data point".
>
> My current plan looks like:
>
>    metamonger\tversion: 0
>    filename\towner_name\tgroup_name\tetc\tpp
>    ##########
>    file1\trichih\trichih\tfoo\tbar
>    relative/path/to/file2\troot\troot\tfoo\tbar
>
> the two upper lines are designed to fail a merge if the version of the
> file layout changes. Anything starting with a hash-pound is a comment
> and will be ignored.

I may be misunderstanding something, but lets assume you want to merge a 
file that has "version: 0" with one that has "version: 1" and their last 
common ancestor would have "version: 0" naturally. So the merge would 
not fail even though the file layout changes.

And there would be random merge failures with lines added at the same 
line number even if different.

The normal merging in git isn't suited for this task, it has different 
objectives. Without a custom merge driver as Junio suggested the only 
way would be to store each data line in its own file. As you store file 
paths that would even fit, but I doubt it is what you had in mind

  parent reply	other threads:[~2012-03-27  9:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 14:19 Merge-friendly text-based data storage Richard Hartmann
2012-03-26 18:17 ` Junio C Hamano
2012-03-26 19:06   ` Richard Hartmann
2012-03-26 19:51     ` Junio C Hamano
2012-03-27  9:12 ` Holger Hellmuth [this message]
2012-03-27 13:01   ` Richard Hartmann
2012-03-27 15:21     ` Junio C Hamano
2012-03-27 15:46       ` Holger Hellmuth

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=4F718496.4030808@ira.uka.de \
    --to=hellmuth@ira.uka.de \
    --cc=git@vger.kernel.org \
    --cc=richih.mailinglist@gmail.com \
    /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).