From: Junio C Hamano Date: Thu, 18 May 2006 08:47:13 +0000 (-0700) Subject: Merge branch 'lt/dirwalk' into next X-Git-Tag: v1.4.1-rc1~86 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/fad60083853bcf46717b577257b4227a30b72679?hp=-c Merge branch 'lt/dirwalk' into next * lt/dirwalk: builtin-add: fix unmatched pathspec warnings. --- fad60083853bcf46717b577257b4227a30b72679 diff --combined builtin-add.c index 7083820f7b,37243f8c36..2afb82d6c1 --- a/builtin-add.c +++ b/builtin-add.c @@@ -8,7 -8,6 +8,7 @@@ #include "cache.h" #include "builtin.h" #include "dir.h" +#include "cache-tree.h" static const char builtin_add_usage[] = "git-add [-n] [-v] ..."; @@@ -124,7 -123,7 +124,7 @@@ static void prune_directory(struct dir_ /* 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); } @@@ -198,7 -197,6 +198,7 @@@ static int add_file_to_index(const cha die("unable to add %s to index",path); if (verbose) printf("add '%s'\n", path); + cache_tree_invalidate_path(active_cache_tree, path); return 0; }