From: "Shawn O. Pearce" <spearce@spearce.org>
To: Dmitry Potapov <dpotapov@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] fast-import: tag may point to any object type
Date: Mon, 11 Jan 2010 09:14:54 -0800 [thread overview]
Message-ID: <20100111171454.GO32155@spearce.org> (raw)
In-Reply-To: <1263186165-23920-1-git-send-email-dpotapov@gmail.com>
Dmitry Potapov <dpotapov@gmail.com> 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".
>
> Accordingly to a generated crash file, Mark 1 is not a commit but a blob,
> which is pointed by junio-gpg-pub tag. Because git-tag allows to create such
> tags, git-fast-import should import them.
>
> Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
> ---
> fast-import.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fast-import.c b/fast-import.c
> index cd87049..e99990d 100644
> --- a/fast-import.c
> +++ b/fast-import.c
> @@ -2305,6 +2305,7 @@ static void parse_new_tag(void)
> struct tag *t;
> uintmax_t from_mark = 0;
> unsigned char sha1[20];
> + enum object_type type = OBJ_COMMIT;
NAK.
Your patch is the right idea. But you need to make sure all of
the branch arms are handled correctly.
That is, if we do this, the get_sha1() on line 2459 should also
permit non-commit objects, and the lookup_branch() earlier up on
line 2451 should do "type = OBJ_COMMIT".
--
Shawn.
next prev parent reply other threads:[~2010-01-11 17:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 5:02 [PATCH] fast-import: tag may point to any object type Dmitry Potapov
2010-01-11 17:14 ` Shawn O. Pearce [this message]
2010-01-13 12:35 ` [PATCH v2] " Dmitry Potapov
2010-01-13 17:24 ` Shawn O. Pearce
2010-01-14 4:44 ` [PATCH v3] " Dmitry Potapov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100111171454.GO32155@spearce.org \
--to=spearce@spearce.org \
--cc=dpotapov@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).