aboutsummaryrefslogtreecommitdiff
path: root/peek-remote.c
diff options
context:
space:
mode:
authorUwe Kleine-König <ukleinek@informatik.uni-freiburg.de>2007-01-23 09:20:17 +0100
committerJunio C Hamano <junkio@cox.net>2007-01-24 16:12:15 -0800
commit27dca07fb77f6f5851e3a8de54f86c803358caa4 (patch)
treeb278026c048e04a4a5f179de1b6444962b5020be /peek-remote.c
parent497171e765b7b4f903d21379bee050380e539cf3 (diff)
downloadgit-27dca07fb77f6f5851e3a8de54f86c803358caa4.tar.gz
git-27dca07fb77f6f5851e3a8de54f86c803358caa4.tar.xz
rename --exec to --upload-pack for fetch-pack and peek-remote
Just some option name disambiguation. This is the counter part to commit d23842fd which made a similar change for push and send-pack. --exec continues to work. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'peek-remote.c')
-rw-r--r--peek-remote.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/peek-remote.c b/peek-remote.c
index 353da002b..ef3c76ce5 100644
--- a/peek-remote.c
+++ b/peek-remote.c
@@ -3,8 +3,8 @@
#include "pkt-line.h"
static const char peek_remote_usage[] =
-"git-peek-remote [--exec=upload-pack] [host:]directory";
-static const char *exec = "git-upload-pack";
+"git-peek-remote [--upload-pack=<git-upload-pack>] [<host>:]<directory>";
+static const char *uploadpack = "git-upload-pack";
static int peek_remote(int fd[2], unsigned flags)
{
@@ -35,8 +35,12 @@ int main(int argc, char **argv)
char *arg = argv[i];
if (*arg == '-') {
+ if (!strncmp("--upload-pack=", arg, 14)) {
+ uploadpack = arg + 14;
+ continue;
+ }
if (!strncmp("--exec=", arg, 7)) {
- exec = arg + 7;
+ uploadpack = arg + 7;
continue;
}
if (!strcmp("--tags", arg)) {
@@ -60,7 +64,7 @@ int main(int argc, char **argv)
if (!dest || i != argc - 1)
usage(peek_remote_usage);
- pid = git_connect(fd, dest, exec);
+ pid = git_connect(fd, dest, uploadpack);
if (pid < 0)
return 1;
ret = peek_remote(fd, flags);