[PATCH 10/24] cache.h: drop cache_name_is_other

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx>
---
 builtin/clean.c    | 2 +-
 builtin/ls-files.c | 2 +-
 cache.h            | 1 -
 dir.c              | 2 +-
 wt-status.c        | 4 ++--
 5 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/builtin/clean.c b/builtin/clean.c
index 9bdefca6dc..c6aacbb0f0 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -938,7 +938,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 		struct stat st;
 		const char *rel;
 
-		if (!cache_name_is_other(ent->name, ent->len))
+		if (!index_name_is_other(&the_index, ent->name, ent->len))
 			continue;
 
 		if (pathspec.nr)
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index edcad6e8e1..6f7ecec1b0 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -114,7 +114,7 @@ static void show_other_files(struct dir_struct *dir)
 
 	for (i = 0; i < dir->nr; i++) {
 		struct dir_entry *ent = dir->entries[i];
-		if (!cache_name_is_other(ent->name, ent->len))
+		if (!index_name_is_other(&the_index, ent->name, ent->len))
 			continue;
 		show_dir_entry(tag_other, ent);
 	}
diff --git a/cache.h b/cache.h
index abf1474034..5de8ab4e69 100644
--- a/cache.h
+++ b/cache.h
@@ -370,7 +370,6 @@ extern void free_name_hash(struct index_state *istate);
 #define ce_modified(ce, st, options) ie_modified(&the_index, (ce), (st), (options))
 #define cache_dir_exists(name, namelen) index_dir_exists(&the_index, (name), (namelen))
 #define cache_file_exists(name, namelen, igncase) index_file_exists(&the_index, (name), (namelen), (igncase))
-#define cache_name_is_other(name, namelen) index_name_is_other(&the_index, (name), (namelen))
 #endif
 
 enum object_type {
diff --git a/dir.c b/dir.c
index 8abad1b969..d5e1c462bb 100644
--- a/dir.c
+++ b/dir.c
@@ -1244,7 +1244,7 @@ static struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathna
 
 struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len)
 {
-	if (!cache_name_is_other(pathname, len))
+	if (!index_name_is_other(&the_index, pathname, len))
 		return NULL;
 
 	ALLOC_GROW(dir->ignored, dir->ignored_nr+1, dir->ignored_alloc);
diff --git a/wt-status.c b/wt-status.c
index 750ed28b49..ff0e70a25a 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -669,7 +669,7 @@ static void wt_status_collect_untracked(struct wt_status *s)
 
 	for (i = 0; i < dir.nr; i++) {
 		struct dir_entry *ent = dir.entries[i];
-		if (cache_name_is_other(ent->name, ent->len) &&
+		if (index_name_is_other(&the_index, ent->name, ent->len) &&
 		    dir_path_match(ent, &s->pathspec, 0, NULL))
 			string_list_insert(&s->untracked, ent->name);
 		free(ent);
@@ -677,7 +677,7 @@ static void wt_status_collect_untracked(struct wt_status *s)
 
 	for (i = 0; i < dir.ignored_nr; i++) {
 		struct dir_entry *ent = dir.ignored[i];
-		if (cache_name_is_other(ent->name, ent->len) &&
+		if (index_name_is_other(&the_index, ent->name, ent->len) &&
 		    dir_path_match(ent, &s->pathspec, 0, NULL))
 			string_list_insert(&s->ignored, ent->name);
 		free(ent);
-- 
2.13.0.rc1.39.ga6db8bfa24




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]