Re: [PATCH 2/2] rev-parse: honor --quiet when asking for reflog dates that do not exist

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

 



David Aguilar <davvid@xxxxxxxxx> writes:

> @@ -514,8 +514,11 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1,
>  
>  	if (warn_ambiguous_refs &&
>  	    (refs_found > 1 ||
> -	     !get_short_sha1(str, len, tmp_sha1, GET_SHA1_QUIETLY)))
> -		warning(warn_msg, len, str);
> +	     !get_short_sha1(str, len, tmp_sha1, GET_SHA1_QUIETLY))) {
> +		if (!(flags & GET_SHA1_QUIETLY)) {
> +			warning(warn_msg, len, str);
> +		}
> +	}

Hmph, wouldn't it be simpler to read and understand if it were done
this way instead?

-	if (warn_ambiguous_refs &&
+	if (warn_ambiguous_refs && !(flags & GET_SHA1_QUIETLY) &&
 	    (refs_found > 1 || !get_short_sha1(...)))
		waqrning(...);

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