[fastimport/MERGE] Train fixes
Shawn O. Pearce
spearce at spearce.org
Mon Mar 10 23:35:57 GMT 2008
James Westby <jw+debian at jameswestby.net> wrote:
> On Mon, 2008-03-10 at 18:50 -0400, Shawn O. Pearce wrote:
> > Yea. Technically git-fast-import's code would permit me to let
> > the stream request a ghost parent, and actually produce data files
> > with a successful exit code, but the repository would fail git-fsck.
> > Tools like git-checkout (to fetch files) and git-log would seem to
> > work just fine, until we tried to hit the ghost, and then all hell
> > would break loose.
...
> > I'm open to some sort of notation in the stream format that a
> > ghost is being used and thus a missing object is to be expected.
> > With such a notation git-fast-import can automatically dump the
> > ghost entry into the graft file, and spit out a big fat warning
> > after the import is done.
> >
> > I'd rather not blanket allow missing references during an import.
> > That just sounds like trouble for a buggy frontend.
>
> My first thoughts are that we should strive to have the stream
> format contain information that allows you to describe the history
> that you are converting from, and then allow the importers to handle
> this as they see fit.
I don't disagree at all.
See above, I suggest we include the ghost in the stream, but
make sure its denoted as a ghost and not a reference we expect to
be valid.
Lets back up a second. What the heck is a ghost? And is it just a
20 byte string (aka a SHA-1)? In other words, is it really something
that the fast-import stream format would be able to otherwise accept
as starting point for a branch in a "from" command?
> I realise representing the ghost is going to be troublesome for
> git-fast-import, and you will know better than us how that should
> be done. However if we are unable to represent it at all in
> the stream format then there is no chance of a round-trip of bzr->bzr.
> Obviously this round trip is currently of little significance, but
> if we were to implement something like git-filter-branch on top
> of this then it would be more important.
Well, git can store it, and we could extract it back out in
fast-export but to really make the repository appear "sound"
we need to record that the ghost does not exist in the grafts.
Its messy for git, but that isn't your problem.
--
Shawn.
More information about the bazaar
mailing list