dir.c: rename path_excluded() to is_path_excluded()

Start adopting clearer names for exclude functions. This 'is_*' naming pattern for functions returning booleans was agreed here: http://thread.gmane.org/gmane.comp.version-control.git/204661/focus=204924 Signed-off-by: Adam Spiers <git@adamspiers.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Adam Spiers committed Dec 27, 2012 at 02:32 UTC 9013089c4a841bf17bcc8e2510a86ceecac29ffd
5 files changed +6 -6
builtin/add.c
+1 -1
@@ -453,7 +453,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
453 && !file_exists(pathspec[i])) {
454 if (ignore_missing) {
455 int dtype = DT_UNKNOWN;
456 - if (path_excluded(&check, pathspec[i], -1, &dtype))
456 + if (is_path_excluded(&check, pathspec[i], -1, &dtype))
457 dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));
458 } else
459 die(_("pathspec '%s' did not match any files"),
builtin/ls-files.c
+1 -1
@@ -203,7 +203,7 @@ static void show_ru_info(void)
203 static int ce_excluded(struct path_exclude_check *check, struct cache_entry *ce)
204 {
205 int dtype = ce_to_dtype(ce);
206 - return path_excluded(check, ce->name, ce_namelen(ce), &dtype);
206 + return is_path_excluded(check, ce->name, ce_namelen(ce), &dtype);
207 }
208
209 static void show_files(struct dir_struct *dir)
dir.c
+2 -2
@@ -685,8 +685,8 @@ void path_exclude_check_clear(struct path_exclude_check *check)
685 * A path to a directory known to be excluded is left in check->path to
686 * optimize for repeated checks for files in the same excluded directory.
687 */
688 -int path_excluded(struct path_exclude_check *check,
689 - const char *name, int namelen, int *dtype)
688 +int is_path_excluded(struct path_exclude_check *check,
689 + const char *name, int namelen, int *dtype)
690 {
691 int i;
692 struct strbuf *path = &check->path;
dir.h
+1 -1
@@ -123,7 +123,7 @@ struct path_exclude_check {
123 };
124 extern void path_exclude_check_init(struct path_exclude_check *, struct dir_struct *);
125 extern void path_exclude_check_clear(struct path_exclude_check *);
126 -extern int path_excluded(struct path_exclude_check *, const char *, int namelen, int *dtype);
126 +extern int is_path_excluded(struct path_exclude_check *, const char *, int namelen, int *dtype);
127
128
129 extern int add_excludes_from_file_to_list(const char *fname, const char *base, int baselen,
unpack-trees.c
+1 -1
@@ -1372,7 +1372,7 @@ static int check_ok_to_remove(const char *name, int len, int dtype,
1372 return 0;
1373
1374 if (o->dir &&
1375 - path_excluded(o->path_exclude_check, name, -1, &dtype))
1375 + is_path_excluded(o->path_exclude_check, name, -1, &dtype))
1376 /*
1377 * ce->name is explicitly excluded, so it is Ok to
1378 * overwrite it.