Add corner case tests for diff-index and diff-files
[gitweb.git] / builtin-add.c
index 820110e085f20d8615c74167cf3ae4cfd1fe6912..4a91e3eb118850882fbc22e8d8f37e8bbfaa7617 100644 (file)
@@ -228,18 +228,6 @@ int cmd_add(int argc, const char **argv, const char *prefix)
                goto finish;
        }
 
-       if (*argv) {
-               /* Was there an invalid path? */
-               if (pathspec) {
-                       int num;
-                       for (num = 0; pathspec[num]; num++)
-                               ; /* just counting */
-                       if (argc != num)
-                               exit(1); /* error message already given */
-               } else
-                       exit(1); /* error message already given */
-       }
-
        fill_directory(&dir, pathspec, ignored_too);
 
        if (show_only) {