Re: [PATCH 6/6] mktree --missing: allow missing objects

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

 



Junio C Hamano schrieb:
> -static void mktree_line(char *buf, size_t len, int line_termination)
> +static void mktree_line(char *buf, size_t len, int line_termination, int allow_missing)
>  {
>  	char *ptr, *ntr;
>  	unsigned mode;
> @@ -92,9 +92,12 @@ static void mktree_line(char *buf, size_t len, int line_termination)
>  
>  	/* It is perfectly normal if we do not have a commit from a submodule */
>  	if (!S_ISGITLINK(mode))
> +		allow_missing = 1;
> +
> +	if (!allow_missing)
>  		type = sha1_object_info(sha1, NULL);
>  	else
> -		type = OBJ_COMMIT;
> +		type = object_type(mode);
>  
>  	if (type < 0)
>  		die("object %s unavailable", sha1_to_hex(sha1));

Don't you need this, above?

-  	if (!S_ISGITLINK(mode))
+	if (S_ISGITLINK(mode))

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