about summary refs log tree commit diff
path: root/ui-refs.c
diff options
context:
space:
mode:
authorLukas Fleischer <cgit@cryptocrack.de>2014-01-10 12:44:35 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2014-01-10 17:01:29 +0100
commit36bdb2171f7154fcdf1a24d38c8ce3bd7e448cb1 (patch)
tree06a5bc8163bde09074e18ad5e66deb35ebb136c6 /ui-refs.c
parentREADME: Fix dependencies (diff)
downloadcgit-pink-36bdb2171f7154fcdf1a24d38c8ce3bd7e448cb1.tar.gz
cgit-pink-36bdb2171f7154fcdf1a24d38c8ce3bd7e448cb1.zip
Replace most uses of strncmp() with prefixcmp()
This is a preparation for replacing all prefix checks with either
strip_prefix() or starts_with() when Git 1.8.6 is released.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
Diffstat (limited to '')
-rw-r--r--ui-refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-refs.c b/ui-refs.c
index 7af6fed..20c91e3 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -240,9 +240,9 @@ void cgit_print_refs()
 
 	html("<table class='list nowrap'>");
 
-	if (ctx.qry.path && !strncmp(ctx.qry.path, "heads", 5))
+	if (ctx.qry.path && !prefixcmp(ctx.qry.path, "heads"))
 		cgit_print_branches(0);
-	else if (ctx.qry.path && !strncmp(ctx.qry.path, "tags", 4))
+	else if (ctx.qry.path && !prefixcmp(ctx.qry.path, "tags"))
 		cgit_print_tags(0);
 	else {
 		cgit_print_branches(0);
in/htagml.c?id=f3803a1ec5ca6f3ce0814324f05280532c81785d&follow=1'>Avoid matching tag text inside HTML elementsJune McEnroe 2021-01-12Use hilex for up -hJune McEnroe 2021-01-12Use hilex for bin HTMLJune McEnroe 2021-01-12Don't output a pre in hilex by defaultJune McEnroe 2021-01-12Move hilex out of hilex directoryJune McEnroe 2021-01-12Consolidate hilex formatters into hilex.cJune McEnroe 2021-01-12Remove hacky tagging from hilexJune McEnroe 2021-01-12Add htagml -iJune McEnroe 2021-01-12Render tag index in HTMLJune McEnroe 2021-01-12Add htagml -xJune McEnroe 2021-01-12Prevent matching the same tag twiceJune McEnroe 2021-01-12Process htagml file line by lineJune McEnroe 2021-01-12Split fields by tab onlyJune McEnroe 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe 2021-01-09Add c -t flag to print expression typeJune McEnroe 2021-01-05Update taglineJune McEnroe