Skip to content

Commit 27dca07

Browse files
Uwe Kleine-KönigJunio C Hamano
authored andcommitted
rename --exec to --upload-pack for fetch-pack and peek-remote
Just some option name disambiguation. This is the counter part to commit d23842f 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>
1 parent 497171e commit 27dca07

File tree

4 files changed

+26
-12
lines changed

4 files changed

+26
-12
lines changed

Documentation/git-fetch-pack.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git-fetch-pack - Receive missing objects from another repository
88

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

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

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

60+
\--exec=<git-upload-pack>::
61+
Same as \--upload-pack=<git-upload-pack>.
62+
6063
\--depth=<n>::
6164
Limit fetching to ancestor-chains not longer than n.
6265

Documentation/git-peek-remote.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git-peek-remote - List the references in a remote repository
88

99
SYNOPSIS
1010
--------
11-
'git-peek-remote' [--exec=<git-upload-pack>] [<host>:]<directory>
11+
'git-peek-remote' [--upload-pack=<git-upload-pack>] [<host>:]<directory>
1212

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

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

32+
\--exec=<git-upload-pack>::
33+
Same \--upload-pack=<git-upload-pack>.
34+
3235
<host>::
3336
A remote host that houses the repository. When this
3437
part is specified, 'git-upload-pack' is invoked via

fetch-pack.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ static int verbose;
1212
static int fetch_all;
1313
static int depth;
1414
static const char fetch_pack_usage[] =
15-
"git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--exec=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]";
16-
static const char *exec = "git-upload-pack";
15+
"git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--upload-pack=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]";
16+
static const char *uploadpack = "git-upload-pack";
1717

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

645645
if (*arg == '-') {
646+
if (!strncmp("--upload-pack=", arg, 14)) {
647+
uploadpack = arg + 14;
648+
continue;
649+
}
646650
if (!strncmp("--exec=", arg, 7)) {
647-
exec = arg + 7;
651+
uploadpack = arg + 7;
648652
continue;
649653
}
650654
if (!strcmp("--quiet", arg) || !strcmp("-q", arg)) {
@@ -682,7 +686,7 @@ int main(int argc, char **argv)
682686
}
683687
if (!dest)
684688
usage(fetch_pack_usage);
685-
pid = git_connect(fd, dest, exec);
689+
pid = git_connect(fd, dest, uploadpack);
686690
if (pid < 0)
687691
return 1;
688692
if (heads && nr_heads)

peek-remote.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#include "pkt-line.h"
44

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

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

3737
if (*arg == '-') {
38+
if (!strncmp("--upload-pack=", arg, 14)) {
39+
uploadpack = arg + 14;
40+
continue;
41+
}
3842
if (!strncmp("--exec=", arg, 7)) {
39-
exec = arg + 7;
43+
uploadpack = arg + 7;
4044
continue;
4145
}
4246
if (!strcmp("--tags", arg)) {
@@ -60,7 +64,7 @@ int main(int argc, char **argv)
6064
if (!dest || i != argc - 1)
6165
usage(peek_remote_usage);
6266

63-
pid = git_connect(fd, dest, exec);
67+
pid = git_connect(fd, dest, uploadpack);
6468
if (pid < 0)
6569
return 1;
6670
ret = peek_remote(fd, flags);

0 commit comments

Comments
 (0)