Browse Source

Merge branch 'jk/maint-add-empty' into maint

* jk/maint-add-empty:
  add: don't complain when adding empty project root
maint
Junio C Hamano 16 years ago
parent
commit
43f8f560c0
  1. 2
      builtin-add.c

2
builtin-add.c

@ -61,7 +61,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p @@ -61,7 +61,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
fill_pathspec_matches(pathspec, seen, specs);

for (i = 0; i < specs; i++) {
if (!seen[i] && !file_exists(pathspec[i]))
if (!seen[i] && pathspec[i][0] && !file_exists(pathspec[i]))
die("pathspec '%s' did not match any files",
pathspec[i]);
}

Loading…
Cancel
Save