Skip to content

Commit f2a5617

Browse files
committed
Merge branch 'jk/maint-add-empty'
* jk/maint-add-empty: add: don't complain when adding empty project root
2 parents 362724a + 07d7bed commit f2a5617

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin-add.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
6363
fill_pathspec_matches(pathspec, seen, specs);
6464

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

0 commit comments

Comments
 (0)