Merge branch 'sk/send-pack-all-fix'
authorJunio C Hamano <gitster@pobox.com>
Wed, 13 Apr 2016 21:12:33 +0000 (14:12 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Apr 2016 21:12:33 +0000 (14:12 -0700)
"git send-pack --all <there>" was broken when its command line
option parsing was written in the 2.6 timeframe.

* sk/send-pack-all-fix:
  git-send-pack: fix --all option when used with directory

1  2 
builtin/send-pack.c

diff --combined builtin/send-pack.c
@@@ -212,7 -212,7 +212,7 @@@ int cmd_send_pack(int argc, const char 
                                argv_array_push(&all_refspecs, buf);
                } else {
                        struct strbuf line = STRBUF_INIT;
 -                      while (strbuf_getline(&line, stdin, '\n') != EOF)
 +                      while (strbuf_getline(&line, stdin) != EOF)
                                argv_array_push(&all_refspecs, line.buf);
                        strbuf_release(&line);
                }
         * --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);