Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Rename suffixcmp() to has_suffix()

From: Jeff King <hidden>
Date: 2016-06-15 22:59:10

On Mon, Nov 04, 2013 at 10:45:11PM +0100, Christian Couder wrote:
quoted hunk ↗ jump to hunk
diff --git a/builtin/clone.c b/builtin/clone.c
index 874e0fd..4b8308e 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -510,7 +510,7 @@ static void write_followtags(const struct ref *refs, const char *msg)
 	for (ref = refs; ref; ref = ref->next) {
 		if (prefixcmp(ref->name, "refs/tags/"))
 			continue;
-		if (!suffixcmp(ref->name, "^{}"))
+		if (!has_suffix(ref->name, "^{}"))
I think the intent of your patch is reasonable, but doesn't it flip the
logic of the return value? That is, shouldn't this become:

  if (has_suffix(...))

?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help