Re: [PATCH v2 08/12] initial_ref_transaction_commit(): function for initial ref creation

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

 



Michael Haggerty <mhagger@xxxxxxxxxxxx> writes:

> +	struct ref_transaction *t;
> +	struct strbuf err = STRBUF_INIT;
> +
> +	t = ref_transaction_begin(&err);
> +	if (!t)
> +		die(err.buf);
>  
>  	for (r = local_refs; r; r = r->next) {
>  		if (!r->peer_ref)
>  			continue;
> -		add_packed_ref(r->peer_ref->name, r->old_sha1);
> +		if (ref_transaction_create(t, r->peer_ref->name, r->old_sha1,
> +					   0, NULL, &err))
> +			die(err.buf);
> +	}
> +
> +	if (initial_ref_transaction_commit(t, &err)) {
> +		die(err.buf);
>  	}

I'll remove {} around this as you do not seem to touch this part to
add more statement here.

The series makes sense so far ;-)
--
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]