Merge branch 'lt/dirwalk' into next
authorJunio C Hamano <junkio@cox.net>
Thu, 18 May 2006 08:47:13 +0000 (01:47 -0700)
committerJunio C Hamano <junkio@cox.net>
Thu, 18 May 2006 08:47:13 +0000 (01:47 -0700)
* lt/dirwalk:
builtin-add: fix unmatched pathspec warnings.

builtin-add.c
index 7083820f7b2745708e40f624935a0ad231351e24..2afb82d6c1d745694f8457415e13f4f67b86ca19 100644 (file)
@@ -124,7 +124,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
 
                /* Existing file? We must have ignored it */
                match = pathspec[i];
-               if (!lstat(match, &st))
+               if (!match[0] || !lstat(match, &st))
                        continue;
                die("pathspec '%s' did not match any files", match);
        }