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>
maint
Uwe Kleine-König 2007-01-23 09:20:17 +01:00 committed by Junio C Hamano
parent 497171e765
commit 27dca07fb7
4 changed files with 26 additions and 12 deletions

View File

@ -8,7 +8,7 @@ git-fetch-pack - Receive missing objects from another repository


SYNOPSIS SYNOPSIS
-------- --------
'git-fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--exec=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...] 'git-fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--upload-pack=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]


DESCRIPTION DESCRIPTION
----------- -----------
@ -45,7 +45,7 @@ OPTIONS
Spend extra cycles to minimize the number of objects to be sent. Spend extra cycles to minimize the number of objects to be sent.
Use it on slower connection. Use it on slower connection.


\--exec=<git-upload-pack>:: \--upload-pack=<git-upload-pack>::
Use this to specify the path to 'git-upload-pack' on the Use this to specify the path to 'git-upload-pack' on the
remote side, if is not found on your $PATH. remote side, if is not found on your $PATH.
Installations of sshd ignores the user's environment Installations of sshd ignores the user's environment
@ -57,6 +57,9 @@ OPTIONS
shells by having a lean .bashrc file (they set most of shells by having a lean .bashrc file (they set most of
the things up in .bash_profile). the things up in .bash_profile).


\--exec=<git-upload-pack>::
Same as \--upload-pack=<git-upload-pack>.

\--depth=<n>:: \--depth=<n>::
Limit fetching to ancestor-chains not longer than n. Limit fetching to ancestor-chains not longer than n.



View File

@ -8,7 +8,7 @@ git-peek-remote - List the references in a remote repository


SYNOPSIS SYNOPSIS
-------- --------
'git-peek-remote' [--exec=<git-upload-pack>] [<host>:]<directory> 'git-peek-remote' [--upload-pack=<git-upload-pack>] [<host>:]<directory>


DESCRIPTION DESCRIPTION
----------- -----------
@ -17,7 +17,7 @@ stores them in the local repository under the same name.


OPTIONS OPTIONS
------- -------
--exec=<git-upload-pack>:: \--upload-pack=<git-upload-pack>::
Use this to specify the path to 'git-upload-pack' on the Use this to specify the path to 'git-upload-pack' on the
remote side, if it is not found on your $PATH. Some remote side, if it is not found on your $PATH. Some
installations of sshd ignores the user's environment installations of sshd ignores the user's environment
@ -29,6 +29,9 @@ OPTIONS
shells, but prefer having a lean .bashrc file (they set most of shells, but prefer having a lean .bashrc file (they set most of
the things up in .bash_profile). the things up in .bash_profile).


\--exec=<git-upload-pack>::
Same \--upload-pack=<git-upload-pack>.

<host>:: <host>::
A remote host that houses the repository. When this A remote host that houses the repository. When this
part is specified, 'git-upload-pack' is invoked via part is specified, 'git-upload-pack' is invoked via

View File

@ -12,8 +12,8 @@ static int verbose;
static int fetch_all; static int fetch_all;
static int depth; static int depth;
static const char fetch_pack_usage[] = static const char fetch_pack_usage[] =
"git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--exec=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]"; "git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--upload-pack=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]";
static const char *exec = "git-upload-pack"; static const char *uploadpack = "git-upload-pack";


#define COMPLETE (1U << 0) #define COMPLETE (1U << 0)
#define COMMON (1U << 1) #define COMMON (1U << 1)
@ -643,8 +643,12 @@ int main(int argc, char **argv)
char *arg = argv[i]; char *arg = argv[i];


if (*arg == '-') { if (*arg == '-') {
if (!strncmp("--upload-pack=", arg, 14)) {
uploadpack = arg + 14;
continue;
}
if (!strncmp("--exec=", arg, 7)) { if (!strncmp("--exec=", arg, 7)) {
exec = arg + 7; uploadpack = arg + 7;
continue; continue;
} }
if (!strcmp("--quiet", arg) || !strcmp("-q", arg)) { if (!strcmp("--quiet", arg) || !strcmp("-q", arg)) {
@ -682,7 +686,7 @@ int main(int argc, char **argv)
} }
if (!dest) if (!dest)
usage(fetch_pack_usage); usage(fetch_pack_usage);
pid = git_connect(fd, dest, exec); pid = git_connect(fd, dest, uploadpack);
if (pid < 0) if (pid < 0)
return 1; return 1;
if (heads && nr_heads) if (heads && nr_heads)

View File

@ -3,8 +3,8 @@
#include "pkt-line.h" #include "pkt-line.h"


static const char peek_remote_usage[] = static const char peek_remote_usage[] =
"git-peek-remote [--exec=upload-pack] [host:]directory"; "git-peek-remote [--upload-pack=<git-upload-pack>] [<host>:]<directory>";
static const char *exec = "git-upload-pack"; static const char *uploadpack = "git-upload-pack";


static int peek_remote(int fd[2], unsigned flags) static int peek_remote(int fd[2], unsigned flags)
{ {
@ -35,8 +35,12 @@ int main(int argc, char **argv)
char *arg = argv[i]; char *arg = argv[i];


if (*arg == '-') { if (*arg == '-') {
if (!strncmp("--upload-pack=", arg, 14)) {
uploadpack = arg + 14;
continue;
}
if (!strncmp("--exec=", arg, 7)) { if (!strncmp("--exec=", arg, 7)) {
exec = arg + 7; uploadpack = arg + 7;
continue; continue;
} }
if (!strcmp("--tags", arg)) { if (!strcmp("--tags", arg)) {
@ -60,7 +64,7 @@ int main(int argc, char **argv)
if (!dest || i != argc - 1) if (!dest || i != argc - 1)
usage(peek_remote_usage); usage(peek_remote_usage);


pid = git_connect(fd, dest, exec); pid = git_connect(fd, dest, uploadpack);
if (pid < 0) if (pid < 0)
return 1; return 1;
ret = peek_remote(fd, flags); ret = peek_remote(fd, flags);