Re: Merge-friendly text-based data storage
- From
Richard Hartmann <richih.mailinglist@gmail.com>
- Date
- Mar 27, 2012, 13:01 UTC
- Message-ID
- <CAD77+gR=p+jhN5qNoRgjtQPHqgqrdtcSmqAy_4d0NUaqE6ZkVg@mail.gmail.com>
- In-Reply-To
- <4F718496.4030808@ira.uka.de>
On Tue, Mar 27, 2012 at 11:12, Holger Hellmuth <hellmuth@ira.uka.de> wrote:
> 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.
Ugh, I did not consider that. I can't come up with a way, other than a custom merge driver, to prevent this. Am I correct?
> And there would be random merge failures with lines added at the same line > number even if different.
Yes, I know. That was the main reason why I asked for merge-friendly designs. I briefly considered union merges, but that's not a good idea for obvious reasons.
> The normal merging in git isn't suited for this task, it has different > objectives. Without a custom merge driver as Junio suggested
I more or less accepted that I will have to write one, eventually.
> 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
I considered this as well, but that's extremely expensive and wasteful.
-- Richard