{"thread":{"id":"6436","subject":"[PATCH] Update documentation of fetch-pack, push and send-pack","startedAt":"2007-01-19T12:43:00Z","lastAt":"2007-01-23T14:05:34Z","messageCount":9,"participants":["Uwe Kleine-König","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"32059","messageId":"20070119124300.GA2995@cepheus","threadId":"6436","inReplyTo":null,"subject":"[PATCH] Update documentation of fetch-pack, push and send-pack","fromName":"Uwe Kleine-König","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2007-01-19T12:43:00Z","receivedAt":"2007-01-19T12:43:00Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"add all supported options to Documentation/git-....txt and the usage strings.\n\nSigned-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de>\n---\n\nThis patch is included in this series to have the later patches only\nupdating the documentation to follow the code changes.\n\n@Junio:  If you take this (or one of the following) patch(es), could you\nplease give me feedback on how my 'ö' got to you?\n\n Documentation/git-fetch-pack.txt |   21 +++++++++++++++++----\n Documentation/git-push.txt       |    2 +-\n Documentation/git-send-pack.txt  |   15 +++++++++++----\n builtin-push.c                   |    2 +-\n fetch-pack.c                     |    2 +-\n send-pack.c                      |    4 ++--\n 6 files changed, 33 insertions(+), 13 deletions(-)\n\n\ndiff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt\nindex 90ef127..bd8ebac 100644\n--- a/Documentation/git-fetch-pack.txt\n+++ b/Documentation/git-fetch-pack.txt\n@@ -8,7 +8,7 @@ git-fetch-pack - Receive missing objects from another repository\n \n SYNOPSIS\n --------\n-'git-fetch-pack' [-q] [-k] [--exec=<git-upload-pack>] [<host>:]<directory> [<refs>...]\n+'git-fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--exec=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]\n \n DESCRIPTION\n -----------\n@@ -28,17 +28,24 @@ have a common ancestor commit.\n \n OPTIONS\n -------\n--q::\n+\\--all::\n+\tFetch all remote refs.\n+\n+\\--quiet, \\-q::\n \tPass '-q' flag to 'git-unpack-objects'; this makes the\n \tcloning process less verbose.\n \n--k::\n+\\--keep, \\-k::\n \tDo not invoke 'git-unpack-objects' on received data, but\n \tcreate a single packfile out of it instead, and store it\n \tin the object database. If provided twice then the pack is\n \tlocked against repacking.\n \n---exec=<git-upload-pack>::\n+\\--thin::\n+\tSpend extra cycles to minimize the number of objects to be sent.\n+\tUse it on slower connection.\n+\n+\\--exec=<git-upload-pack>::\n \tUse this to specify the path to 'git-upload-pack' on the\n \tremote side, if is not found on your $PATH.\n \tInstallations of sshd ignores the user's environment\n@@ -50,6 +57,12 @@ OPTIONS\n \tshells by having a lean .bashrc file (they set most of\n \tthe things up in .bash_profile).\n \n+\\--depth=<n>::\n+\tLimit fetching to ancestor-chains not longer than n.\n+\n+\\-v::\n+\tRun verbosely.\n+\n <host>::\n \tA remote host that houses the repository.  When this\n \tpart is specified, 'git-upload-pack' is invoked via\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 3e8dbcf..7a2e503 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -8,7 +8,7 @@ git-push - Update remote refs along with associated objects\n \n SYNOPSIS\n --------\n-'git-push' [--all] [--tags] [--exec=<receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]\n+'git-push' [--all] [--tags] [--exec=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]\n \n DESCRIPTION\n -----------\ndiff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt\nindex eea8fe8..dee43a9 100644\n--- a/Documentation/git-send-pack.txt\n+++ b/Documentation/git-send-pack.txt\n@@ -8,7 +8,7 @@ git-send-pack - Push objects over git protocol to another reposiotory\n \n SYNOPSIS\n --------\n-'git-send-pack' [--all] [--force] [--exec=<git-receive-pack>] [<host>:]<directory> [<ref>...]\n+'git-send-pack' [--all] [--force] [--exec=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n \n DESCRIPTION\n -----------\n@@ -21,23 +21,30 @@ updates it from the current repository, sending named refs.\n \n OPTIONS\n -------\n---exec=<git-receive-pack>::\n+\\--exec=<git-receive-pack>::\n \tPath to the 'git-receive-pack' program on the remote\n \tend.  Sometimes useful when pushing to a remote\n \trepository over ssh, and you do not have the program in\n \ta directory on the default $PATH.\n \n---all::\n+\\--all::\n \tInstead of explicitly specifying which refs to update,\n \tupdate all refs that locally exist.\n \n---force::\n+\\--force::\n \tUsually, the command refuses to update a remote ref that\n \tis not an ancestor of the local ref used to overwrite it.\n \tThis flag disables the check.  What this means is that\n \tthe remote repository can lose commits; use it with\n \tcare.\n \n+\\--verbose::\n+\tRun verbosely.\n+\n+\\--thin::\n+\tSpend extra cycles to minimize the number of objects to be sent.\n+\tUse it on slower connection.\n+\n <host>::\n \tA remote host to house the repository.  When this\n \tpart is specified, 'git-receive-pack' is invoked via\ndiff --git a/builtin-push.c b/builtin-push.c\nindex 7a3d2bb..ba7981f 100644\n--- a/builtin-push.c\n+++ b/builtin-push.c\n@@ -8,7 +8,7 @@\n \n #define MAX_URI (16)\n \n-static const char push_usage[] = \"git-push [--all] [--tags] [-f | --force] <repository> [<refspec>...]\";\n+static const char push_usage[] = \"git-push [--all] [--tags] [--exec=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]\";\n \n static int all, tags, force, thin = 1, verbose;\n static const char *execute;\ndiff --git a/fetch-pack.c b/fetch-pack.c\nindex 1530a94..726140a 100644\n--- a/fetch-pack.c\n+++ b/fetch-pack.c\n@@ -12,7 +12,7 @@ static int verbose;\n static int fetch_all;\n static int depth;\n static const char fetch_pack_usage[] =\n-\"git-fetch-pack [--all] [-q] [-v] [-k] [--thin] [--exec=upload-pack] [--depth=<n>] [host:]directory <refs>...\";\n+\"git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--exec=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]\";\n static const char *exec = \"git-upload-pack\";\n \n #define COMPLETE\t(1U << 0)\ndiff --git a/send-pack.c b/send-pack.c\nindex 6756264..ec2c108 100644\n--- a/send-pack.c\n+++ b/send-pack.c\n@@ -6,8 +6,8 @@\n #include \"exec_cmd.h\"\n \n static const char send_pack_usage[] =\n-\"git-send-pack [--all] [--exec=git-receive-pack] <remote> [<head>...]\\n\"\n-\"  --all and explicit <head> specification are mutually exclusive.\";\n+\"git-send-pack [--all] [--force] [--exec=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\\n\"\n+\"  --all and explicit <ref> specification are mutually exclusive.\";\n static const char *exec = \"git-receive-pack\";\n static int verbose;\n static int send_all;\n-- \n1.5.0.rc1.g581a\n\n\n-- \nUwe Kleine-König\n\nprimes where sieve (p:xs) = [ x | x<-xs, x `rem` p /= 0 ]; \\\nprimes = map head (iterate sieve [2..])\n"},{"id":"32060","messageId":"20070119124616.GA3012@cepheus","threadId":"6436","inReplyTo":"20070119124300.GA2995@cepheus","subject":"[PATCH] make --exec=... option to git-push configurable","fromName":"Uwe Kleine-König","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2007-01-19T12:46:16Z","receivedAt":"2007-01-19T12:46:16Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Having to specify git push --exec=... is annoying if you cannot have\ngit-receivepack in your PATH on the remote side (or don't want to).\n\nThis introduces the config item remote.<name>.receivepack to override\nthe default value (which is \"git-receive-pack\").\n\nSigned-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de>\n---\n\nThis is the already known patch with s/pushexec/receivepack/\n\nJust now I realized that I missed to add a In-Reply-To: to the first\nmail.  I hope you can match it anyhow.\n\n Documentation/config.txt |    4 ++++\n builtin-push.c           |   11 +++++++++++\n 2 files changed, 15 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex da7fde5..f1f409d 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -356,6 +356,10 @@ remote.<name>.push::\n \tThe default set of \"refspec\" for gitlink:git-push[1]. See\n \tgitlink:git-push[1].\n \n+remote.<name>.receivepack::\n+\tThe default program to execute on the remote side when pulling.  See\n+\toption \\--exec of gitlink:git-push[1].\n+\n repack.usedeltabaseoffset::\n \tAllow gitlink:git-repack[1] to create packs that uses\n \tdelta-base offset.  Defaults to false.\ndiff --git a/builtin-push.c b/builtin-push.c\nindex ba7981f..6b3c03b 100644\n--- a/builtin-push.c\n+++ b/builtin-push.c\n@@ -143,6 +143,7 @@ static const char *config_repo;\n static int config_repo_len;\n static int config_current_uri;\n static int config_get_refspecs;\n+static int config_get_receivepack;\n \n static int get_remote_config(const char* key, const char* value)\n {\n@@ -157,6 +158,15 @@ static int get_remote_config(const char* key, const char* value)\n \t\telse if (config_get_refspecs &&\n \t\t\t !strcmp(key + 7 + config_repo_len, \".push\"))\n \t\t\tadd_refspec(xstrdup(value));\n+\t\telse if (config_get_receivepack &&\n+\t\t\t !strcmp(key + 7 + config_repo_len, \".receivepack\")) {\n+\t\t\tif (!execute) {\n+\t\t\t\tchar *ex = xmalloc(strlen(value) + 8);\n+\t\t\t\tsprintf(ex, \"--exec=%s\", value);\n+\t\t\t\texecute = ex;\n+\t\t\t} else\n+\t\t\t\terror(\"more than one receivepack given, using the first\");\n+\t\t}\n \t}\n \treturn 0;\n }\n@@ -168,6 +178,7 @@ static int get_config_remotes_uri(const char *repo, const char *uri[MAX_URI])\n \tconfig_current_uri = 0;\n \tconfig_uri = uri;\n \tconfig_get_refspecs = !(refspec_nr || all || tags);\n+\tconfig_get_receivepack = (execute == NULL);\n \n \tgit_config(get_remote_config);\n \treturn config_current_uri;\n-- \n1.5.0.rc1.g581a\n\n\n-- \nUwe Kleine-König\n\nhttp://www.google.com/search?q=e+%5E+%28i+pi%29\n"},{"id":"32061","messageId":"20070119124927.GA3039@cepheus","threadId":"6436","inReplyTo":"20070119124616.GA3012@cepheus","subject":"[RFC PATCH] rename --exec to --receive-pack for push and send-pack","fromName":"Uwe Kleine-König","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2007-01-19T12:49:27Z","receivedAt":"2007-01-19T12:49:27Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"For now it's just to get a more descriptive name.  Later we might update the\npush protocol to run more than one program on the other end.  Moreover this\nmatches better the corresponding config option remote.<name>. receivepack.\n\n--exec continues to work\n\nSigned-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de>\n---\nJunio pointed out that remote.<name>.pushexec might not be appropriate,\n\"just in case we update the fetch/push protocol someday to run more than\none program on the other end\".\n\nIn my eyes the consequence is to rename --exec to --receive-pack as is\ndone by this patch.\n\n Documentation/git-push.txt      |    7 +++++--\n Documentation/git-send-pack.txt |    7 +++++--\n builtin-push.c                  |   24 ++++++++++++++----------\n send-pack.c                     |   12 ++++++++----\n 4 files changed, 32 insertions(+), 18 deletions(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 7a2e503..f8cc2b5 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -8,7 +8,7 @@ git-push - Update remote refs along with associated objects\n \n SYNOPSIS\n --------\n-'git-push' [--all] [--tags] [--exec=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]\n+'git-push' [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]\n \n DESCRIPTION\n -----------\n@@ -67,12 +67,15 @@ the remote repository.\n \taddition to refspecs explicitly listed on the command\n \tline.\n \n-\\--exec::\n+\\--receive-pack=<git-receive-pack>::\n \tPath to the 'git-receive-pack' program on the remote\n \tend.  Sometimes useful when pushing to a remote\n \trepository over ssh, and you do not have the program in\n \ta directory on the default $PATH.\n \n+\\--exec=<git-receive-pack>::\n+\tSame as \\--receive-pack=<git-receive-pack>.\n+\n -f, \\--force::\n \tUsually, the command refuses to update a remote ref that is\n \tnot a descendant of the local ref used to overwrite it.\ndiff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt\nindex dee43a9..2f6267c 100644\n--- a/Documentation/git-send-pack.txt\n+++ b/Documentation/git-send-pack.txt\n@@ -8,7 +8,7 @@ git-send-pack - Push objects over git protocol to another reposiotory\n \n SYNOPSIS\n --------\n-'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 \n DESCRIPTION\n -----------\n@@ -21,12 +21,15 @@ updates it from the current repository, sending named refs.\n \n OPTIONS\n -------\n-\\--exec=<git-receive-pack>::\n+\\--receive-pack=<git-receive-pack>::\n \tPath to the 'git-receive-pack' program on the remote\n \tend.  Sometimes useful when pushing to a remote\n \trepository over ssh, and you do not have the program in\n \ta directory on the default $PATH.\n \n+\\--exec=<git-receive-pack>::\n+\tSame as \\--receive-pack=<git-receive-pack>.\n+\n \\--all::\n \tInstead of explicitly specifying which refs to update,\n \tupdate all refs that locally exist.\ndiff --git a/builtin-push.c b/builtin-push.c\nindex 6b3c03b..5f4d7d3 100644\n--- a/builtin-push.c\n+++ b/builtin-push.c\n@@ -8,10 +8,10 @@\n \n #define MAX_URI (16)\n \n-static const char push_usage[] = \"git-push [--all] [--tags] [--exec=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]\";\n+static const char push_usage[] = \"git-push [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]\";\n \n static int all, tags, force, thin = 1, verbose;\n-static const char *execute;\n+static const char *receivepack;\n \n #define BUF_SIZE (2084)\n static char buffer[BUF_SIZE];\n@@ -160,10 +160,10 @@ static int get_remote_config(const char* key, const char* value)\n \t\t\tadd_refspec(xstrdup(value));\n \t\telse if (config_get_receivepack &&\n \t\t\t !strcmp(key + 7 + config_repo_len, \".receivepack\")) {\n-\t\t\tif (!execute) {\n-\t\t\t\tchar *ex = xmalloc(strlen(value) + 8);\n-\t\t\t\tsprintf(ex, \"--exec=%s\", value);\n-\t\t\t\texecute = ex;\n+\t\t\tif (!receivepack) {\n+\t\t\t\tchar *rp = xmalloc(strlen(value) + 16);\n+\t\t\t\tsprintf(rp, \"--receive-pack=%s\", value);\n+\t\t\t\treceivepack = rp;\n \t\t\t} else\n \t\t\t\terror(\"more than one receivepack given, using the first\");\n \t\t}\n@@ -178,7 +178,7 @@ static int get_config_remotes_uri(const char *repo, const char *uri[MAX_URI])\n \tconfig_current_uri = 0;\n \tconfig_uri = uri;\n \tconfig_get_refspecs = !(refspec_nr || all || tags);\n-\tconfig_get_receivepack = (execute == NULL);\n+\tconfig_get_receivepack = (receivepack == NULL);\n \n \tgit_config(get_remote_config);\n \treturn config_current_uri;\n@@ -263,8 +263,8 @@ static int do_push(const char *repo)\n \t\targv[argc++] = \"--all\";\n \tif (force)\n \t\targv[argc++] = \"--force\";\n-\tif (execute)\n-\t\targv[argc++] = execute;\n+\tif (receivepack)\n+\t\targv[argc++] = receivepack;\n \tcommon_argc = argc;\n \n \tfor (i = 0; i < n; i++) {\n@@ -347,8 +347,12 @@ int cmd_push(int argc, const char **argv, const char *prefix)\n \t\t\tthin = 0;\n \t\t\tcontinue;\n \t\t}\n+\t\tif (!strncmp(arg, \"--receive-pack=\", 15)) {\n+\t\t\treceivepack = arg;\n+\t\t\tcontinue;\n+\t\t}\n \t\tif (!strncmp(arg, \"--exec=\", 7)) {\n-\t\t\texecute = arg;\n+\t\t\treceivepack = arg;\n \t\t\tcontinue;\n \t\t}\n \t\tusage(push_usage);\ndiff --git a/send-pack.c b/send-pack.c\nindex ec2c108..cd478dd 100644\n--- a/send-pack.c\n+++ b/send-pack.c\n@@ -6,9 +6,9 @@\n #include \"exec_cmd.h\"\n \n static const char send_pack_usage[] =\n-\"git-send-pack [--all] [--force] [--exec=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\\n\"\n+\"git-send-pack [--all] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\\n\"\n \"  --all and explicit <ref> specification are mutually exclusive.\";\n-static const char *exec = \"git-receive-pack\";\n+static const char *receivepack = \"git-receive-pack\";\n static int verbose;\n static int send_all;\n static int force_update;\n@@ -377,8 +377,12 @@ int main(int argc, char **argv)\n \t\tchar *arg = *argv;\n \n \t\tif (*arg == '-') {\n+\t\t\tif (!strncmp(arg, \"--receive-pack=\", 15)) {\n+\t\t\t\treceivepack = arg + 15;\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!strncmp(arg, \"--exec=\", 7)) {\n-\t\t\t\texec = arg + 7;\n+\t\t\t\treceivepack = arg + 7;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tif (!strcmp(arg, \"--all\")) {\n@@ -413,7 +417,7 @@ int main(int argc, char **argv)\n \t\tusage(send_pack_usage);\n \tverify_remote_names(nr_heads, heads);\n \n-\tpid = git_connect(fd, dest, exec);\n+\tpid = git_connect(fd, dest, receivepack);\n \tif (pid < 0)\n \t\treturn 1;\n \tret = send_pack(fd[0], fd[1], nr_heads, heads);\n-- \n1.5.0.rc1.g581a\n\n\n-- \nUwe Kleine-König\n\nexit vi, lesson II:\n: w q ! <CR>\n\nNB: write the current file\n"},{"id":"32076","messageId":"7v7ivihldu.fsf@assigned-by-dhcp.cox.net","threadId":"6436","inReplyTo":"20070119124300.GA2995@cepheus","subject":"Re: [PATCH] Update documentation of fetch-pack, push and send-pack","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-19T19:22:37Z","receivedAt":"2007-01-19T19:22:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I think this series, including the last RFC one, is very\nsensible.  Even though, strictly speaking, this is a new\nfeature, I think we should have it in 1.5.0.\n\nWe would need a similar change on fetch-pack and peek-remote\nside.\n"},{"id":"32370","messageId":"20070123082017.GA10007@cepheus","threadId":"6436","inReplyTo":"7v7ivihldu.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] rename --exec to --upload-pack for fetch-pack and peek-remote","fromName":"Uwe Kleine-König","fromEmail":"ukleinek@informatik.uni-freiburg.de","sentAt":"2007-01-23T08:20:17Z","receivedAt":"2007-01-23T08:20:17Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Just some option name disambiguation.  This is the counter part to commit\nd23842fd53e61f32c189a6ec902c4133abf29878 which made a similar change for push\nand send-pack.\n\n--exec continues to work.\n\nSigned-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>\n---\n Documentation/git-fetch-pack.txt  |    7 +++++--\n Documentation/git-peek-remote.txt |    7 +++++--\n fetch-pack.c                      |   12 ++++++++----\n peek-remote.c                     |   12 ++++++++----\n 4 files changed, 26 insertions(+), 12 deletions(-)\n\ndiff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt\nindex bd8ebac..105d76b 100644\n--- a/Documentation/git-fetch-pack.txt\n+++ b/Documentation/git-fetch-pack.txt\n@@ -8,7 +8,7 @@ git-fetch-pack - Receive missing objects from another repository\n \n SYNOPSIS\n --------\n-'git-fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--exec=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]\n+'git-fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--upload-pack=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]\n \n DESCRIPTION\n -----------\n@@ -45,7 +45,7 @@ OPTIONS\n \tSpend extra cycles to minimize the number of objects to be sent.\n \tUse it on slower connection.\n \n-\\--exec=<git-upload-pack>::\n+\\--upload-pack=<git-upload-pack>::\n \tUse this to specify the path to 'git-upload-pack' on the\n \tremote side, if is not found on your $PATH.\n \tInstallations of sshd ignores the user's environment\n@@ -57,6 +57,9 @@ OPTIONS\n \tshells by having a lean .bashrc file (they set most of\n \tthe things up in .bash_profile).\n \n+\\--exec=<git-upload-pack>::\n+\tSame as \\--upload-pack=<git-upload-pack>.\n+\n \\--depth=<n>::\n \tLimit fetching to ancestor-chains not longer than n.\n \ndiff --git a/Documentation/git-peek-remote.txt b/Documentation/git-peek-remote.txt\nindex ac57cda..74f37bd 100644\n--- a/Documentation/git-peek-remote.txt\n+++ b/Documentation/git-peek-remote.txt\n@@ -8,7 +8,7 @@ git-peek-remote - List the references in a remote repository\n \n SYNOPSIS\n --------\n-'git-peek-remote' [--exec=<git-upload-pack>] [<host>:]<directory>\n+'git-peek-remote' [--upload-pack=<git-upload-pack>] [<host>:]<directory>\n \n DESCRIPTION\n -----------\n@@ -17,7 +17,7 @@ stores them in the local repository under the same name.\n \n OPTIONS\n -------\n---exec=<git-upload-pack>::\n+\\--upload-pack=<git-upload-pack>::\n \tUse this to specify the path to 'git-upload-pack' on the\n \tremote side, if it is not found on your $PATH. Some\n \tinstallations of sshd ignores the user's environment\n@@ -29,6 +29,9 @@ OPTIONS\n \tshells, but prefer having a lean .bashrc file (they set most of\n \tthe things up in .bash_profile).\n \n+\\--exec=<git-upload-pack>::\n+\tSame \\--upload-pack=<git-upload-pack>.\n+\n <host>::\n \tA remote host that houses the repository.  When this\n \tpart is specified, 'git-upload-pack' is invoked via\ndiff --git a/fetch-pack.c b/fetch-pack.c\nindex 726140a..3546aef 100644\n--- a/fetch-pack.c\n+++ b/fetch-pack.c\n@@ -12,8 +12,8 @@ static int verbose;\n static int fetch_all;\n static int depth;\n static const char fetch_pack_usage[] =\n-\"git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--exec=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]\";\n-static const char *exec = \"git-upload-pack\";\n+\"git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--upload-pack=<git-upload-pack>] [--depth=<n>] [-v] [<host>:]<directory> [<refs>...]\";\n+static const char *uploadpack = \"git-upload-pack\";\n \n #define COMPLETE\t(1U << 0)\n #define COMMON\t\t(1U << 1)\n@@ -643,8 +643,12 @@ int main(int argc, char **argv)\n \t\tchar *arg = argv[i];\n \n \t\tif (*arg == '-') {\n+\t\t\tif (!strncmp(\"--upload-pack=\", arg, 14)) {\n+\t\t\t\tuploadpack = arg + 14;\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!strncmp(\"--exec=\", arg, 7)) {\n-\t\t\t\texec = arg + 7;\n+\t\t\t\tuploadpack = arg + 7;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tif (!strcmp(\"--quiet\", arg) || !strcmp(\"-q\", arg)) {\n@@ -682,7 +686,7 @@ int main(int argc, char **argv)\n \t}\n \tif (!dest)\n \t\tusage(fetch_pack_usage);\n-\tpid = git_connect(fd, dest, exec);\n+\tpid = git_connect(fd, dest, uploadpack);\n \tif (pid < 0)\n \t\treturn 1;\n \tif (heads && nr_heads)\ndiff --git a/peek-remote.c b/peek-remote.c\nindex 353da00..ef3c76c 100644\n--- a/peek-remote.c\n+++ b/peek-remote.c\n@@ -3,8 +3,8 @@\n #include \"pkt-line.h\"\n \n static const char peek_remote_usage[] =\n-\"git-peek-remote [--exec=upload-pack] [host:]directory\";\n-static const char *exec = \"git-upload-pack\";\n+\"git-peek-remote [--upload-pack=<git-upload-pack>] [<host>:]<directory>\";\n+static const char *uploadpack = \"git-upload-pack\";\n \n static int peek_remote(int fd[2], unsigned flags)\n {\n@@ -35,8 +35,12 @@ int main(int argc, char **argv)\n \t\tchar *arg = argv[i];\n \n \t\tif (*arg == '-') {\n+\t\t\tif (!strncmp(\"--upload-pack=\", arg, 14)) {\n+\t\t\t\tuploadpack = arg + 14;\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!strncmp(\"--exec=\", arg, 7)) {\n-\t\t\t\texec = arg + 7;\n+\t\t\t\tuploadpack = arg + 7;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tif (!strcmp(\"--tags\", arg)) {\n@@ -60,7 +64,7 @@ int main(int argc, char **argv)\n \tif (!dest || i != argc - 1)\n \t\tusage(peek_remote_usage);\n \n-\tpid = git_connect(fd, dest, exec);\n+\tpid = git_connect(fd, dest, uploadpack);\n \tif (pid < 0)\n \t\treturn 1;\n \tret = peek_remote(fd, flags);\n-- \n1.5.0.rc1.g581a\n\n\n-- \nUwe Kleine-König\n\nhttp://www.google.com/search?q=1+hertz+in+sec**-1\n"},{"id":"32371","messageId":"20070123082437.GA10053@cepheus","threadId":"6436","inReplyTo":"20070123082017.GA10007@cepheus","subject":"[PATCH] Use --upload-pack in clone, fetch and ls-remote instead of --exec","fromName":"Uwe Kleine-König","fromEmail":"ukleinek@informatik.uni-freiburg.de","sentAt":"2007-01-23T08:24:37Z","receivedAt":"2007-01-23T08:24:37Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>\n---\nI don't like the change to git-fetch.sh.  But currently git-fetch-pack\nneeds a = and ls-remote doesn't like it.  So it continues to have two\nvariables for the remote upload program.\n\n git-clone.sh     |    2 +-\n git-fetch.sh     |    2 +-\n git-ls-remote.sh |    2 +-\n 3 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/git-clone.sh b/git-clone.sh\nindex 0f7bbbf..d652c00 100755\n--- a/git-clone.sh\n+++ b/git-clone.sh\n@@ -163,7 +163,7 @@ while\n \t1,-u|1,--upload-pack) usage ;;\n \t*,-u|*,--upload-pack)\n \t\tshift\n-\t\tupload_pack=\"--exec=$1\" ;;\n+\t\tupload_pack=\"--upload-pack=$1\" ;;\n \t1,--depth) usage;;\n \t*,--depth)\n \t\tshift\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex 87b940b..2279991 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -34,7 +34,7 @@ do\n \t--upl|--uplo|--uploa|--upload|--upload-|--upload-p|\\\n \t--upload-pa|--upload-pac|--upload-pack)\n \t\tshift\n-\t\texec=\"--exec=$1\" \n+\t\texec=\"--upload-pack=$1\" \n \t\tupload_pack=\"-u $1\"\n \t\t;;\n \t-f|--f|--fo|--for|--forc|--force)\ndiff --git a/git-ls-remote.sh b/git-ls-remote.sh\nindex 03b624e..e9e79e2 100755\n--- a/git-ls-remote.sh\n+++ b/git-ls-remote.sh\n@@ -23,7 +23,7 @@ do\n   -u|--u|--up|--upl|--uploa|--upload|--upload-|--upload-p|--upload-pa|\\\n   --upload-pac|--upload-pack)\n \tshift\n-\texec=\"--exec=$1\"\n+\texec=\"--upload-pack=$1\"\n \tshift;;\n   --)\n   shift; break ;;\n-- \n1.5.0.rc1.g581a\n\n\n-- \nUwe Kleine-König\n\nhttp://www.google.com/search?q=2004+in+roman+numerals\n"},{"id":"32373","messageId":"7vveiynnju.fsf@assigned-by-dhcp.cox.net","threadId":"6436","inReplyTo":"20070123082437.GA10053@cepheus","subject":"Re: [PATCH] Use --upload-pack in clone, fetch and ls-remote instead of --exec","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-23T08:40:37Z","receivedAt":"2007-01-23T08:40:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Uwe Kleine-König  <ukleinek@informatik.uni-freiburg.de> writes:\n\n> Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>\n> ---\n> I don't like the change to git-fetch.sh.  But currently git-fetch-pack\n> needs a = and ls-remote doesn't like it.  So it continues to have two\n> variables for the remote upload program.\n\nThen maybe something like this is in order to make things more\nconsistent?\n\nTotally untested, of course ;-).\n\ndiff --git a/git-ls-remote.sh b/git-ls-remote.sh\nindex 03b624e..69d4c2a 100755\n--- a/git-ls-remote.sh\n+++ b/git-ls-remote.sh\n@@ -25,6 +25,10 @@ do\n \tshift\n \texec=\"--exec=$1\"\n \tshift;;\n+  -u=*|--u=*|--up=*|--upl=*|--uplo=*|--uploa=*|--upload=*|\\\n+  --upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*)\n+  \texec=--exec=`expr \"$1\" : '-[^=]*=\\(.*\\)'`\n+\tshift;;\n   --)\n   shift; break ;;\n   -*)\n"},{"id":"32374","messageId":"7vlkjunlgk.fsf@assigned-by-dhcp.cox.net","threadId":"6436","inReplyTo":"7vveiynnju.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Use --upload-pack in clone, fetch and ls-remote instead of --exec","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-23T09:25:47Z","receivedAt":"2007-01-23T09:25:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> Uwe Kleine-König  <ukleinek@informatik.uni-freiburg.de> writes:\n>\n>> Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>\n>> ---\n>> I don't like the change to git-fetch.sh.  But currently git-fetch-pack\n>> needs a = and ls-remote doesn't like it.  So it continues to have two\n>> variables for the remote upload program.\n>\n> Then maybe something like this is in order to make things more\n> consistent?\n\nMerging these two together,...\n\n-- >8 --\n[PATCH] ls-remote and clone: accept --upload-pack=<path> as well.\n\nThis makes them consistent with other commands that take the\npath to the upload-pack program.  We also pass --upload-pack\ninstead of --exec to the underlying fetch-pack, although it is\nnot strictly necessary.\n\n[jc: original motivation from Uwe]\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n git-clone.sh     |    4 +++-\n git-fetch.sh     |   11 +++++++----\n git-ls-remote.sh |    6 +++++-\n 3 files changed, 15 insertions(+), 6 deletions(-)\n\ndiff --git a/git-clone.sh b/git-clone.sh\nindex 0f7bbbf..ced7dfb 100755\n--- a/git-clone.sh\n+++ b/git-clone.sh\n@@ -163,7 +163,9 @@ while\n \t1,-u|1,--upload-pack) usage ;;\n \t*,-u|*,--upload-pack)\n \t\tshift\n-\t\tupload_pack=\"--exec=$1\" ;;\n+\t\tupload_pack=\"--upload-pack=$1\" ;;\n+\t*,--upload-pack=*)\n+\t\tupload_pack=--upload-pack=$(expr \"$1\" : '-[^=]*=\\(.*\\)') ;;\n \t1,--depth) usage;;\n \t*,--depth)\n \t\tshift\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex 87b940b..07a1d05 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -22,7 +22,6 @@ force=\n verbose=\n update_head_ok=\n exec=\n-upload_pack=\n keep=\n shallow_depth=\n while case \"$#\" in 0) break ;; esac\n@@ -34,8 +33,12 @@ do\n \t--upl|--uplo|--uploa|--upload|--upload-|--upload-p|\\\n \t--upload-pa|--upload-pac|--upload-pack)\n \t\tshift\n-\t\texec=\"--exec=$1\" \n-\t\tupload_pack=\"-u $1\"\n+\t\texec=\"--upload-pack=$1\"\n+\t\t;;\n+\t--upl=*|--uplo=*|--uploa=*|--upload=*|\\\n+\t--upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*)\n+\t\texec=--upload-pack=$(expr \"$1\" : '-[^=]*=\\(.*\\)')\n+\t\tshift\n \t\t;;\n \t-f|--f|--fo|--for|--forc|--force)\n \t\tforce=t\n@@ -94,7 +97,7 @@ then\n fi\n \n # Global that is reused later\n-ls_remote_result=$(git ls-remote $upload_pack \"$remote\") ||\n+ls_remote_result=$(git ls-remote $exec \"$remote\") ||\n \tdie \"Cannot get the repository state from $remote\"\n \n append_fetch_head () {\ndiff --git a/git-ls-remote.sh b/git-ls-remote.sh\nindex 03b624e..dd22783 100755\n--- a/git-ls-remote.sh\n+++ b/git-ls-remote.sh\n@@ -23,7 +23,11 @@ do\n   -u|--u|--up|--upl|--uploa|--upload|--upload-|--upload-p|--upload-pa|\\\n   --upload-pac|--upload-pack)\n \tshift\n-\texec=\"--exec=$1\"\n+\texec=\"--upload-pack=$1\"\n+\tshift;;\n+  -u=*|--u=*|--up=*|--upl=*|--uplo=*|--uploa=*|--upload=*|\\\n+  --upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*)\n+\texec=--upload-pack=$(expr \"$1\" : '-[^=]*=\\(.*\\)')\n \tshift;;\n   --)\n   shift; break ;;\n-- \n1.5.0.rc2.g4e4d0\n"},{"id":"32401","messageId":"20070123140534.GA6969@cepheus","threadId":"6436","inReplyTo":"7vlkjunlgk.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Use --upload-pack in clone, fetch and ls-remote instead of --exec","fromName":"Uwe Kleine-König","fromEmail":"ukleinek@informatik.uni-freiburg.de","sentAt":"2007-01-23T14:05:34Z","receivedAt":"2007-01-23T14:05:34Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> [PATCH] ls-remote and clone: accept --upload-pack=<path> as well.\n> \n> This makes them consistent with other commands that take the\n> path to the upload-pack program.  We also pass --upload-pack\n> instead of --exec to the underlying fetch-pack, although it is\n> not strictly necessary.\n> \n> [jc: original motivation from Uwe]\n> \n> Signed-off-by: Junio C Hamano <junkio@cox.net>\nAcked-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>\n\n-- \nUwe Kleine-König\n\n$ dc -e \"5735816763073014741799356604682P\"\n"}]}