Re: [PATCH v12 10/13] tag.c: use 'ref-filter' data structures

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

 



Karthik Nayak <karthik.188@xxxxxxxxx> writes:

> This is a temporary step before porting 'tag.c' to use 'ref-filter'
> completely. As this is a temporary step, most of the code
> introduced here will be removed when 'tag.c' is ported over to use
> 'ref-filter' APIs

If you resend: missing '.' at the end of sentence.

> -	if (lines != -1)
> +	if (filter.lines != -1)
>  		die(_("-n option is only allowed with -l."));
> -	if (with_commit)
> +	if (filter.with_commit)
>  		die(_("--contains option is only allowed with -l."));
> -	if (points_at.nr)
> +	if (filter.points_at.nr)
>  		die(_("--points-at option is only allowed with -l."));

It may make sense to factor these checks into a function like

  void check_filter_consistancy(struct ref_filter *filter)

in ref-filter.c, since for-each-ref, branch and tag will eventually have
the same set of constraints on the options.

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