summaryrefslogtreecommitdiff
path: root/builtin-add.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-05-18 01:47:13 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-05-18 01:47:13 -0700
commitfad60083853bcf46717b577257b4227a30b72679 (patch)
tree77ab45b07fc95c72b57cb2db786f813bffc4394f /builtin-add.c
parentMerge branch 'master' into next (diff)
parentbuiltin-add: fix unmatched pathspec warnings. (diff)
downloadtgif-fad60083853bcf46717b577257b4227a30b72679.tar.xz
Merge branch 'lt/dirwalk' into next
* lt/dirwalk: builtin-add: fix unmatched pathspec warnings.
Diffstat (limited to 'builtin-add.c')
-rw-r--r--builtin-add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-add.c b/builtin-add.c
index 7083820f7b..2afb82d6c1 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -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);
}