Module Name:    src
Committed By:   rillig
Date:           Sun Oct 25 09:03:05 UTC 2020

Modified Files:
        src/usr.bin/make: dir.c

Log Message:
make(1): document pattern matching edge case in DirMatchFiles


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/usr.bin/make/dir.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/dir.c
diff -u src/usr.bin/make/dir.c:1.181 src/usr.bin/make/dir.c:1.182
--- src/usr.bin/make/dir.c:1.181	Sun Oct 25 08:59:26 2020
+++ src/usr.bin/make/dir.c	Sun Oct 25 09:03:05 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.181 2020/10/25 08:59:26 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.182 2020/10/25 09:03:05 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -135,7 +135,7 @@
 #include "job.h"
 
 /*	"@(#)dir.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: dir.c,v 1.181 2020/10/25 08:59:26 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.182 2020/10/25 09:03:05 rillig Exp $");
 
 #define DIR_DEBUG0(text) DEBUG0(DIR, text)
 #define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -608,7 +608,8 @@ DirMatchFiles(const char *pattern, Cache
 	 * pattern begins with a dot. The pattern '.*' does not match '.' or
 	 * '..' since these are not included in the directory cache.
 	 *
-	 * XXX: This means that the pattern '[a-z.]*' does not find '.file'.
+	 * This means that the pattern '[a-z.]*' does not find '.file', which
+	 * is consistent with bash, NetBSD sh and csh.
 	 */
 	if (base[0] == '.' && pattern[0] != '.')
 	    continue;

Reply via email to