Thread (1 message) 1 message, 1 author, 2020-09-09

Re: [PATCH] blame.c: replace instance of !oidcmp for oideq

From: Junio C Hamano <hidden>
Date: 2020-09-09 20:06:20

Jeff King [off-list ref] writes:
quoted hunk
 @@
-struct object_id *OIDPTR1;
-struct object_id *OIDPTR2;
+expression OIDPTR1;
+expression OIDPTR2;
 @@
 - oidcmp(OIDPTR1, OIDPTR2) == 0
 + oideq(OIDPTR1, OIDPTR2)
@@ -71,8 +71,8 @@ expression E1, E2;
   ...>}
 
 @@
-struct object_id *OIDPTR1;
-struct object_id *OIDPTR2;
+expression *OIDPTR1;
+expression *OIDPTR2;
 @@
 - oidcmp(OIDPTR1, OIDPTR2) != 0
 + !oideq(OIDPTR1, OIDPTR2)
With an extra insight from the counter-example Réne pointed out in
your message, I think the above two are safe but all the others are
unsafe.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help