Re: [PATCH 06/14] run_diff_files(): de-mystify the size of combine_diff_path struct

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

 



Jeff King <peff@xxxxxxxx> writes:

> That 4 comes from the earliest code in ea726d02e9 (diff-files: -c and
> --cc options., 2006-01-28).

Thanks.  I have no idea where that hardcoded constant 4 came from,
but I think you are right that 2 would have been the correct number
ea726d02e9 shoudl have used there.

> +			/*
> +			 * Allocate space for two parents, which will come from
> +			 * index stages #2 and #3, if present. Below we'll fill
> +			 * these from (stage - 2).
> +			 */
>  			dpath = combine_diff_path_new(ce->name, ce_namelen(ce),
> -						      wt_mode, null_oid(), 5);
> +						      wt_mode, null_oid(), 2);
>  
>  			while (i < entries) {
>  				struct cache_entry *nce = istate->cache[i];

Perfect.




[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