Re: [PATCH] builtin-fast-export.c: add default case to avoid crash on corrupt repo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> wrote:
> It
> appears that there is no way to feed a tree object to fast-import, but I
> think the fast-import language can represent a tag that points at another
> tag just fine.

Correct.

This area of the langauge was built around the basic CVS->Git sort
of conversion, where we just wanted to attach the CVS "tag" symbol
onto a Git snapshot that seemed to match it.  Annotated tags were
used only because tools like git fetch and git describe prefer to
work with them, and these were (at some point in time) meaningful
labels for these revisions so the project post-conversion should
retain those same labels.

In hindsight, parts of the fast-import langauge are problematic as
they don't fully represent the Git object graph, and this is one
of those areas.  It wasn't designed to represent the same range
of structures as Git can represent.

> So the best you can do is perhaps to issue a warning
> "skipping a tag that points at a tree object" and impoement a proper
> handling of a tag that points at a tag.

Or, patch fast-import to expand its language.  You could relax
the "from <committish>" rule to be "from <objectish>" and then
create tag a tree using a temporary branch and a from line of
"from temp-branch^{tree}".

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux