Re: [PATCH 6/8] add ref_cmp_full_short() comparing full ref name with a short name

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

 



Steffen Prohaska <prohaska@xxxxxx> writes:

> diff --git a/sha1_name.c b/sha1_name.c
> index b820909..2a1e093 100644
> --- a/sha1_name.c
> +++ b/sha1_name.c
> @@ -249,6 +249,20 @@ static const char *ref_fmt[] = {
>  	NULL
>  };
>  
> +int ref_cmp_full_short(const char *full_name, const char *short_name)
> +{
> +	const char **p;
> +	const int short_name_len = strlen(short_name);
> +
> +	for (p = ref_fmt; *p; p++) {
> +		if (strcmp(full_name, mkpath(*p, short_name_len, short_name)) == 0) {

We usually say "!strcmp()" instead for readability.
-
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]

  Powered by Linux