summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 060aafc)
raw | patch | inline | side by side (parent: 060aafc)
author | Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> | |
Fri, 19 Jan 2007 12:49:27 +0000 (13:49 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 20 Jan 2007 01:54:33 +0000 (17:54 -0800) |
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>
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>
Documentation/git-push.txt | patch | blob | history | |
Documentation/git-send-pack.txt | patch | blob | history | |
builtin-push.c | patch | blob | history | |
send-pack.c | patch | blob | history |
index 7a2e503a4e6739568b684d64be380819fde4ed02..f8cc2b5432b448dcf3686ecee68cba796064bbe4 100644 (file)
SYNOPSIS
--------
-'git-push' [--all] [--tags] [--exec=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]
+'git-push' [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]
DESCRIPTION
-----------
addition to refspecs explicitly listed on the command
line.
-\--exec::
+\--receive-pack=<git-receive-pack>::
Path to the 'git-receive-pack' program on the remote
end. Sometimes useful when pushing to a remote
repository over ssh, and you do not have the program in
a directory on the default $PATH.
+\--exec=<git-receive-pack>::
+ Same as \--receive-pack=<git-receive-pack>.
+
-f, \--force::
Usually, the command refuses to update a remote ref that is
not a descendant of the local ref used to overwrite it.
index dee43a997c3fbb36890e67d80681248652476899..2f6267ce6048a217feb1ee9b92910697c0a8ed33 100644 (file)
SYNOPSIS
--------
-'git-send-pack' [--all] [--force] [--exec=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]
+'git-send-pack' [--all] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]
DESCRIPTION
-----------
OPTIONS
-------
-\--exec=<git-receive-pack>::
+\--receive-pack=<git-receive-pack>::
Path to the 'git-receive-pack' program on the remote
end. Sometimes useful when pushing to a remote
repository over ssh, and you do not have the program in
a directory on the default $PATH.
+\--exec=<git-receive-pack>::
+ Same as \--receive-pack=<git-receive-pack>.
+
\--all::
Instead of explicitly specifying which refs to update,
update all refs that locally exist.
diff --git a/builtin-push.c b/builtin-push.c
index 6b3c03b8a6b8bb4c33acf6260a6d086da74b1002..5f4d7d34d35da35f0c843962f1ca1ae61a575456 100644 (file)
--- a/builtin-push.c
+++ b/builtin-push.c
#define MAX_URI (16)
-static const char push_usage[] = "git-push [--all] [--tags] [--exec=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]";
+static const char push_usage[] = "git-push [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]";
static int all, tags, force, thin = 1, verbose;
-static const char *execute;
+static const char *receivepack;
#define BUF_SIZE (2084)
static char buffer[BUF_SIZE];
add_refspec(xstrdup(value));
else if (config_get_receivepack &&
!strcmp(key + 7 + config_repo_len, ".receivepack")) {
- if (!execute) {
- char *ex = xmalloc(strlen(value) + 8);
- sprintf(ex, "--exec=%s", value);
- execute = ex;
+ if (!receivepack) {
+ char *rp = xmalloc(strlen(value) + 16);
+ sprintf(rp, "--receive-pack=%s", value);
+ receivepack = rp;
} else
error("more than one receivepack given, using the first");
}
config_current_uri = 0;
config_uri = uri;
config_get_refspecs = !(refspec_nr || all || tags);
- config_get_receivepack = (execute == NULL);
+ config_get_receivepack = (receivepack == NULL);
git_config(get_remote_config);
return config_current_uri;
argv[argc++] = "--all";
if (force)
argv[argc++] = "--force";
- if (execute)
- argv[argc++] = execute;
+ if (receivepack)
+ argv[argc++] = receivepack;
common_argc = argc;
for (i = 0; i < n; i++) {
thin = 0;
continue;
}
+ if (!strncmp(arg, "--receive-pack=", 15)) {
+ receivepack = arg;
+ continue;
+ }
if (!strncmp(arg, "--exec=", 7)) {
- execute = arg;
+ receivepack = arg;
continue;
}
usage(push_usage);
diff --git a/send-pack.c b/send-pack.c
index ec2c1089b289fc93159523d6f81c78c3c6f2be65..cd478dd82fdc08094873112b40cbf302623ecc21 100644 (file)
--- a/send-pack.c
+++ b/send-pack.c
#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;
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")) {
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);