Re: [PATCH v3 06/11] ref-filter: implement '--merged' and '--no-merged' options

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

 



Karthik Nayak <karthik.188@xxxxxxxxx> writes:
> --- a/ref-filter.c
> +++ b/ref-filter.c
> @@ -901,12 +903,19 @@ static int ref_filter_handler(const char *refname, const struct object_id *oid,
>  	if (!match_points_at(&filter->points_at, oid->hash, refname))
>  		return 0;
>  
> +	if (filter->merge_commit) {
> +		commit = lookup_commit_reference_gently(oid->hash, 1);
> +		if (!commit)
> +			return 0;
> +	}

I'd appreciate a comment here. If I understand correctly, the comment
could be along the lines of

/*
 * A merge filter implies that we're looking at refs pointing to
 * commits => discard non-commits early. The actual filtering is done
 * later.
 */

(perhaps something more concise)

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]