{"thread":{"id":"7971","subject":"[PATCH 4/5] git-config: read remote config files over HTTP","startedAt":"2007-05-04T10:56:38Z","lastAt":"2007-05-18T19:33:08Z","messageCount":14,"participants":["Sven Verdoolaege","Frank Lichtenheld","Junio C Hamano","Alon Ziv"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"41038","messageId":"11782762032207-git-send-email-skimo@liacs.nl","threadId":"7971","inReplyTo":null,"subject":"Initial support for cloning submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@liacs.nl","sentAt":"2007-05-04T10:56:38Z","receivedAt":"2007-05-04T10:56:38Z","isPatch":false,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"From: Sven Verdoolaege <skimo@kotnet.org>\n\nThis patch series implements a mechanism for cloning submodules.\nEach submodule is specified by a 'submodule.<submodule>.url'\nconfiguration option, e.g.,\n\nbash-3.00$ ./git-config --remote=http://www.liacs.nl/~sverdool/isa.git --get-regexp 'submodule\\..*\\.url' \nsubmodule.cloog.url /home/sverdool/public_html/cloog.git\nsubmodule.cloog.url http://www.liacs.nl/~sverdool/cloog.git\n\ngit-clone will use the first url that works.\nE.g., a\n\ngit clone --submodules ssh://liacs/~/public_html/isa.git\n\n(which only works for me), will use the first url, while a\n\ngit clone --submodules http://www.liacs.nl/~sverdool/isa.git\n\nwill use the second.\n\nThe submodules are currently not checked out.\n\nskimo\n"},{"id":"41037","messageId":"1178276203431-git-send-email-skimo@liacs.nl","threadId":"7971","inReplyTo":"11782762032207-git-send-email-skimo@liacs.nl","subject":"[PATCH 1/5] Add dump-config","fromName":"Sven Verdoolaege","fromEmail":"skimo@liacs.nl","sentAt":"2007-05-04T10:56:39Z","receivedAt":"2007-05-04T10:56:39Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"From: Sven Verdoolaege <skimo@kotnet.org>\n\nThis command dumps the config of a repository and will be used\nto read config options from a remote site.\n\nSigned-off-by: Sven Verdoolaege <skimo@kotnet.org>\n---\n .gitignore                        |    1 +\n Documentation/cmd-list.perl       |    1 +\n Documentation/git-dump-config.txt |   37 +++++++++++++++++++++++++++++++++++++\n Makefile                          |    1 +\n daemon.c                          |    7 +++++++\n dump-config.c                     |   29 +++++++++++++++++++++++++++++\n 6 files changed, 76 insertions(+), 0 deletions(-)\n create mode 100644 Documentation/git-dump-config.txt\n create mode 100644 dump-config.c\n\ndiff --git a/.gitignore b/.gitignore\nindex 4dc0c39..d4e5492 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -38,6 +38,7 @@ git-diff-files\n git-diff-index\n git-diff-tree\n git-describe\n+git-dump-config\n git-fast-import\n git-fetch\n git-fetch--tool\ndiff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl\nindex 443802a..fa04615 100755\n--- a/Documentation/cmd-list.perl\n+++ b/Documentation/cmd-list.perl\n@@ -103,6 +103,7 @@ git-diff-files                          plumbinginterrogators\n git-diff-index                          plumbinginterrogators\n git-diff                                mainporcelain\n git-diff-tree                           plumbinginterrogators\n+git-dump-config                         synchelpers\n git-fast-import\t\t\t\tancillarymanipulators\n git-fetch                               mainporcelain\n git-fetch-pack                          synchingrepositories\ndiff --git a/Documentation/git-dump-config.txt b/Documentation/git-dump-config.txt\nnew file mode 100644\nindex 0000000..370781c\n--- /dev/null\n+++ b/Documentation/git-dump-config.txt\n@@ -0,0 +1,37 @@\n+git-dump-config(1)\n+====================\n+\n+NAME\n+----\n+git-dump-config - Dump config options\n+\n+\n+SYNOPSIS\n+--------\n+'git-dump-config' <directory>\n+\n+DESCRIPTION\n+-----------\n+Invoked by 'git-config --remote' and dumps the config file to the\n+other end over the git protocol.\n+\n+This command is usually not invoked directly by the end user.  The UI\n+for the protocol is on the 'git-config' side, where it is used to get\n+options from a remote repository.\n+\n+OPTIONS\n+-------\n+<directory>::\n+\tThe repository to get the config options from.\n+\n+Author\n+------\n+Written by Sven Verdoolaege.\n+\n+Documentation\n+--------------\n+Documentation by Sven Verdoolaege.\n+\n+GIT\n+---\n+Part of the gitlink:git[7] suite\ndiff --git a/Makefile b/Makefile\nindex e0a1308..0185386 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -232,6 +232,7 @@ PROGRAMS = \\\n \tgit-fast-import$X \\\n \tgit-merge-base$X \\\n \tgit-daemon$X \\\n+\tgit-dump-config$X \\\n \tgit-merge-index$X git-mktag$X git-mktree$X git-patch-id$X \\\n \tgit-peek-remote$X git-receive-pack$X \\\n \tgit-send-pack$X git-shell$X \\\ndiff --git a/daemon.c b/daemon.c\nindex e74ecac..3e5ebf3 100644\n--- a/daemon.c\n+++ b/daemon.c\n@@ -378,10 +378,17 @@ static int receive_pack(void)\n \treturn -1;\n }\n \n+static int dump_config(void)\n+{\n+\texecl_git_cmd(\"dump-config\", \".\", NULL);\n+\treturn -1;\n+}\n+\n static struct daemon_service daemon_service[] = {\n \t{ \"upload-archive\", \"uploadarch\", upload_archive, 0, 1 },\n \t{ \"upload-pack\", \"uploadpack\", upload_pack, 1, 1 },\n \t{ \"receive-pack\", \"receivepack\", receive_pack, 0, 1 },\n+\t{ \"dump-config\", \"dumpconfig\", dump_config, 0, 1 },\n };\n \n static void enable_service(const char *name, int ena) {\ndiff --git a/dump-config.c b/dump-config.c\nnew file mode 100644\nindex 0000000..355920d\n--- /dev/null\n+++ b/dump-config.c\n@@ -0,0 +1,29 @@\n+#include \"git-compat-util.h\"\n+#include \"cache.h\"\n+#include \"pkt-line.h\"\n+\n+static const char dump_config_usage[] = \"git-dump-config <dir>\";\n+\n+static int dump_config(const char *var, const char *value)\n+{\n+\tpacket_write(1, \"%s\", var);\n+\tpacket_write(1, \"%s\", value);\n+\treturn 0;\n+}\n+\n+int main(int argc, char **argv)\n+{\n+\tchar *dir;\n+\n+\tif (argc != 2)\n+\t\tusage(dump_config_usage);\n+\n+\tdir = argv[1];\n+\tif (!enter_repo(dir, 0))\n+\t\tdie(\"'%s': unable to chdir or not a git archive\", dir);\n+\n+\tgit_config(dump_config);\n+\tpacket_flush(1);\n+\n+\treturn 0;\n+}\n-- \n1.5.2.rc1.25.g889f-dirty\n"},{"id":"41035","messageId":"1178276203127-git-send-email-skimo@liacs.nl","threadId":"7971","inReplyTo":"11782762032207-git-send-email-skimo@liacs.nl","subject":"[PATCH 2/5] git-config: add --remote option for reading config from remote repo","fromName":"Sven Verdoolaege","fromEmail":"skimo@liacs.nl","sentAt":"2007-05-04T10:56:40Z","receivedAt":"2007-05-04T10:56:40Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"From: Sven Verdoolaege <skimo@kotnet.org>\n\nSigned-off-by: Sven Verdoolaege <skimo@kotnet.org>\n---\n Documentation/git-config.txt |   33 +++++++++++++++++++++---------\n builtin-config.c             |   44 ++++++++++++++++++++++++++++++++---------\n cache.h                      |    1 +\n config.c                     |   26 ++++++++++++++++++++++++\n 4 files changed, 84 insertions(+), 20 deletions(-)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 280ef20..76398ab 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -9,16 +9,25 @@ git-config - Get and set repository or global options\n SYNOPSIS\n --------\n [verse]\n-'git-config' [--system | --global] [type] name [value [value_regex]]\n-'git-config' [--system | --global] [type] --add name value\n-'git-config' [--system | --global] [type] --replace-all name [value [value_regex]]\n-'git-config' [--system | --global] [type] --get name [value_regex]\n-'git-config' [--system | --global] [type] --get-all name [value_regex]\n-'git-config' [--system | --global] [type] --unset name [value_regex]\n-'git-config' [--system | --global] [type] --unset-all name [value_regex]\n-'git-config' [--system | --global] [type] --rename-section old_name new_name\n-'git-config' [--system | --global] [type] --remove-section name\n-'git-config' [--system | --global] -l | --list\n+'git-config' [--system | --global | --remote=[<host>:]<directory ]\n+\t     [type] name [value [value_regex]]\n+'git-config' [--system | --global | --remote=[<host>:]<directory ]\n+\t     [type] --add name value\n+'git-config' [--system | --global | --remote=[<host>:]<directory ]\n+\t     [type] --replace-all name [value [value_regex]]\n+'git-config' [--system | --global | --remote=[<host>:]<directory ]\n+\t     [type] --get name [value_regex]\n+'git-config' [--system | --global | --remote=[<host>:]<directory ]\n+\t     [type] --get-all name [value_regex]\n+'git-config' [--system | --global | --remote=[<host>:]<directory ]\n+\t     [type] --unset name [value_regex]\n+'git-config' [--system | --global | --remote=[<host>:]<directory ]\n+\t     [type] --unset-all name [value_regex]\n+'git-config' [--system | --global | --remote=[<host>:]<directory ]\n+\t     [type] --rename-section old_name new_name\n+'git-config' [--system | --global | --remote=[<host>:]<directory ]\n+\t     [type] --remove-section name\n+'git-config' [--system | --global | --remote=[<host>:]<directory ] -l | --list\n \n DESCRIPTION\n -----------\n@@ -80,6 +89,10 @@ OPTIONS\n \tUse system-wide $(prefix)/etc/gitconfig rather than the repository\n \t.git/config.\n \n+--remote=[<host>:]<directory\n+\tUse remote config instead of the repository .git/config.\n+\tOnly available for reading options.\n+\n --remove-section::\n \tRemove the given section from the configuration file.\n \ndiff --git a/builtin-config.c b/builtin-config.c\nindex b2515f7..3a1e86c 100644\n--- a/builtin-config.c\n+++ b/builtin-config.c\n@@ -2,8 +2,10 @@\n #include \"cache.h\"\n \n static const char git_config_set_usage[] =\n-\"git-config [ --global | --system ] [ --bool | --int ] [--get | --get-all | --get-regexp | --replace-all | --add | --unset | --unset-all] name [value [value_regex]] | --rename-section old_name new_name | --remove-section name | --list\";\n+\"git-config [ --global | --system | --remote=[<host>:]<directory ] \"\n+\"[ --bool | --int ] [--get | --get-all | --get-regexp | --replace-all | --add | --unset | --unset-all] name [value [value_regex]] | --rename-section old_name new_name | --remove-section name | --list\";\n \n+static char *dest;\n static char *key;\n static regex_t *key_regexp;\n static regex_t *regexp;\n@@ -104,15 +106,19 @@ static int get_value(const char* key_, const char* regex_)\n \t\t}\n \t}\n \n-\tif (do_all && system_wide)\n-\t\tgit_config_from_file(show_config, system_wide);\n-\tif (do_all && global)\n-\t\tgit_config_from_file(show_config, global);\n-\tgit_config_from_file(show_config, local);\n-\tif (!do_all && !seen && global)\n-\t\tgit_config_from_file(show_config, global);\n-\tif (!do_all && !seen && system_wide)\n-\t\tgit_config_from_file(show_config, system_wide);\n+\tif (dest)\n+\t\tgit_config_from_remote(show_config, dest);\n+\telse {\n+\t\tif (do_all && system_wide)\n+\t\t\tgit_config_from_file(show_config, system_wide);\n+\t\tif (do_all && global)\n+\t\t\tgit_config_from_file(show_config, global);\n+\t\tgit_config_from_file(show_config, local);\n+\t\tif (!do_all && !seen && global)\n+\t\t\tgit_config_from_file(show_config, global);\n+\t\tif (!do_all && !seen && system_wide)\n+\t\t\tgit_config_from_file(show_config, system_wide);\n+\t}\n \n \tfree(key);\n \tif (regexp) {\n@@ -155,8 +161,14 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \t\t}\n \t\telse if (!strcmp(argv[1], \"--system\"))\n \t\t\tsetenv(\"GIT_CONFIG\", ETC_GITCONFIG, 1);\n+\t\telse if (!prefixcmp(argv[1], \"--remote=\"))\n+\t\t\tdest = xstrdup(argv[1]+9);\n \t\telse if (!strcmp(argv[1], \"--rename-section\")) {\n \t\t\tint ret;\n+\t\t\tif (dest) {\n+\t\t\t\tfprintf(stderr, \"Cannot rename on remote\\n\");\n+\t\t\t\treturn 1;\n+\t\t\t}\n \t\t\tif (argc != 4)\n \t\t\t\tusage(git_config_set_usage);\n \t\t\tret = git_config_rename_section(argv[2], argv[3]);\n@@ -170,6 +182,10 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \t\t}\n \t\telse if (!strcmp(argv[1], \"--remove-section\")) {\n \t\t\tint ret;\n+\t\t\tif (dest) {\n+\t\t\t\tfprintf(stderr, \"Cannot remove on remote\\n\");\n+\t\t\t\treturn 1;\n+\t\t\t}\n \t\t\tif (argc != 3)\n \t\t\t\tusage(git_config_set_usage);\n \t\t\tret = git_config_rename_section(argv[2], NULL);\n@@ -191,6 +207,10 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \tcase 2:\n \t\treturn get_value(argv[1], NULL);\n \tcase 3:\n+\t\tif (dest && prefixcmp(argv[1], \"--get\")) {\n+\t\t\tfprintf(stderr, \"Cannot (un)set on remote\\n\");\n+\t\t\treturn 1;\n+\t\t}\n \t\tif (!strcmp(argv[1], \"--unset\"))\n \t\t\treturn git_config_set(argv[2], NULL);\n \t\telse if (!strcmp(argv[1], \"--unset-all\"))\n@@ -209,6 +229,10 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \n \t\t\treturn git_config_set(argv[1], argv[2]);\n \tcase 4:\n+\t\tif (dest && prefixcmp(argv[1], \"--get\")) {\n+\t\t\tfprintf(stderr, \"Cannot (un)set on remote\\n\");\n+\t\t\treturn 1;\n+\t\t}\n \t\tif (!strcmp(argv[1], \"--unset\"))\n \t\t\treturn git_config_set_multivar(argv[2], NULL, argv[3], 0);\n \t\telse if (!strcmp(argv[1], \"--unset-all\"))\ndiff --git a/cache.h b/cache.h\nindex 8e76152..e8c7791 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -499,6 +499,7 @@ extern int update_server_info(int);\n typedef int (*config_fn_t)(const char *, const char *);\n extern int git_default_config(const char *, const char *);\n extern int git_config_from_file(config_fn_t fn, const char *);\n+extern int git_config_from_remote(config_fn_t fn, char *dest);\n extern int git_config(config_fn_t fn);\n extern int git_config_int(const char *, const char *);\n extern int git_config_bool(const char *, const char *);\ndiff --git a/config.c b/config.c\nindex 70d1055..0da74e0 100644\n--- a/config.c\n+++ b/config.c\n@@ -6,9 +6,12 @@\n  *\n  */\n #include \"cache.h\"\n+#include \"pkt-line.h\"\n \n #define MAXNAME (256)\n \n+static const char *dumpconfig = \"git-dump-config\";\n+\n static FILE *config_file;\n static const char *config_file_name;\n static int config_linenr;\n@@ -392,6 +395,29 @@ int git_config_from_file(config_fn_t fn, const char *filename)\n \treturn ret;\n }\n \n+int git_config_from_remote(config_fn_t fn, char *dest)\n+{\n+\tint ret;\n+\tint fd[2];\n+\tpid_t pid;\n+\tstatic char var[MAXNAME];\n+\tstatic char value[1024];\n+\n+\tpid = git_connect(fd, dest, dumpconfig);\n+\tif (pid < 0)\n+\t\treturn 1;\n+\tret = 0;\n+\twhile (packet_read_line(fd[0], var, sizeof(var))) {\n+\t\tif (!packet_read_line(fd[0], value, sizeof(value)))\n+\t\t\tdie(\"Missing value\");\n+\t\tfn(var, value);\n+\t}\n+\tclose(fd[0]);\n+\tclose(fd[1]);\n+\tret |= finish_connect(pid);\n+\treturn !!ret;\n+}\n+\n int git_config(config_fn_t fn)\n {\n \tint ret = 0;\n-- \n1.5.2.rc1.25.g889f-dirty\n"},{"id":"41039","messageId":"11782762032846-git-send-email-skimo@liacs.nl","threadId":"7971","inReplyTo":"11782762032207-git-send-email-skimo@liacs.nl","subject":"[PATCH 3/5] http.h: make fill_active_slots a function pointer","fromName":"Sven Verdoolaege","fromEmail":"skimo@liacs.nl","sentAt":"2007-05-04T10:56:41Z","receivedAt":"2007-05-04T10:56:41Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"From: Sven Verdoolaege <skimo@kotnet.org>\n\nThis allows us to use the methods provided by http.c\nfrom within libgit, in particular config.c.\n\nSigned-off-by: Sven Verdoolaege <skimo@kotnet.org>\n---\n http-fetch.c |    5 ++++-\n http-push.c  |    5 ++++-\n http.h       |    2 +-\n 3 files changed, 9 insertions(+), 3 deletions(-)\n\ndiff --git a/http-fetch.c b/http-fetch.c\nindex 09baedc..53fb2a9 100644\n--- a/http-fetch.c\n+++ b/http-fetch.c\n@@ -317,7 +317,7 @@ static void release_object_request(struct object_request *obj_req)\n }\n \n #ifdef USE_CURL_MULTI\n-void fill_active_slots(void)\n+static void fetch_fill_active_slots(void)\n {\n \tstruct object_request *obj_req = object_queue_head;\n \tstruct active_request_slot *slot = active_queue_head;\n@@ -1031,6 +1031,9 @@ int main(int argc, const char **argv)\n \t}\n \turl = argv[arg];\n \n+#ifdef USE_CURL_MULTI\n+\tfill_active_slots = fetch_fill_active_slots;\n+#endif\n \thttp_init();\n \n \tno_pragma_header = curl_slist_append(no_pragma_header, \"Pragma:\");\ndiff --git a/http-push.c b/http-push.c\nindex e3f7675..d4c850b 100644\n--- a/http-push.c\n+++ b/http-push.c\n@@ -794,7 +794,7 @@ static void finish_request(struct transfer_request *request)\n }\n \n #ifdef USE_CURL_MULTI\n-void fill_active_slots(void)\n+static void push_fill_active_slots(void)\n {\n \tstruct transfer_request *request = request_queue_head;\n \tstruct transfer_request *next;\n@@ -2355,6 +2355,9 @@ int main(int argc, char **argv)\n \n \tmemset(remote_dir_exists, -1, 256);\n \n+#ifdef USE_CURL_MULTI\n+\tfill_active_slots = push_fill_active_slots;\n+#endif\n \thttp_init();\n \n \tno_pragma_header = curl_slist_append(no_pragma_header, \"Pragma:\");\ndiff --git a/http.h b/http.h\nindex 69b6b66..7a41cde 100644\n--- a/http.h\n+++ b/http.h\n@@ -69,7 +69,7 @@ extern void finish_all_active_slots(void);\n extern void release_active_slot(struct active_request_slot *slot);\n \n #ifdef USE_CURL_MULTI\n-extern void fill_active_slots(void);\n+extern void (*fill_active_slots)(void);\n extern void step_active_slots(void);\n #endif\n \n-- \n1.5.2.rc1.25.g889f-dirty\n"},{"id":"41034","messageId":"11782762034009-git-send-email-skimo@liacs.nl","threadId":"7971","inReplyTo":"11782762032207-git-send-email-skimo@liacs.nl","subject":"[PATCH 4/5] git-config: read remote config files over HTTP","fromName":"Sven Verdoolaege","fromEmail":"skimo@liacs.nl","sentAt":"2007-05-04T10:56:42Z","receivedAt":"2007-05-04T10:56:42Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"From: Sven Verdoolaege <skimo@kotnet.org>\n\nSigned-off-by: Sven Verdoolaege <skimo@kotnet.org>\n---\n Makefile           |    6 +++++-\n config.c           |   14 ++++++++++++++\n http.c             |   10 ++++++++--\n http_config.h      |    1 +\n http_config_curl.c |   49 +++++++++++++++++++++++++++++++++++++++++++++++++\n http_config_none.c |    6 ++++++\n 6 files changed, 83 insertions(+), 3 deletions(-)\n create mode 100644 http_config.h\n create mode 100644 http_config_curl.c\n create mode 100644 http_config_none.c\n\ndiff --git a/Makefile b/Makefile\nindex 0185386..b782111 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -311,7 +311,7 @@ LIB_OBJS = \\\n \twrite_or_die.o trace.o list-objects.o grep.o match-trees.o \\\n \talloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \\\n \tcolor.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o \\\n-\tconvert.o attr.o decorate.o progress.o mailmap.o\n+\tconvert.o attr.o decorate.o progress.o mailmap.o $(HTTP_CONFIG_OBJ)\n \n BUILTIN_OBJS = \\\n \tbuiltin-add.o \\\n@@ -518,6 +518,10 @@ ifndef NO_CURL\n \tifndef NO_EXPAT\n \t\tEXPAT_LIBEXPAT = -lexpat\n \tendif\n+\tHTTP_CONFIG_OBJ = http_config_curl.o http.o\n+\tEXTLIBS += $(CURL_LIBCURL)\n+else\n+\tHTTP_CONFIG_OBJ = http_config_none.o\n endif\n \n ifndef NO_OPENSSL\ndiff --git a/config.c b/config.c\nindex 0da74e0..36e3b97 100644\n--- a/config.c\n+++ b/config.c\n@@ -7,6 +7,7 @@\n  */\n #include \"cache.h\"\n #include \"pkt-line.h\"\n+#include \"http_config.h\"\n \n #define MAXNAME (256)\n \n@@ -395,6 +396,16 @@ int git_config_from_file(config_fn_t fn, const char *filename)\n \treturn ret;\n }\n \n+static int config_from_http(config_fn_t fn, char *dest)\n+{\n+\tstatic char *config_temp = \"config.temp\";\n+\tif (git_http_fetch_config(dest, config_temp))\n+\t\treturn 1;\n+\tgit_config_from_file(fn, config_temp);\n+\tunlink(config_temp);\n+\treturn 0;\n+}\n+\n int git_config_from_remote(config_fn_t fn, char *dest)\n {\n \tint ret;\n@@ -403,6 +414,9 @@ int git_config_from_remote(config_fn_t fn, char *dest)\n \tstatic char var[MAXNAME];\n \tstatic char value[1024];\n \n+\tif (!prefixcmp(dest, \"http://\"))\n+\t\treturn config_from_http(fn, dest);\n+\n \tpid = git_connect(fd, dest, dumpconfig);\n \tif (pid < 0)\n \t\treturn 1;\ndiff --git a/http.c b/http.c\nindex ae27e0c..3e1ccce 100644\n--- a/http.c\n+++ b/http.c\n@@ -25,6 +25,10 @@ long curl_low_speed_limit = -1;\n long curl_low_speed_time = -1;\n int curl_ftp_no_epsv = 0;\n \n+#ifdef USE_CURL_MULTI\n+void (*fill_active_slots)(void) = NULL;\n+#endif\n+\n struct curl_slist *pragma_header;\n \n struct active_request_slot *active_queue_head = NULL;\n@@ -394,7 +398,8 @@ void step_active_slots(void)\n \t} while (curlm_result == CURLM_CALL_MULTI_PERFORM);\n \tif (num_transfers < active_requests) {\n \t\tprocess_curl_messages();\n-\t\tfill_active_slots();\n+\t\tif (fill_active_slots)\n+\t\t\tfill_active_slots();\n \t}\n }\n #endif\n@@ -459,7 +464,8 @@ void release_active_slot(struct active_request_slot *slot)\n \t\tslot->curl = NULL;\n \t}\n #ifdef USE_CURL_MULTI\n-\tfill_active_slots();\n+\tif (fill_active_slots)\n+\t\tfill_active_slots();\n #endif\n }\n \ndiff --git a/http_config.h b/http_config.h\nnew file mode 100644\nindex 0000000..0fddf98\n--- /dev/null\n+++ b/http_config.h\n@@ -0,0 +1 @@\n+int git_http_fetch_config(const char *repo, const char *config_file);\ndiff --git a/http_config_curl.c b/http_config_curl.c\nnew file mode 100644\nindex 0000000..3047ea2\n--- /dev/null\n+++ b/http_config_curl.c\n@@ -0,0 +1,49 @@\n+#include \"http_config.h\"\n+#include \"http.h\"\n+\n+int git_http_fetch_config(const char *repo, const char *config)\n+{\n+\tchar url[PATH_MAX];\n+\tint len = strlen(repo);\n+\n+\tFILE *configfile;\n+\tstruct active_request_slot *slot;\n+\tstruct slot_results results;\n+\n+\tstrcpy(url, repo);\n+\twhile (len > 0 && url[len-1] == '/')\n+\t\t--len;\n+\tsnprintf(url+len, sizeof(url)-len, \"/config\");\n+\n+\tconfigfile = fopen(config, \"w\");\n+\tif (!configfile)\n+\t\treturn error(\"Unable to open local file %s for config\",\n+\t\t\t     config);\n+\n+\thttp_init();\n+\n+\tslot = get_active_slot();\n+\tslot->results = &results;\n+\tcurl_easy_setopt(slot->curl, CURLOPT_FILE, configfile);\n+\tcurl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite);\n+\tcurl_easy_setopt(slot->curl, CURLOPT_URL, url);\n+\tslot->local = configfile;\n+\n+\tif (start_active_slot(slot)) {\n+\t\trun_active_slot(slot);\n+\t\tif (results.curl_result != CURLE_OK) {\n+\t\t\tfclose(configfile);\n+\t\t\treturn error(\"Unable to get config %s\\n%s\", url,\n+\t\t\t\t     curl_errorstr);\n+\t\t}\n+\t} else {\n+\t\tfclose(configfile);\n+\t\treturn error(\"Unable to start request\");\n+\t}\n+\n+\thttp_cleanup();\n+\n+\tfclose(configfile);\n+\n+\treturn 0;\n+}\ndiff --git a/http_config_none.c b/http_config_none.c\nnew file mode 100644\nindex 0000000..303160b\n--- /dev/null\n+++ b/http_config_none.c\n@@ -0,0 +1,6 @@\n+#include \"http_config.h\"\n+\n+int git_http_fetch_config(const char *repo, const char *config_file)\n+{\n+\treturn error(\"Reading http config files not supported\");\n+}\n-- \n1.5.2.rc1.25.g889f-dirty\n"},{"id":"41036","messageId":"11782762031893-git-send-email-skimo@liacs.nl","threadId":"7971","inReplyTo":"11782762032207-git-send-email-skimo@liacs.nl","subject":"[PATCH 5/5] git-clone: add --submodules for cloning submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@liacs.nl","sentAt":"2007-05-04T10:56:43Z","receivedAt":"2007-05-04T10:56:43Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"From: Sven Verdoolaege <skimo@kotnet.org>\n\nWhen the --submodules option is specified, git-clone will search\nfor submodule.<submodule>.url options in the remote configuration\nand clone each submodule using the first url that it can use from\nthe local site.\n\nThe submodules are currently not checked out.\n\nSigned-off-by: Sven Verdoolaege <skimo@kotnet.org>\n---\n Documentation/config.txt    |    3 ++\n Documentation/git-clone.txt |    6 +++-\n git-clone.sh                |   68 ++++++++++++++++++++++++++++++++++++++++++-\n 3 files changed, 75 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 24f9655..92747d8 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -597,6 +597,9 @@ showbranch.default::\n \tThe default set of branches for gitlink:git-show-branch[1].\n \tSee gitlink:git-show-branch[1].\n \n+submodule.<submodule>.url\n+\tThe URL of a submodule.  See gitlink:git-clone[1].\n+\n tar.umask::\n \tBy default, gitlink:git-tar-tree[1] sets file and directories modes\n \tto 0666 or 0777. While this is both useful and acceptable for projects\ndiff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\nindex 6d32c49..b112a6a 100644\n--- a/Documentation/git-clone.txt\n+++ b/Documentation/git-clone.txt\n@@ -11,7 +11,7 @@ SYNOPSIS\n [verse]\n 'git-clone' [--template=<template_directory>] [-l [-s]] [-q] [-n] [--bare]\n \t  [-o <name>] [-u <upload-pack>] [--reference <repository>]\n-\t  [--depth <depth>] <repository> [<directory>]\n+\t  [--depth <depth>] [--submodules] <repository> [<directory>]\n \n DESCRIPTION\n -----------\n@@ -105,6 +105,10 @@ OPTIONS\n \twith a long history, and would want to send in a fixes\n \tas patches.\n \n+--submodules::\n+\tClone submodules specified in (remote) configuration parameters\n+\tsubmodule.<submodule>.url.\n+\n <repository>::\n \tThe (possibly remote) repository to clone from.  It can\n \tbe any URL git-fetch supports.\ndiff --git a/git-clone.sh b/git-clone.sh\nindex cad5c0c..3a9b09c 100755\n--- a/git-clone.sh\n+++ b/git-clone.sh\n@@ -14,7 +14,7 @@ die() {\n }\n \n usage() {\n-\tdie \"Usage: $0 [--template=<template_directory>] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [--depth <n>] [-n] <repo> [<dir>]\"\n+\tdie \"Usage: $0 [--template=<template_directory>] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [--depth <n>] [-n] [--submodules] <repo> [<dir>]\"\n }\n \n get_repo_base() {\n@@ -67,6 +67,60 @@ Perhaps git-update-server-info needs to be run there?\"\n \trm -f \"$GIT_DIR/REMOTE_HEAD\"\n }\n \n+local_URL() {\n+\t# tranforms a \"URL\" on the remote to a URL that works on the local machine\n+\t# $1 - remote, $2 - URL on remote\n+\tcase \"$1\" in\n+\thttps://*|http://*|ftp://*)\n+\t\tcase \"$2\" in\n+\t\thttps://*|http://*|ftp://*)\n+\t\t\techo $2\n+\t\tesac\n+\t\t;;\n+\tssh://*)\n+\t\tcase \"$2\" in\n+\t\thttps://*|http://*|ftp://*)\n+\t\t\techo $2\n+\t\t\t;;\n+\t\t/*)\n+\t\t\techo $(echo $1 | sed -e 's/\\(ssh:\\/\\/[^\\/]*\\)\\/.*/\\1/')$2\n+\t\tesac\n+\t\t;;\n+\t/*)\n+\t\techo $2\n+\t\t;;\n+\t*)\n+\t\tcase \"$2\" in\n+\t\thttps://*|http://*|ftp://*)\n+\t\t\techo $2\n+\t\tesac\n+\tesac\n+}\n+\n+clone_submodules () {\n+\t# $1 - remote\n+\tprevious=\n+\tgit-config --remote=$1 --get-regexp 'submodule\\..*\\.url' | \\\n+\tsed -e 's/^submodule\\.//;s/\\.url / /' |\n+\twhile read submodule URL\n+\tdo\n+\t\techo \"$submodule $URL\"\n+\t\tif test \"$submodule\" = \"$previous\"\n+\t\tthen\n+\t\t\tcontinue;\n+\t\tfi\n+\t\tURL=$(local_URL \"$1\" \"$URL\")\n+\t\techo \"$submodule $URL\"\n+\t\tif test -z \"$URL\"\n+\t\tthen\n+\t\t\tcontinue;\n+\t\tfi\n+\t\tgit-clone -n \"$URL\" \"$submodule\"\n+\t\tgit-config \"submodule.$submodule.url\" \"$URL\"\n+\t\tprevious=\"$submodule\"\n+\tdone\n+}\n+\n quiet=\n local=no\n use_local=no\n@@ -81,6 +135,7 @@ origin_override=\n use_separate_remote=t\n depth=\n no_progress=\n+submodules=\n test -t 1 || no_progress=--no-progress\n while\n \tcase \"$#,$1\" in\n@@ -131,6 +186,8 @@ while\n \t*,--depth)\n \t\tshift\n \t\tdepth=\"--depth=$1\";;\n+\t*,--su|*,--sub|*,--subm|*,--submo|*,--submod|*,--submodu|*,--submodul|\\\n+\t*,--submodule|*,--submodules) submodules=yes ;;\n \t*,-*) usage ;;\n \t*) break ;;\n \tesac\n@@ -149,6 +206,10 @@ then\n \tthen\n \t\tdie '--bare and --origin $origin options are incompatible.'\n \tfi\n+\tif test yes = \"$submodules\"\n+\tthen\n+\t\tdie '--bare and --submodules origin options are incompatible.'\n+\tfi\n \tno_checkout=yes\n \tuse_separate_remote=\n fi\n@@ -394,6 +455,11 @@ then\n \t\tgit-config branch.\"$head_points_at\".merge \"refs/heads/$head_points_at\"\n \tesac\n \n+\tif test yes = \"$submodules\"\n+\tthen\n+\t\tclone_submodules \"$repo\"\n+\tfi\n+\n \tcase \"$no_checkout\" in\n \t'')\n \t\ttest \"z$quiet\" = z -a \"z$no_progress\" = z && v=-v || v=\n-- \n1.5.2.rc1.25.g889f-dirty\n"},{"id":"41090","messageId":"20070504210339.GB30324@planck.djpig.de","threadId":"7971","inReplyTo":"1178276203127-git-send-email-skimo@liacs.nl","subject":"Re: [PATCH 2/5] git-config: add --remote option for reading config from remote repo","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-05-04T21:03:40Z","receivedAt":"2007-05-04T21:03:40Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"\nSome comments on the documentation:\n\nOn Fri, May 04, 2007 at 12:56:40PM +0200, Sven Verdoolaege wrote:\n> +'git-config' [--system | --global | --remote=[<host>:]<directory ]\n> +\t     [type] name [value [value_regex]]\n\nmaybe something more like\n\n'git-config' [ scope ]\n\nwhere you mention later that scope can be --system | --global | --remote\nwould be more readable...\n\n> +'git-config' [--system | --global | --remote=[<host>:]<directory ]\n> +\t     [type] --add name value\n> +'git-config' [--system | --global | --remote=[<host>:]<directory ]\n> +\t     [type] --replace-all name [value [value_regex]]\n> +'git-config' [--system | --global | --remote=[<host>:]<directory ]\n> +\t     [type] --get name [value_regex]\n> +'git-config' [--system | --global | --remote=[<host>:]<directory ]\n> +\t     [type] --get-all name [value_regex]\n> +'git-config' [--system | --global | --remote=[<host>:]<directory ]\n> +\t     [type] --unset name [value_regex]\n> +'git-config' [--system | --global | --remote=[<host>:]<directory ]\n> +\t     [type] --unset-all name [value_regex]\n> +'git-config' [--system | --global | --remote=[<host>:]<directory ]\n> +\t     [type] --rename-section old_name new_name\n> +'git-config' [--system | --global | --remote=[<host>:]<directory ]\n> +\t     [type] --remove-section name\n> +'git-config' [--system | --global | --remote=[<host>:]<directory ] -l | --list\n>  \n>  DESCRIPTION\n>  -----------\n> @@ -80,6 +89,10 @@ OPTIONS\n>  \tUse system-wide $(prefix)/etc/gitconfig rather than the repository\n>  \t.git/config.\n>  \n> +--remote=[<host>:]<directory\n> +\tUse remote config instead of the repository .git/config.\n> +\tOnly available for reading options.\n\nWhy did you add it to all options in the SYNOPSYS then?\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"41091","messageId":"20070504211004.GA1719@liacs.nl","threadId":"7971","inReplyTo":"20070504210339.GB30324@planck.djpig.de","subject":"Re: [PATCH 2/5] git-config: add --remote option for reading config from remote repo","fromName":"Sven Verdoolaege","fromEmail":"skimo@liacs.nl","sentAt":"2007-05-04T21:10:05Z","receivedAt":"2007-05-04T21:10:05Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Fri, May 04, 2007 at 11:03:40PM +0200, Frank Lichtenheld wrote:\n> \n> Some comments on the documentation:\n> \n> On Fri, May 04, 2007 at 12:56:40PM +0200, Sven Verdoolaege wrote:\n> > +'git-config' [--system | --global | --remote=[<host>:]<directory ]\n> > +\t     [type] name [value [value_regex]]\n> \n> maybe something more like\n> \n> 'git-config' [ scope ]\n\nSounds reasonable, although I'd probably say [<scope>].\n\n> > +--remote=[<host>:]<directory\n> > +\tUse remote config instead of the repository .git/config.\n> > +\tOnly available for reading options.\n> \n> Why did you add it to all options in the SYNOPSYS then?\n\nBecause I wasn't thinking.\n\nskimo\n"},{"id":"41094","messageId":"20070504213553.GC30324@planck.djpig.de","threadId":"7971","inReplyTo":"20070504211004.GA1719@liacs.nl","subject":"Re: [PATCH 2/5] git-config: add --remote option for reading config from remote repo","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-05-04T21:35:53Z","receivedAt":"2007-05-04T21:35:53Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Fri, May 04, 2007 at 11:10:05PM +0200, Sven Verdoolaege wrote:\n> On Fri, May 04, 2007 at 11:03:40PM +0200, Frank Lichtenheld wrote:\n> > \n> > Some comments on the documentation:\n> > \n> > On Fri, May 04, 2007 at 12:56:40PM +0200, Sven Verdoolaege wrote:\n> > > +'git-config' [--system | --global | --remote=[<host>:]<directory ]\n> > > +\t     [type] name [value [value_regex]]\n> > \n> > maybe something more like\n> > \n> > 'git-config' [ scope ]\n> \n> Sounds reasonable, although I'd probably say [<scope>].\n\nNote that this is inconsistent with the rest of the documentation\n(e.g. it says [type], not [<type>]). \n\n> > > +--remote=[<host>:]<directory\n> > > +\tUse remote config instead of the repository .git/config.\n> > > +\tOnly available for reading options.\n> > \n> > Why did you add it to all options in the SYNOPSYS then?\n> \n> Because I wasn't thinking.\n\nAnother small error: You seem to be missing a '>' after each occourence of \n'<directory'.\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"41100","messageId":"7vfy6cqk0w.fsf@assigned-by-dhcp.cox.net","threadId":"7971","inReplyTo":"11782762032207-git-send-email-skimo@liacs.nl","subject":"Re: Initial support for cloning submodules","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-04T22:52:15Z","receivedAt":"2007-05-04T22:52:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The plumbing part looks very good, although I sensed a slight\nslop toward the end (will comment on individual patches later).\n\nI do not like the Porcelain part very much, though.  I do not\nthink we would want to add anything new to git-clone.  We should\nlose as much code from git-clone that is common with git-fetch\nas we can first, and add new features to git-fetch, with\npossibly passthru options added to git-clone as needed (e.g. a\nnew --submodule option).\n\nIf you --submodule cloned a remote repository when it had two\nsubmodules, and then later the remote adds another submodule,\nyou would need to have a way to fetch that can discover the\npresense of the new submodule and add it for you, and at that\npoint, having the code that knows much about submodules in clone\nwould not help you much.\n\nI suspect that a possible interaction between git-fetch and\ngit-clone would go like this:\n\n (1) \"git-clone [--submodules]\" would perform a normal clone,\n     having most of its work done by git-remote and git-fetch;\n\n (2) when \"--submodules\" is given to \"git-clone\", it passes it\n     through to underlying \"git-fetch\";\n\n (3) \"git-fetch --submodules\", after finishing what it would do\n     without \"--submodules\" option, would inspect the fetched\n     tree (or the index derived from it), find the tree entries\n     with mode 160000 (i.e. submodule graft points), and _then_\n     uses the pathnames of these tree entries to consult the\n     config mechanism to see which URL(s) can be used to\n     retrieve them, probably only for new submodules.  Your new\n     \"config --remote\" mechanism may be one good way to prime\n     the configuration from the originating site.\n\nWe could probably extend the upload-pack protocol to send the\nsame information as you are using submodules.*.url for, instead\nof adding a yet another protocol and program pairs you used for\n\"git config --remote\".  Having a generic program and protocol to\ndump the whole configuration file is certainly simpler, easier\nto debug, and easier to repurpose, it makes me somewhat worried\nabout security implications (if it is open to http then worrying\nabout it is not very useful, though).\n"},{"id":"41127","messageId":"20070505081404.GR955MdfPADPa@greensroom.kotnet.org","threadId":"7971","inReplyTo":"7vfy6cqk0w.fsf@assigned-by-dhcp.cox.net","subject":"Re: Initial support for cloning submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-05-05T08:14:04Z","receivedAt":"2007-05-05T08:14:04Z","isPatch":false,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Fri, May 04, 2007 at 03:52:15PM -0700, Junio C Hamano wrote:\n> I do not like the Porcelain part very much, though.  I do not\n> think we would want to add anything new to git-clone.  We should\n> lose as much code from git-clone that is common with git-fetch\n> as we can first, and add new features to git-fetch, with\n> possibly passthru options added to git-clone as needed (e.g. a\n> new --submodule option).\n\nSo what would you want to keep in git-clone ?\n\n> If you --submodule cloned a remote repository when it had two\n> submodules, and then later the remote adds another submodule,\n> you would need to have a way to fetch that can discover the\n> presense of the new submodule and add it for you, and at that\n> point, having the code that knows much about submodules in clone\n> would not help you much.\n\nTrue.\n\n>  (3) \"git-fetch --submodules\", after finishing what it would do\n>      without \"--submodules\" option, would inspect the fetched\n>      tree (or the index derived from it), find the tree entries\n>      with mode 160000 (i.e. submodule graft points), and _then_\n>      uses the pathnames of these tree entries to consult the\n>      config mechanism to see which URL(s) can be used to\n>      retrieve them, probably only for new submodules.\n\nWould git-fetch then call git-clone for these new submodules?\n\n> Having a generic program and protocol to\n> dump the whole configuration file is certainly simpler, easier\n> to debug, and easier to repurpose, it makes me somewhat worried\n> about security implications (if it is open to http then worrying\n> about it is not very useful, though).\n\nWe could easily have dump-config only dump a predefined \"known safe\"\nset of config options, although that would mean you have to upgrade\nthe server side each time you add a new dumpable config option.\nOr we could do the preselection only when called from git-daemon.\n\nskimo\n"},{"id":"41128","messageId":"7vmz0jk68d.fsf@assigned-by-dhcp.cox.net","threadId":"7971","inReplyTo":"20070505081404.GR955MdfPADPa@greensroom.kotnet.org","subject":"Re: Initial support for cloning submodules","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-05T08:46:42Z","receivedAt":"2007-05-05T08:46:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sven Verdoolaege <skimo@kotnet.org> writes:\n\n> On Fri, May 04, 2007 at 03:52:15PM -0700, Junio C Hamano wrote:\n>> I do not like the Porcelain part very much, though.  I do not\n>> think we would want to add anything new to git-clone.  We should\n>> lose as much code from git-clone that is common with git-fetch\n>> as we can first, and add new features to git-fetch, with\n>> possibly passthru options added to git-clone as needed (e.g. a\n>> new --submodule option).\n>\n> So what would you want to keep in git-clone ?\n\n - Figuring out the name of the new directory we create (think\n   \"git clone git://repo.or.cz/git.git\" -- it does \"mkdir git &&\n   cd git\" for you before doing the other things).\n\n - Run \"git init\" there, obviously.\n\n - Probably run \"git ls-remote\" to figure out which branch HEAD\n   should point at; you would definitely want to add a mechanism\n   to pass the ls-remote result to the \"git fetch\" you are going\n   to call next, as it is the first thing \"git fetch\" usually\n   does -- we would want to reuse it.\n\n - Recently suggested good addition is to have \"--track $branch\"\n   option to \"git clone\" to point remotes/origin/HEAD to\n   something other than what the remote's HEAD actually points\n   at (the discussion was primarily between Carl Worth and\n   Linus; see archive).\n\n - Run \"git remote add origin\" with the given URL to set up the\n   standard \"separate remotes\" tracking structure.\n\n - Run \"git fetch\" for initial fetch (\"git remote add -f\" could\n   do that as well).  You would probably need to pass --tags to\n   this \"git fetch\" to mimick what \"git clone\" does today.\n\n - Run initial checkout if asked.\n\n>>  (3) \"git-fetch --submodules\", after finishing what it would do\n>>      without \"--submodules\" option, would inspect the fetched\n>>      tree (or the index derived from it), find the tree entries\n>>      with mode 160000 (i.e. submodule graft points), and _then_\n>>      uses the pathnames of these tree entries to consult the\n>>      config mechanism to see which URL(s) can be used to\n>>      retrieve them, probably only for new submodules.\n>\n> Would git-fetch then call git-clone for these new submodules?\n\nMost likely yes but that is just my gut feeling -- I readily\nadmit I haven't thought it through.\n"},{"id":"41170","messageId":"1178424798.12963.9.camel@bruno.nolaviz.org","threadId":"7971","inReplyTo":"20070505081404.GR955MdfPADPa@greensroom.kotnet.org","subject":"Re: Initial support for cloning submodules","fromName":"Alon Ziv","fromEmail":"alonz@nolaviz.org","sentAt":"2007-05-06T04:13:18Z","receivedAt":"2007-05-06T04:13:18Z","isPatch":false,"sender":{"key":"alonz@nolaviz.org","avatar":null},"body":"On Sat, 2007-05-05 at 10:14 +0200, Sven Verdoolaege wrote:\n> We could easily have dump-config only dump a predefined \"known safe\"\n> set of config options, although that would mean you have to upgrade\n> the server side each time you add a new dumpable config option.\n> Or we could do the preselection only when called from git-daemon.\n> \n\nOr we could have the set of dumpable options itself in the config file;\na bit more cumbersome, but leaves all flexibility (including the\nshoot-yourself-in-the-foot kind) in the hands of the users :)\n\n\t-az\n"},{"id":"42528","messageId":"20070518193308.GJ942MdfPADPa@greensroom.kotnet.org","threadId":"7971","inReplyTo":"7vfy6cqk0w.fsf@assigned-by-dhcp.cox.net","subject":"Re: Initial support for cloning submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-05-18T19:33:08Z","receivedAt":"2007-05-18T19:33:08Z","isPatch":false,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Fri, May 04, 2007 at 03:52:15PM -0700, Junio C Hamano wrote:\n>  (3) \"git-fetch --submodules\", after finishing what it would do\n>      without \"--submodules\" option, would inspect the fetched\n>      tree (or the index derived from it), find the tree entries\n>      with mode 160000 (i.e. submodule graft points), and _then_\n>      uses the pathnames of these tree entries to consult the\n>      config mechanism to see which URL(s) can be used to\n>      retrieve them, probably only for new submodules.\n\nI've gone for cloning all available submodules on the remote,\neven if they are not used in the HEAD.\nA submodule may have been removed already and IMHO, you wouldn't\nwant to clone a submodule at the time you reset to an intermediate\ncommit.\n\nskimo\n"}]}