]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/maint-add-empty' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 26 May 2009 02:01:41 +0000 (19:01 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 26 May 2009 02:01:41 +0000 (19:01 -0700)
* jk/maint-add-empty:
  add: don't complain when adding empty project root

builtin-add.c

index cb67d2c17e4017e8deede61b30c0eb7c8c60ac1e..ad889aac5bd174bf96a87b78eeb243aea89a1626 100644 (file)
@@ -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]);
        }