summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 72d7121)
raw | patch | inline | side by side (parent: 72d7121)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 2 Aug 2005 19:20:27 +0000 (12:20 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 3 Aug 2005 05:51:07 +0000 (22:51 -0700) |
send-pack had a confusing misfeature that "send-pack --all
master" updated all refs, while "send-pack --all" did not do
anything. Make --all and explicit refs mutually exclusive, and
make sure "send-pack --all" updates all refs.
Signed-off-by: Junio C Hamano <junkio@cox.net>
master" updated all refs, while "send-pack --all" did not do
anything. Make --all and explicit refs mutually exclusive, and
make sure "send-pack --all" updates all refs.
Signed-off-by: Junio C Hamano <junkio@cox.net>
send-pack.c | patch | blob | history |
diff --git a/send-pack.c b/send-pack.c
index 9b4be6130cad815384a3116be82af1264b9e286f..5a3aff6822c424b814ed6ec3e6daa02f82581720 100644 (file)
--- a/send-pack.c
+++ b/send-pack.c
#include "pkt-line.h"
static const char send_pack_usage[] =
-"git-send-pack [--exec=git-receive-pack] [host:]directory [heads]*";
+"git-send-pack [--all] [--exec=git-receive-pack] <remote> [<head>...]\n"
+" --all and explicit <head> specification are mutually exclusive.";
static const char *exec = "git-receive-pack";
static int send_all = 0;
static int force_update = 0;
/*
* See if we have any refs that the other end didn't have
*/
- if (nr_match) {
+ if (nr_match || send_all) {
local_ref_nr_match = nr_match;
local_ref_match = match;
local_ref_list = ref_list;
}
if (!dest)
usage(send_pack_usage);
+ if (heads && send_all)
+ usage(send_pack_usage);
pid = git_connect(fd, dest, exec);
if (pid < 0)
return 1;