Re: [PATCH 04/27] upload-pack: move "shallow" sending code out of deepen()

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

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

> @@ -551,16 +565,7 @@ static void deepen(int depth, const struct object_array *shallows)
>  		backup = result =
>  			get_shallow_commits(&want_obj, depth,
>  					    SHALLOW, NOT_SHALLOW);
> -	while (result) {
> -		struct object *object = &result->item->object;
> -		if (!(object->flags & (CLIENT_SHALLOW|NOT_SHALLOW))) {
> -			packet_write(1, "shallow %s",
> -				     oid_to_hex(&object->oid));
> -			register_shallow(object->oid.hash);
> -			shallow_nr++;
> -		}
> -		result = result->next;
> -	}
> +	send_shallow(result);
>  	free_commit_list(backup);

At this point in the series, "backup" becomes an unnecessary and
redundant variable, as you can free_commit_list(result) here, right?

>  	for (i = 0; i < shallows->nr; i++) {
>  		struct object *object = shallows->objects[i].item;
--
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]