aboutsummaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
authorUwe Kleine-König <zeisberg@informatik.uni-freiburg.de>2007-01-19 13:49:27 +0100
committerJunio C Hamano <junkio@cox.net>2007-01-19 17:54:33 -0800
commitd23842fd53e61f32c189a6ec902c4133abf29878 (patch)
treecf57bc1f05193eed274fd714013b779cb1a897e1 /send-pack.c
parent060aafc11fb6140f1b33326f03e70dad5762a624 (diff)
downloadgit-d23842fd53e61f32c189a6ec902c4133abf29878.tar.gz
git-d23842fd53e61f32c189a6ec902c4133abf29878.tar.xz
rename --exec to --receive-pack for push and send-pack
For now it's just to get a more descriptive name. Later we might update the push protocol to run more than one program on the other end. Moreover this matches better the corresponding config option remote.<name>. receivepack. --exec continues to work Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/send-pack.c b/send-pack.c
index ec2c1089b..cd478dd82 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -6,9 +6,9 @@
#include "exec_cmd.h"
static const char send_pack_usage[] =
-"git-send-pack [--all] [--force] [--exec=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n"
+"git-send-pack [--all] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n"
" --all and explicit <ref> specification are mutually exclusive.";
-static const char *exec = "git-receive-pack";
+static const char *receivepack = "git-receive-pack";
static int verbose;
static int send_all;
static int force_update;
@@ -377,8 +377,12 @@ int main(int argc, char **argv)
char *arg = *argv;
if (*arg == '-') {
+ if (!strncmp(arg, "--receive-pack=", 15)) {
+ receivepack = arg + 15;
+ continue;
+ }
if (!strncmp(arg, "--exec=", 7)) {
- exec = arg + 7;
+ receivepack = arg + 7;
continue;
}
if (!strcmp(arg, "--all")) {
@@ -413,7 +417,7 @@ int main(int argc, char **argv)
usage(send_pack_usage);
verify_remote_names(nr_heads, heads);
- pid = git_connect(fd, dest, exec);
+ pid = git_connect(fd, dest, receivepack);
if (pid < 0)
return 1;
ret = send_pack(fd[0], fd[1], nr_heads, heads);