Thread (89 messages) 89 messages, 3 authors, 2016-06-15

[PATCH 68/86] builtin/name-rev: replace prefixcmd() with has_prefix()

flat view
STALE3768d

From: Christian Couder <hidden>
Date: 2016-06-15 22:59:13
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Christian Couder <redacted>
---
 builtin/name-rev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 20fcf8c..2b74220 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -101,9 +101,9 @@ static const char *name_ref_abbrev(const char *refname, int shorten_unambiguous)
 {
 	if (shorten_unambiguous)
 		refname = shorten_unambiguous_ref(refname, 0);
-	else if (!prefixcmp(refname, "refs/heads/"))
+	else if (has_prefix(refname, "refs/heads/"))
 		refname = refname + 11;
-	else if (!prefixcmp(refname, "refs/"))
+	else if (has_prefix(refname, "refs/"))
 		refname = refname + 5;
 	return refname;
 }
@@ -149,7 +149,7 @@ static int name_ref(const char *path, const unsigned char *sha1, int flags, void
 	int can_abbreviate_output = data->tags_only && data->name_only;
 	int deref = 0;
 
-	if (data->tags_only && prefixcmp(path, "refs/tags/"))
+	if (data->tags_only && !has_prefix(path, "refs/tags/"))
 		return 0;
 
 	if (data->ref_filter) {
-- 
1.8.4.1.566.geca833c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help