File tree Expand file tree Collapse file tree 4 files changed +26
-12
lines changed
Expand file tree Collapse file tree 4 files changed +26
-12
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ git-fetch-pack - Receive missing objects from another repository
88
99SYNOPSIS
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
1313DESCRIPTION
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
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ git-peek-remote - List the references in a remote repository
88
99SYNOPSIS
1010--------
11- 'git-peek-remote' [--exec =<git-upload-pack>] [<host>:]<directory>
11+ 'git-peek-remote' [--upload-pack =<git-upload-pack>] [<host>:]<directory>
1212
1313DESCRIPTION
1414-----------
@@ -17,7 +17,7 @@ stores them in the local repository under the same name.
1717
1818OPTIONS
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
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ static int verbose;
1212static int fetch_all ;
1313static int depth ;
1414static 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 )
Original file line number Diff line number Diff line change 33#include "pkt-line.h"
44
55static 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
99static 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 );
You can’t perform that action at this time.
0 commit comments