From: Junio C Hamano Date: Wed, 13 Apr 2016 21:12:33 +0000 (-0700) Subject: Merge branch 'sk/send-pack-all-fix' X-Git-Tag: v2.9.0-rc0~129 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5250af49f03b5f2da96770523f69d7584693b553?hp=-c Merge branch 'sk/send-pack-all-fix' "git send-pack --all " 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 --- 5250af49f03b5f2da96770523f69d7584693b553 diff --combined builtin/send-pack.c index 5b9dd6a9d8,19f0577fa0..1ff5a67538 --- a/builtin/send-pack.c +++ b/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); } @@@ -225,7 -225,7 +225,7 @@@ * --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);