Re: [PATCH v2] fast-import: tag may point to any object type

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

 



Dmitry Potapov <dpotapov@xxxxxxxxx> 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 <spearce@xxxxxxxxxxx>

and resend so Junio can apply, thanks.

-- 
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]