git-send-pack: fix --all option when used with directory
[gitweb.git] / builtin / send-pack.c
index f6e5d643c193d28b14107bf9a9e4ee7aa36ca933..19f0577fa0af2e9e7b43fa074dba14694d0c125f 100644 (file)
@@ -225,7 +225,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
         * --all and --mirror are incompatible; neither makes sense
         * with any refspecs.
         */
-       if ((refspecs && (send_all || args.send_mirror)) ||
+       if ((nr_refspecs > 0 && (send_all || args.send_mirror)) ||
            (send_all && args.send_mirror))
                usage_with_options(send_pack_usage, options);