Skip to content

Commit 43f8f56

Browse files
committed
Merge branch 'jk/maint-add-empty' into maint
* jk/maint-add-empty: add: don't complain when adding empty project root
2 parents 0e5168f + 07d7bed commit 43f8f56

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
@@ -61,7 +61,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
6161
fill_pathspec_matches(pathspec, seen, specs);
6262

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

0 commit comments

Comments
 (0)