From: Shawn O. Pearce Date: Wed, 13 Jan 2010 17:24:56 GMT Subject: Re: [PATCH v2] fast-import: tag may point to any object type Message-ID: <20100113172456.GB18625@spearce.org> In-Reply-To: <20100113123532.GC10586@dpotapov.dyndns.org> Dmitry Potapov wrote: > If you tried to export the official git repository, and then to import it > back then git-fast-import would die complaining that "Mark :1 not a commit". ... > diff --git a/fast-import.c b/fast-import.c > index cd87049..4fdf809 100644 > --- a/fast-import.c > +++ b/fast-import.c > @@ -2325,19 +2326,20 @@ static void parse_new_tag(void) > } else if (!get_sha1(from, sha1)) { > unsigned long size; > char *buf; > > + type = sha1_object_info(sha1, NULL); > buf = read_object_with_reference(sha1, > - commit_type, &size, sha1); > + typename(type), &size, sha1); This is better spelled as: buf = read_sha1_file(sha1, &type, &size); But otherwise the patch looks correct now, thanks. If you could make this one change, add my Acked-by: Shawn O. Pearce and resend so Junio can apply, thanks. -- Shawn.