Re: [v4] refspec: add support for negative refspecs

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

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

> On Wed, Sep 30, 2020 at 5:26 PM Jacob Keller <jacob.e.keller@xxxxxxxxx> wrote:
>> Changes since v3
>> * removed the ?: usage (for real this time)
>>
>> +               /* Note the reversal of src and dst */
>> +               if (refspec->pattern) {
>> +                       const char *key = refspec->dst ?: refspec->src;
>
> Blorp.

Woof.

Have squashed this in.

 remote.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/remote.c b/remote.c
index 9f8b25674e..dad3b79332 100644
--- a/remote.c
+++ b/remote.c
@@ -750,7 +750,7 @@ static int query_matches_negative_refspec(struct refspec *rs, struct refspec_ite
 
 		/* Note the reversal of src and dst */
 		if (refspec->pattern) {
-			const char *key = refspec->dst ?: refspec->src;
+			const char *key = refspec->dst ? refspec->dst : refspec->src;
 			const char *value = refspec->src;
 
 			if (match_name_with_pattern(key, needle, value, &expn_name))



[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