[fastimport/MERGE] Train fixes

James Westby jw+debian at jameswestby.net
Wed Mar 12 00:22:03 GMT 2008


On Mon, 2008-03-10 at 20:23 -0400, Shawn O. Pearce wrote:
> Nothing better comes to mind.
> 
> On Git we would have to have the SHA-1 of the "ghost parent" in order
> to generate the correct SHA-1 of the child commit that references
> it, otherwise we cannot store the child commit.  Mark or no mark,
> it has to in the end boil down to a SHA-1 before we can finish the
> child commit.
> 
> Rough idea of a BNF:
> 
> 	new_ghost ::= 'ghost' lf
> 	  mark
> 	  ('id' sp hexsha1 lf)?
> 	  lf?;
> 
> and require that at least on Git to import a ghost the frontend
> must give us the "id" subcommand.  What do the bzr folks think?
>  

Yeah, that seems ok to me.

(Aside, the optional terminal LFs are a bit of a pain for
our current parser, it would be great to have them compulsory.
If there is ever another version of the format then I would
like to suggest that it mandates them. The documentation
suggests that they were an addition, hence the optional
nature, so I guess this is the way you would go anyway)

Generating the id would be a little problematic for us, as it
is part of the git format, but it is certainly possible. Should
we make it compulsory? Another solution would be for git to drop
the parent if it is a ghost with no id. This would break the
history representation and the round trip, but it would at least
allow you to get a working git repo.

Thanks,

James






More information about the bazaar mailing list