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

[PATCH 71/86] builtin/prune: replace prefixcmd() with has_prefix()

flat view
STALE3767d

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

Signed-off-by: Christian Couder <redacted>
---
 builtin/prune.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/prune.c b/builtin/prune.c
index 6366917..59682ff 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -80,7 +80,7 @@ static int prune_dir(int i, char *path)
 			prune_object(path, de->d_name, sha1);
 			continue;
 		}
-		if (!prefixcmp(de->d_name, "tmp_obj_")) {
+		if (has_prefix(de->d_name, "tmp_obj_")) {
 			prune_tmp_object(path, de->d_name);
 			continue;
 		}
@@ -119,7 +119,7 @@ static void remove_temporary_files(const char *path)
 		return;
 	}
 	while ((de = readdir(dir)) != NULL)
-		if (!prefixcmp(de->d_name, "tmp_"))
+		if (has_prefix(de->d_name, "tmp_"))
 			prune_tmp_object(path, de->d_name);
 	closedir(dir);
 }
-- 
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