@matheusbsbs / matheus-bagliano / commits / 27dca07fb7
Fork 0

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>

Uwe Kleine-König committed Jan 23, 2007 at 09:20 UTC 27dca07fb77f6f5851e3a8de54f86c803358caa4
4 files changed +26 -12
Documentation/git-fetch-pack.txt
+5 -2
@@ -8,7 +8,7 @@ git-fetch-pack - Receive missing objects from another repository
8
9 SYNOPSIS
10 --------
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>...]
12
13 DESCRIPTION
14 -----------
@@ -45,7 +45,7 @@ OPTIONS
45 Spend extra cycles to minimize the number of objects to be sent.
46 Use it on slower connection.
47
48 -\--exec=<git-upload-pack>::
48 +\--upload-pack=<git-upload-pack>::
49 Use this to specify the path to 'git-upload-pack' on the
50 remote side, if is not found on your $PATH.
51 Installations of sshd ignores the user's environment
@@ -57,6 +57,9 @@ OPTIONS
57 shells by having a lean .bashrc file (they set most of
58 the things up in .bash_profile).
59
60 +\--exec=<git-upload-pack>::
61 + Same as \--upload-pack=<git-upload-pack>.
62 +
63 \--depth=<n>::
64 Limit fetching to ancestor-chains not longer than n.
65
Documentation/git-peek-remote.txt
+5 -2
@@ -8,7 +8,7 @@ git-peek-remote - List the references in a remote repository
8
9 SYNOPSIS
10 --------
11 -'git-peek-remote' [--exec=<git-upload-pack>] [<host>:]<directory>
11 +'git-peek-remote' [--upload-pack=<git-upload-pack>] [<host>:]<directory>
12
13 DESCRIPTION
14 -----------
@@ -17,7 +17,7 @@ stores them in the local repository under the same name.
17
18 OPTIONS
19 -------
20 ---exec=<git-upload-pack>::
20 +\--upload-pack=<git-upload-pack>::
21 Use this to specify the path to 'git-upload-pack' on the
22 remote side, if it is not found on your $PATH. Some
23 installations of sshd ignores the user's environment
@@ -29,6 +29,9 @@ OPTIONS
29 shells, but prefer having a lean .bashrc file (they set most of
30 the things up in .bash_profile).
31
32 +\--exec=<git-upload-pack>::
33 + Same \--upload-pack=<git-upload-pack>.
34 +
35 <host>::
36 A remote host that houses the repository. When this
37 part is specified, 'git-upload-pack' is invoked via
fetch-pack.c
+8 -4
@@ -12,8 +12,8 @@ static int verbose;
12 static int fetch_all;
13 static int depth;
14 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";
17
18 #define COMPLETE (1U << 0)
19 #define COMMON (1U << 1)
@@ -643,8 +643,12 @@ int main(int argc, char **argv)
643 char *arg = argv[i];
644
645 if (*arg == '-') {
646 + if (!strncmp("--upload-pack=", arg, 14)) {
647 + uploadpack = arg + 14;
648 + continue;
649 + }
650 if (!strncmp("--exec=", arg, 7)) {
647 - exec = arg + 7;
651 + uploadpack = arg + 7;
652 continue;
653 }
654 if (!strcmp("--quiet", arg) || !strcmp("-q", arg)) {
@@ -682,7 +686,7 @@ int main(int argc, char **argv)
686 }
687 if (!dest)
688 usage(fetch_pack_usage);
685 - pid = git_connect(fd, dest, exec);
689 + pid = git_connect(fd, dest, uploadpack);
690 if (pid < 0)
691 return 1;
692 if (heads && nr_heads)
peek-remote.c
+8 -4
@@ -3,8 +3,8 @@
3 #include "pkt-line.h"
4
5 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";
8
9 static int peek_remote(int fd[2], unsigned flags)
10 {
@@ -35,8 +35,12 @@ int main(int argc, char **argv)
35 char *arg = argv[i];
36
37 if (*arg == '-') {
38 + if (!strncmp("--upload-pack=", arg, 14)) {
39 + uploadpack = arg + 14;
40 + continue;
41 + }
42 if (!strncmp("--exec=", arg, 7)) {
39 - exec = arg + 7;
43 + uploadpack = arg + 7;
44 continue;
45 }
46 if (!strcmp("--tags", arg)) {
@@ -60,7 +64,7 @@ int main(int argc, char **argv)
64 if (!dest || i != argc - 1)
65 usage(peek_remote_usage);
66
63 - pid = git_connect(fd, dest, exec);
67 + pid = git_connect(fd, dest, uploadpack);
68 if (pid < 0)
69 return 1;
70 ret = peek_remote(fd, flags);