Re: [PATCH v6 2/3] fetch-pack: expose fsckObjects configuration logic

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

 



"Xing Xin via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> -	if (fetch_fsck_objects >= 0
> -	    ? fetch_fsck_objects
> -	    : transfer_fsck_objects >= 0
> -	    ? transfer_fsck_objects
> -	    : 0)
> -		fsck_objects = 1;
> +	fsck_objects = fetch_pack_fsck_objects();
> ...
> +int fetch_pack_fsck_objects(void)
> +{
> +	fetch_pack_setup();

OK, this one is designed to be as lightweight as possible when it
has already been called, so a potentially duplicated call would not
cause too much worries here.

> +	if (fetch_fsck_objects >= 0)
> +		return fetch_fsck_objects;
> +	if (transfer_fsck_objects >= 0)
> +		return transfer_fsck_objects;
> +	return 0;
> +}

Much easier to follow.  Nicely done.




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

  Powered by Linux