* [PATCH] Update documentation of fetch-pack, push and send-pack @ 2007-01-19 12:43 Uwe Kleine-König 2007-01-19 12:46 ` [PATCH] make --exec=... option to git-push configurable Uwe Kleine-König 2007-01-19 19:22 ` [PATCH] Update documentation of fetch-pack, " Junio C Hamano 0 siblings, 2 replies; 9+ messages in thread From: Uwe Kleine-König @ 2007-01-19 12:43 UTC (permalink / raw) To: git; +Cc: Shawn O. Pearce, Johannes Schindelin, Junio C Hamano add all supported options to Documentation/git-....txt and the usage strings. Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> --- This patch is included in this series to have the later patches only updating the documentation to follow the code changes. @Junio: If you take this (or one of the following) patch(es), could you please give me feedback on how my 'ö' got to you? Documentation/git-fetch-pack.txt | 21 +++++++++++++++++---- Documentation/git-push.txt | 2 +- Documentation/git-send-pack.txt | 15 +++++++++++---- builtin-push.c | 2 +- fetch-pack.c | 2 +- send-pack.c | 4 ++-- 6 files changed, 33 insertions(+), 13 deletions(-) diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt index 90ef127..bd8ebac 100644 --- a/Documentation/git-fetch-pack.txt +++ b/Documentation/git-fetch-pack.txt @@ -8,7 +8,7 @@ git-fetch-pack - Receive missing objects from another repository SYNOPSIS -------- -'git-fetch-pack' [-q] [-k] [--exec=<git-upload-pack>] [<host>:]<directory> [<refs>...] +'git-fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--exec=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...] DESCRIPTION ----------- @@ -28,17 +28,24 @@ have a common ancestor commit. OPTIONS ------- --q:: +\--all:: + Fetch all remote refs. + +\--quiet, \-q:: Pass '-q' flag to 'git-unpack-objects'; this makes the cloning process less verbose. --k:: +\--keep, \-k:: Do not invoke 'git-unpack-objects' on received data, but create a single packfile out of it instead, and store it in the object database. If provided twice then the pack is locked against repacking. ---exec=<git-upload-pack>:: +\--thin:: + Spend extra cycles to minimize the number of objects to be sent. + Use it on slower connection. + +\--exec=<git-upload-pack>:: Use this to specify the path to 'git-upload-pack' on the remote side, if is not found on your $PATH. Installations of sshd ignores the user's environment @@ -50,6 +57,12 @@ OPTIONS shells by having a lean .bashrc file (they set most of the things up in .bash_profile). +\--depth=<n>:: + Limit fetching to ancestor-chains not longer than n. + +\-v:: + Run verbosely. + <host>:: A remote host that houses the repository. When this part is specified, 'git-upload-pack' is invoked via diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 3e8dbcf..7a2e503 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -8,7 +8,7 @@ git-push - Update remote refs along with associated objects SYNOPSIS -------- -'git-push' [--all] [--tags] [--exec=<receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...] +'git-push' [--all] [--tags] [--exec=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...] DESCRIPTION ----------- diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt index eea8fe8..dee43a9 100644 --- a/Documentation/git-send-pack.txt +++ b/Documentation/git-send-pack.txt @@ -8,7 +8,7 @@ git-send-pack - Push objects over git protocol to another reposiotory SYNOPSIS -------- -'git-send-pack' [--all] [--force] [--exec=<git-receive-pack>] [<host>:]<directory> [<ref>...] +'git-send-pack' [--all] [--force] [--exec=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...] DESCRIPTION ----------- @@ -21,23 +21,30 @@ updates it from the current repository, sending named refs. OPTIONS ------- ---exec=<git-receive-pack>:: +\--exec=<git-receive-pack>:: Path to the 'git-receive-pack' program on the remote end. Sometimes useful when pushing to a remote repository over ssh, and you do not have the program in a directory on the default $PATH. ---all:: +\--all:: Instead of explicitly specifying which refs to update, update all refs that locally exist. ---force:: +\--force:: Usually, the command refuses to update a remote ref that is not an ancestor of the local ref used to overwrite it. This flag disables the check. What this means is that the remote repository can lose commits; use it with care. +\--verbose:: + Run verbosely. + +\--thin:: + Spend extra cycles to minimize the number of objects to be sent. + Use it on slower connection. + <host>:: A remote host to house the repository. When this part is specified, 'git-receive-pack' is invoked via diff --git a/builtin-push.c b/builtin-push.c index 7a3d2bb..ba7981f 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -8,7 +8,7 @@ #define MAX_URI (16) -static const char push_usage[] = "git-push [--all] [--tags] [-f | --force] <repository> [<refspec>...]"; +static const char push_usage[] = "git-push [--all] [--tags] [--exec=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]"; static int all, tags, force, thin = 1, verbose; static const char *execute; diff --git a/fetch-pack.c b/fetch-pack.c index 1530a94..726140a 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -12,7 +12,7 @@ static int verbose; static int fetch_all; static int depth; static const char fetch_pack_usage[] = -"git-fetch-pack [--all] [-q] [-v] [-k] [--thin] [--exec=upload-pack] [--depth=<n>] [host:]directory <refs>..."; +"git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--exec=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]"; static const char *exec = "git-upload-pack"; #define COMPLETE (1U << 0) diff --git a/send-pack.c b/send-pack.c index 6756264..ec2c108 100644 --- a/send-pack.c +++ b/send-pack.c @@ -6,8 +6,8 @@ #include "exec_cmd.h" static const char send_pack_usage[] = -"git-send-pack [--all] [--exec=git-receive-pack] <remote> [<head>...]\n" -" --all and explicit <head> specification are mutually exclusive."; +"git-send-pack [--all] [--force] [--exec=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n" +" --all and explicit <ref> specification are mutually exclusive."; static const char *exec = "git-receive-pack"; static int verbose; static int send_all; -- 1.5.0.rc1.g581a -- Uwe Kleine-König primes where sieve (p:xs) = [ x | x<-xs, x `rem` p /= 0 ]; \ primes = map head (iterate sieve [2..]) ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] make --exec=... option to git-push configurable 2007-01-19 12:43 [PATCH] Update documentation of fetch-pack, push and send-pack Uwe Kleine-König @ 2007-01-19 12:46 ` Uwe Kleine-König 2007-01-19 12:49 ` [RFC PATCH] rename --exec to --receive-pack for push and send-pack Uwe Kleine-König 2007-01-19 19:22 ` [PATCH] Update documentation of fetch-pack, " Junio C Hamano 1 sibling, 1 reply; 9+ messages in thread From: Uwe Kleine-König @ 2007-01-19 12:46 UTC (permalink / raw) To: git; +Cc: Junio C Hamano, Shawn O. Pearce, Johannes Schindelin Having to specify git push --exec=... is annoying if you cannot have git-receivepack in your PATH on the remote side (or don't want to). This introduces the config item remote.<name>.receivepack to override the default value (which is "git-receive-pack"). Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> --- This is the already known patch with s/pushexec/receivepack/ Just now I realized that I missed to add a In-Reply-To: to the first mail. I hope you can match it anyhow. Documentation/config.txt | 4 ++++ builtin-push.c | 11 +++++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index da7fde5..f1f409d 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -356,6 +356,10 @@ remote.<name>.push:: The default set of "refspec" for gitlink:git-push[1]. See gitlink:git-push[1]. +remote.<name>.receivepack:: + The default program to execute on the remote side when pulling. See + option \--exec of gitlink:git-push[1]. + repack.usedeltabaseoffset:: Allow gitlink:git-repack[1] to create packs that uses delta-base offset. Defaults to false. diff --git a/builtin-push.c b/builtin-push.c index ba7981f..6b3c03b 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -143,6 +143,7 @@ static const char *config_repo; static int config_repo_len; static int config_current_uri; static int config_get_refspecs; +static int config_get_receivepack; static int get_remote_config(const char* key, const char* value) { @@ -157,6 +158,15 @@ static int get_remote_config(const char* key, const char* value) else if (config_get_refspecs && !strcmp(key + 7 + config_repo_len, ".push")) add_refspec(xstrdup(value)); + else if (config_get_receivepack && + !strcmp(key + 7 + config_repo_len, ".receivepack")) { + if (!execute) { + char *ex = xmalloc(strlen(value) + 8); + sprintf(ex, "--exec=%s", value); + execute = ex; + } else + error("more than one receivepack given, using the first"); + } } return 0; } @@ -168,6 +178,7 @@ static int get_config_remotes_uri(const char *repo, const char *uri[MAX_URI]) config_current_uri = 0; config_uri = uri; config_get_refspecs = !(refspec_nr || all || tags); + config_get_receivepack = (execute == NULL); git_config(get_remote_config); return config_current_uri; -- 1.5.0.rc1.g581a -- Uwe Kleine-König http://www.google.com/search?q=e+%5E+%28i+pi%29 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [RFC PATCH] rename --exec to --receive-pack for push and send-pack 2007-01-19 12:46 ` [PATCH] make --exec=... option to git-push configurable Uwe Kleine-König @ 2007-01-19 12:49 ` Uwe Kleine-König 0 siblings, 0 replies; 9+ messages in thread From: Uwe Kleine-König @ 2007-01-19 12:49 UTC (permalink / raw) To: git; +Cc: Shawn O. Pearce, Johannes Schindelin, Junio C Hamano For now it's just to get a more descriptive name. Later we might update the push protocol to run more than one program on the other end. Moreover this matches better the corresponding config option remote.<name>. receivepack. --exec continues to work Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> --- Junio pointed out that remote.<name>.pushexec might not be appropriate, "just in case we update the fetch/push protocol someday to run more than one program on the other end". In my eyes the consequence is to rename --exec to --receive-pack as is done by this patch. Documentation/git-push.txt | 7 +++++-- Documentation/git-send-pack.txt | 7 +++++-- builtin-push.c | 24 ++++++++++++++---------- send-pack.c | 12 ++++++++---- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 7a2e503..f8cc2b5 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -8,7 +8,7 @@ git-push - Update remote refs along with associated objects SYNOPSIS -------- -'git-push' [--all] [--tags] [--exec=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...] +'git-push' [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...] DESCRIPTION ----------- @@ -67,12 +67,15 @@ the remote repository. addition to refspecs explicitly listed on the command line. -\--exec:: +\--receive-pack=<git-receive-pack>:: Path to the 'git-receive-pack' program on the remote end. Sometimes useful when pushing to a remote repository over ssh, and you do not have the program in a directory on the default $PATH. +\--exec=<git-receive-pack>:: + Same as \--receive-pack=<git-receive-pack>. + -f, \--force:: Usually, the command refuses to update a remote ref that is not a descendant of the local ref used to overwrite it. diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt index dee43a9..2f6267c 100644 --- a/Documentation/git-send-pack.txt +++ b/Documentation/git-send-pack.txt @@ -8,7 +8,7 @@ git-send-pack - Push objects over git protocol to another reposiotory SYNOPSIS -------- -'git-send-pack' [--all] [--force] [--exec=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...] +'git-send-pack' [--all] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...] DESCRIPTION ----------- @@ -21,12 +21,15 @@ updates it from the current repository, sending named refs. OPTIONS ------- -\--exec=<git-receive-pack>:: +\--receive-pack=<git-receive-pack>:: Path to the 'git-receive-pack' program on the remote end. Sometimes useful when pushing to a remote repository over ssh, and you do not have the program in a directory on the default $PATH. +\--exec=<git-receive-pack>:: + Same as \--receive-pack=<git-receive-pack>. + \--all:: Instead of explicitly specifying which refs to update, update all refs that locally exist. diff --git a/builtin-push.c b/builtin-push.c index 6b3c03b..5f4d7d3 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -8,10 +8,10 @@ #define MAX_URI (16) -static const char push_usage[] = "git-push [--all] [--tags] [--exec=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]"; +static const char push_usage[] = "git-push [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]"; static int all, tags, force, thin = 1, verbose; -static const char *execute; +static const char *receivepack; #define BUF_SIZE (2084) static char buffer[BUF_SIZE]; @@ -160,10 +160,10 @@ static int get_remote_config(const char* key, const char* value) add_refspec(xstrdup(value)); else if (config_get_receivepack && !strcmp(key + 7 + config_repo_len, ".receivepack")) { - if (!execute) { - char *ex = xmalloc(strlen(value) + 8); - sprintf(ex, "--exec=%s", value); - execute = ex; + if (!receivepack) { + char *rp = xmalloc(strlen(value) + 16); + sprintf(rp, "--receive-pack=%s", value); + receivepack = rp; } else error("more than one receivepack given, using the first"); } @@ -178,7 +178,7 @@ static int get_config_remotes_uri(const char *repo, const char *uri[MAX_URI]) config_current_uri = 0; config_uri = uri; config_get_refspecs = !(refspec_nr || all || tags); - config_get_receivepack = (execute == NULL); + config_get_receivepack = (receivepack == NULL); git_config(get_remote_config); return config_current_uri; @@ -263,8 +263,8 @@ static int do_push(const char *repo) argv[argc++] = "--all"; if (force) argv[argc++] = "--force"; - if (execute) - argv[argc++] = execute; + if (receivepack) + argv[argc++] = receivepack; common_argc = argc; for (i = 0; i < n; i++) { @@ -347,8 +347,12 @@ int cmd_push(int argc, const char **argv, const char *prefix) thin = 0; continue; } + if (!strncmp(arg, "--receive-pack=", 15)) { + receivepack = arg; + continue; + } if (!strncmp(arg, "--exec=", 7)) { - execute = arg; + receivepack = arg; continue; } usage(push_usage); diff --git a/send-pack.c b/send-pack.c index ec2c108..cd478dd 100644 --- a/send-pack.c +++ b/send-pack.c @@ -6,9 +6,9 @@ #include "exec_cmd.h" static const char send_pack_usage[] = -"git-send-pack [--all] [--force] [--exec=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n" +"git-send-pack [--all] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n" " --all and explicit <ref> specification are mutually exclusive."; -static const char *exec = "git-receive-pack"; +static const char *receivepack = "git-receive-pack"; static int verbose; static int send_all; static int force_update; @@ -377,8 +377,12 @@ int main(int argc, char **argv) char *arg = *argv; if (*arg == '-') { + if (!strncmp(arg, "--receive-pack=", 15)) { + receivepack = arg + 15; + continue; + } if (!strncmp(arg, "--exec=", 7)) { - exec = arg + 7; + receivepack = arg + 7; continue; } if (!strcmp(arg, "--all")) { @@ -413,7 +417,7 @@ int main(int argc, char **argv) usage(send_pack_usage); verify_remote_names(nr_heads, heads); - pid = git_connect(fd, dest, exec); + pid = git_connect(fd, dest, receivepack); if (pid < 0) return 1; ret = send_pack(fd[0], fd[1], nr_heads, heads); -- 1.5.0.rc1.g581a -- Uwe Kleine-König exit vi, lesson II: : w q ! <CR> NB: write the current file ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Update documentation of fetch-pack, push and send-pack 2007-01-19 12:43 [PATCH] Update documentation of fetch-pack, push and send-pack Uwe Kleine-König 2007-01-19 12:46 ` [PATCH] make --exec=... option to git-push configurable Uwe Kleine-König @ 2007-01-19 19:22 ` Junio C Hamano 2007-01-23 8:20 ` [PATCH] rename --exec to --upload-pack for fetch-pack and peek-remote Uwe Kleine-König 1 sibling, 1 reply; 9+ messages in thread From: Junio C Hamano @ 2007-01-19 19:22 UTC (permalink / raw) To: Uwe Kleine-König; +Cc: git, Shawn O. Pearce, Johannes Schindelin I think this series, including the last RFC one, is very sensible. Even though, strictly speaking, this is a new feature, I think we should have it in 1.5.0. We would need a similar change on fetch-pack and peek-remote side. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] rename --exec to --upload-pack for fetch-pack and peek-remote 2007-01-19 19:22 ` [PATCH] Update documentation of fetch-pack, " Junio C Hamano @ 2007-01-23 8:20 ` Uwe Kleine-König 2007-01-23 8:24 ` [PATCH] Use --upload-pack in clone, fetch and ls-remote instead of --exec Uwe Kleine-König 0 siblings, 1 reply; 9+ messages in thread From: Uwe Kleine-König @ 2007-01-23 8:20 UTC (permalink / raw) To: git Just some option name disambiguation. This is the counter part to commit d23842fd53e61f32c189a6ec902c4133abf29878 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> --- Documentation/git-fetch-pack.txt | 7 +++++-- Documentation/git-peek-remote.txt | 7 +++++-- fetch-pack.c | 12 ++++++++---- peek-remote.c | 12 ++++++++---- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt index bd8ebac..105d76b 100644 --- a/Documentation/git-fetch-pack.txt +++ b/Documentation/git-fetch-pack.txt @@ -8,7 +8,7 @@ git-fetch-pack - Receive missing objects from another repository 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 ----------- @@ -45,7 +45,7 @@ OPTIONS Spend extra cycles to minimize the number of objects to be sent. 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 remote side, if is not found on your $PATH. Installations of sshd ignores the user's environment @@ -57,6 +57,9 @@ OPTIONS shells by having a lean .bashrc file (they set most of the things up in .bash_profile). +\--exec=<git-upload-pack>:: + Same as \--upload-pack=<git-upload-pack>. + \--depth=<n>:: Limit fetching to ancestor-chains not longer than n. diff --git a/Documentation/git-peek-remote.txt b/Documentation/git-peek-remote.txt index ac57cda..74f37bd 100644 --- a/Documentation/git-peek-remote.txt +++ b/Documentation/git-peek-remote.txt @@ -8,7 +8,7 @@ git-peek-remote - List the references in a remote repository SYNOPSIS -------- -'git-peek-remote' [--exec=<git-upload-pack>] [<host>:]<directory> +'git-peek-remote' [--upload-pack=<git-upload-pack>] [<host>:]<directory> DESCRIPTION ----------- @@ -17,7 +17,7 @@ stores them in the local repository under the same name. OPTIONS ------- ---exec=<git-upload-pack>:: +\--upload-pack=<git-upload-pack>:: Use this to specify the path to 'git-upload-pack' on the remote side, if it is not found on your $PATH. Some 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 the things up in .bash_profile). +\--exec=<git-upload-pack>:: + Same \--upload-pack=<git-upload-pack>. + <host>:: A remote host that houses the repository. When this part is specified, 'git-upload-pack' is invoked via diff --git a/fetch-pack.c b/fetch-pack.c index 726140a..3546aef 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -12,8 +12,8 @@ static int verbose; static int fetch_all; static int depth; 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>...]"; -static const char *exec = "git-upload-pack"; +"git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--upload-pack=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]"; +static const char *uploadpack = "git-upload-pack"; #define COMPLETE (1U << 0) #define COMMON (1U << 1) @@ -643,8 +643,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("--quiet", arg) || !strcmp("-q", arg)) { @@ -682,7 +686,7 @@ int main(int argc, char **argv) } if (!dest) usage(fetch_pack_usage); - pid = git_connect(fd, dest, exec); + pid = git_connect(fd, dest, uploadpack); if (pid < 0) return 1; if (heads && nr_heads) diff --git a/peek-remote.c b/peek-remote.c index 353da00..ef3c76c 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); -- 1.5.0.rc1.g581a -- Uwe Kleine-König http://www.google.com/search?q=1+hertz+in+sec**-1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] Use --upload-pack in clone, fetch and ls-remote instead of --exec 2007-01-23 8:20 ` [PATCH] rename --exec to --upload-pack for fetch-pack and peek-remote Uwe Kleine-König @ 2007-01-23 8:24 ` Uwe Kleine-König 2007-01-23 8:40 ` Junio C Hamano 0 siblings, 1 reply; 9+ messages in thread From: Uwe Kleine-König @ 2007-01-23 8:24 UTC (permalink / raw) To: git Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> --- I don't like the change to git-fetch.sh. But currently git-fetch-pack needs a = and ls-remote doesn't like it. So it continues to have two variables for the remote upload program. git-clone.sh | 2 +- git-fetch.sh | 2 +- git-ls-remote.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git-clone.sh b/git-clone.sh index 0f7bbbf..d652c00 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -163,7 +163,7 @@ while 1,-u|1,--upload-pack) usage ;; *,-u|*,--upload-pack) shift - upload_pack="--exec=$1" ;; + upload_pack="--upload-pack=$1" ;; 1,--depth) usage;; *,--depth) shift diff --git a/git-fetch.sh b/git-fetch.sh index 87b940b..2279991 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -34,7 +34,7 @@ do --upl|--uplo|--uploa|--upload|--upload-|--upload-p|\ --upload-pa|--upload-pac|--upload-pack) shift - exec="--exec=$1" + exec="--upload-pack=$1" upload_pack="-u $1" ;; -f|--f|--fo|--for|--forc|--force) diff --git a/git-ls-remote.sh b/git-ls-remote.sh index 03b624e..e9e79e2 100755 --- a/git-ls-remote.sh +++ b/git-ls-remote.sh @@ -23,7 +23,7 @@ do -u|--u|--up|--upl|--uploa|--upload|--upload-|--upload-p|--upload-pa|\ --upload-pac|--upload-pack) shift - exec="--exec=$1" + exec="--upload-pack=$1" shift;; --) shift; break ;; -- 1.5.0.rc1.g581a -- Uwe Kleine-König http://www.google.com/search?q=2004+in+roman+numerals ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Use --upload-pack in clone, fetch and ls-remote instead of --exec 2007-01-23 8:24 ` [PATCH] Use --upload-pack in clone, fetch and ls-remote instead of --exec Uwe Kleine-König @ 2007-01-23 8:40 ` Junio C Hamano 2007-01-23 9:25 ` Junio C Hamano 0 siblings, 1 reply; 9+ messages in thread From: Junio C Hamano @ 2007-01-23 8:40 UTC (permalink / raw) To: Uwe Kleine-König; +Cc: git Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> writes: > Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> > --- > I don't like the change to git-fetch.sh. But currently git-fetch-pack > needs a = and ls-remote doesn't like it. So it continues to have two > variables for the remote upload program. Then maybe something like this is in order to make things more consistent? Totally untested, of course ;-). diff --git a/git-ls-remote.sh b/git-ls-remote.sh index 03b624e..69d4c2a 100755 --- a/git-ls-remote.sh +++ b/git-ls-remote.sh @@ -25,6 +25,10 @@ do shift exec="--exec=$1" shift;; + -u=*|--u=*|--up=*|--upl=*|--uplo=*|--uploa=*|--upload=*|\ + --upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*) + exec=--exec=`expr "$1" : '-[^=]*=\(.*\)'` + shift;; --) shift; break ;; -*) ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Use --upload-pack in clone, fetch and ls-remote instead of --exec 2007-01-23 8:40 ` Junio C Hamano @ 2007-01-23 9:25 ` Junio C Hamano 2007-01-23 14:05 ` Uwe Kleine-König 0 siblings, 1 reply; 9+ messages in thread From: Junio C Hamano @ 2007-01-23 9:25 UTC (permalink / raw) To: Uwe Kleine-König; +Cc: git Junio C Hamano <junkio@cox.net> writes: > Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> writes: > >> Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> >> --- >> I don't like the change to git-fetch.sh. But currently git-fetch-pack >> needs a = and ls-remote doesn't like it. So it continues to have two >> variables for the remote upload program. > > Then maybe something like this is in order to make things more > consistent? Merging these two together,... -- >8 -- [PATCH] ls-remote and clone: accept --upload-pack=<path> as well. This makes them consistent with other commands that take the path to the upload-pack program. We also pass --upload-pack instead of --exec to the underlying fetch-pack, although it is not strictly necessary. [jc: original motivation from Uwe] Signed-off-by: Junio C Hamano <junkio@cox.net> --- git-clone.sh | 4 +++- git-fetch.sh | 11 +++++++---- git-ls-remote.sh | 6 +++++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/git-clone.sh b/git-clone.sh index 0f7bbbf..ced7dfb 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -163,7 +163,9 @@ while 1,-u|1,--upload-pack) usage ;; *,-u|*,--upload-pack) shift - upload_pack="--exec=$1" ;; + upload_pack="--upload-pack=$1" ;; + *,--upload-pack=*) + upload_pack=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)') ;; 1,--depth) usage;; *,--depth) shift diff --git a/git-fetch.sh b/git-fetch.sh index 87b940b..07a1d05 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -22,7 +22,6 @@ force= verbose= update_head_ok= exec= -upload_pack= keep= shallow_depth= while case "$#" in 0) break ;; esac @@ -34,8 +33,12 @@ do --upl|--uplo|--uploa|--upload|--upload-|--upload-p|\ --upload-pa|--upload-pac|--upload-pack) shift - exec="--exec=$1" - upload_pack="-u $1" + exec="--upload-pack=$1" + ;; + --upl=*|--uplo=*|--uploa=*|--upload=*|\ + --upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*) + exec=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)') + shift ;; -f|--f|--fo|--for|--forc|--force) force=t @@ -94,7 +97,7 @@ then fi # Global that is reused later -ls_remote_result=$(git ls-remote $upload_pack "$remote") || +ls_remote_result=$(git ls-remote $exec "$remote") || die "Cannot get the repository state from $remote" append_fetch_head () { diff --git a/git-ls-remote.sh b/git-ls-remote.sh index 03b624e..dd22783 100755 --- a/git-ls-remote.sh +++ b/git-ls-remote.sh @@ -23,7 +23,11 @@ do -u|--u|--up|--upl|--uploa|--upload|--upload-|--upload-p|--upload-pa|\ --upload-pac|--upload-pack) shift - exec="--exec=$1" + exec="--upload-pack=$1" + shift;; + -u=*|--u=*|--up=*|--upl=*|--uplo=*|--uploa=*|--upload=*|\ + --upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*) + exec=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)') shift;; --) shift; break ;; -- 1.5.0.rc2.g4e4d0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Use --upload-pack in clone, fetch and ls-remote instead of --exec 2007-01-23 9:25 ` Junio C Hamano @ 2007-01-23 14:05 ` Uwe Kleine-König 0 siblings, 0 replies; 9+ messages in thread From: Uwe Kleine-König @ 2007-01-23 14:05 UTC (permalink / raw) To: Junio C Hamano; +Cc: git Junio C Hamano wrote: > [PATCH] ls-remote and clone: accept --upload-pack=<path> as well. > > This makes them consistent with other commands that take the > path to the upload-pack program. We also pass --upload-pack > instead of --exec to the underlying fetch-pack, although it is > not strictly necessary. > > [jc: original motivation from Uwe] > > Signed-off-by: Junio C Hamano <junkio@cox.net> Acked-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> -- Uwe Kleine-König $ dc -e "5735816763073014741799356604682P" ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-01-23 14:05 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-01-19 12:43 [PATCH] Update documentation of fetch-pack, push and send-pack Uwe Kleine-König 2007-01-19 12:46 ` [PATCH] make --exec=... option to git-push configurable Uwe Kleine-König 2007-01-19 12:49 ` [RFC PATCH] rename --exec to --receive-pack for push and send-pack Uwe Kleine-König 2007-01-19 19:22 ` [PATCH] Update documentation of fetch-pack, " Junio C Hamano 2007-01-23 8:20 ` [PATCH] rename --exec to --upload-pack for fetch-pack and peek-remote Uwe Kleine-König 2007-01-23 8:24 ` [PATCH] Use --upload-pack in clone, fetch and ls-remote instead of --exec Uwe Kleine-König 2007-01-23 8:40 ` Junio C Hamano 2007-01-23 9:25 ` Junio C Hamano 2007-01-23 14:05 ` Uwe Kleine-König
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).