{"thread":{"id":"30919","subject":"A handful of help-related patches","startedAt":"2012-06-27T20:54:59Z","lastAt":"2012-06-28T23:39:15Z","messageCount":15,"participants":["Chris Webb","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"194372","messageId":"20120627205459.GC11498@arachsys.com","threadId":"30919","inReplyTo":null,"subject":"A handful of help-related patches","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2012-06-27T20:54:59Z","receivedAt":"2012-06-27T20:54:59Z","isPatch":false,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Whilst looking at git-rebase, I noticed I have a few local git --help\nrelated patches from a couple of years ago that I use on my own systems.\n\nI'm not sure whether they're just personal quirks, but I thought I should\npost them to the list in case they're of wider interest or might be relevant\nupstream.\n\nThe first two patches allow the HTML path used by git-help --web to be set\nin .gitconfig, and allow it to be a URL prefix, so you can do\n\n  [help]\n    format = html\n    htmlpath = http://git-scm.com/docs\n\ngit wibble --help will then open http://git-scm.com/docs/git-wibble.html\ninstead of /share/doc/git/html/git-wibble.html in your browser.\n\nThe third patch adds a help format called 'usage' making git wibble --help\nequivalent to git wibble -h, i.e. printing short command-line usage\ninformation. (Generally that's what I want and I end up rather surprised\nwhen I get an unwanted man page because my fingers are trained to type the\nmore universal --help rather than -h.)\n\nThis 'usage' help format is also good for making --help do something useful\nother than produce an error message on our cut-down servers without man\npages, web browsers and so on.\n\nBest wishes,\n\nChris.\n"},{"id":"194374","messageId":"8d3c71d21710c66e4d5560cec958552b69a22338.1340830514.git.chris@arachsys.com","threadId":"30919","inReplyTo":"20120627205459.GC11498@arachsys.com","subject":"[PATCH 1/3] Add config variable to set HTML path for git-help --web","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2012-06-27T20:55:12Z","receivedAt":"2012-06-27T20:55:12Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"If set in git-config, help.htmlpath overrides system_path(GIT_HTML_PATH)\nwhich was compiled in. This allows users to repoint system-wide git at\ntheir own copy of the documentation without recompiling.\n\nSigned-off-by: Chris Webb <chris@arachsys.com>\n---\n builtin/help.c |   11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)\n\ndiff --git a/builtin/help.c b/builtin/help.c\nindex 8f9cd60..b467db2 100644\n--- a/builtin/help.c\n+++ b/builtin/help.c\n@@ -34,6 +34,8 @@ enum help_format {\n \tHELP_FORMAT_WEB\n };\n \n+static char *html_path = NULL;\n+\n static int show_all = 0;\n static unsigned int colopts;\n static enum help_format help_format = HELP_FORMAT_NONE;\n@@ -265,6 +267,12 @@ static int git_help_config(const char *var, const char *value, void *cb)\n \t\thelp_format = parse_help_format(value);\n \t\treturn 0;\n \t}\n+\tif (!strcmp(var, \"help.htmlpath\")) {\n+\t\tif (!value)\n+\t\t\treturn config_error_nonbool(var);\n+\t\thtml_path = xstrdup(value);\n+\t\treturn 0;\n+\t}\n \tif (!strcmp(var, \"man.viewer\")) {\n \t\tif (!value)\n \t\t\treturn config_error_nonbool(var);\n@@ -387,7 +395,8 @@ static void show_info_page(const char *git_cmd)\n static void get_html_page_path(struct strbuf *page_path, const char *page)\n {\n \tstruct stat st;\n-\tconst char *html_path = system_path(GIT_HTML_PATH);\n+\tif (!html_path)\n+\t\thtml_path = system_path(GIT_HTML_PATH);\n \n \t/* Check that we have a git documentation directory. */\n \tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n-- \n1.7.10\n"},{"id":"194375","messageId":"233b27a14d16a2a1cb38b9f3e07a3a79b09a3256.1340830514.git.chris@arachsys.com","threadId":"30919","inReplyTo":"20120627205459.GC11498@arachsys.com","subject":"[PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2012-06-27T20:55:13Z","receivedAt":"2012-06-27T20:55:13Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Setting this to a URL prefix instead of a path to a local directory allows\ngit-help --web to work even when HTML docs aren't locally installed, by\npointing the browser at a copy accessible on the web. For example,\n\n    [help]\n      format = html\n      htmlpath = http://git-scm.com/docs\n\nwill use the publicly available documentation on the git homepage.\n\nSigned-off-by: Chris Webb <chris@arachsys.com>\n---\n builtin/help.c |    8 +++++---\n 1 file changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/help.c b/builtin/help.c\nindex b467db2..60b3251 100644\n--- a/builtin/help.c\n+++ b/builtin/help.c\n@@ -399,9 +399,11 @@ static void get_html_page_path(struct strbuf *page_path, const char *page)\n \t\thtml_path = system_path(GIT_HTML_PATH);\n \n \t/* Check that we have a git documentation directory. */\n-\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n-\t    || !S_ISREG(st.st_mode))\n-\t\tdie(_(\"'%s': not a documentation directory.\"), html_path);\n+\tif (prefixcmp(html_path, \"http:\")) {\n+\t\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n+\t\t\t\t|| !S_ISREG(st.st_mode))\n+\t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n+\t}\n \n \tstrbuf_init(page_path, 0);\n \tstrbuf_addf(page_path, \"%s/%s.html\", html_path, page);\n-- \n1.7.10\n"},{"id":"194373","messageId":"d568dccf0563742181269aa9a675b3c87d54ef01.1340830514.git.chris@arachsys.com","threadId":"30919","inReplyTo":"20120627205459.GC11498@arachsys.com","subject":"[PATCH 3/3] Add a help format 'usage' to provide brief command usage","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2012-06-27T20:55:14Z","receivedAt":"2012-06-27T20:55:14Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Configuring the new help.format = usage makes git foo --help exactly\nequivalent to git foo -h, displaying brief command-line usage info\ninstead of full documentation in the form of a man/html page.\n\nThis is useful on stripped-down servers where man pages and viewer\naren't present, or if your fingers are trained to type COMMAND --help\ninstead of COMMAND -h to get usage info and the man page behaviour is\ndisturbing.\n\nSigned-off-by: Chris Webb <chris@arachsys.com>\n---\n builtin/help.c |   16 ++++++++++++++--\n 1 file changed, 14 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/help.c b/builtin/help.c\nindex 60b3251..d4c3f5d 100644\n--- a/builtin/help.c\n+++ b/builtin/help.c\n@@ -31,7 +31,8 @@ enum help_format {\n \tHELP_FORMAT_NONE,\n \tHELP_FORMAT_MAN,\n \tHELP_FORMAT_INFO,\n-\tHELP_FORMAT_WEB\n+\tHELP_FORMAT_WEB,\n+\tHELP_FORMAT_USAGE\n };\n \n static char *html_path = NULL;\n@@ -46,11 +47,12 @@ static struct option builtin_help_options[] = {\n \t\t\tHELP_FORMAT_WEB),\n \tOPT_SET_INT('i', \"info\", &help_format, \"show info page\",\n \t\t\tHELP_FORMAT_INFO),\n+\tOPT_SET_INT('u', \"usage\", &help_format, \"show usage\", HELP_FORMAT_USAGE),\n \tOPT_END(),\n };\n \n static const char * const builtin_help_usage[] = {\n-\t\"git help [--all] [--man|--web|--info] [command]\",\n+\t\"git help [--all] [--man|--web|--info|--usage] [command]\",\n \tNULL\n };\n \n@@ -62,6 +64,8 @@ static enum help_format parse_help_format(const char *format)\n \t\treturn HELP_FORMAT_INFO;\n \tif (!strcmp(format, \"web\") || !strcmp(format, \"html\"))\n \t\treturn HELP_FORMAT_WEB;\n+\tif (!strcmp(format, \"usage\"))\n+\t\treturn HELP_FORMAT_USAGE;\n \tdie(_(\"unrecognized help format '%s'\"), format);\n }\n \n@@ -431,6 +435,11 @@ static void show_html_page(const char *git_cmd)\n \topen_html(page_path.buf);\n }\n \n+static void show_usage(const char *git_cmd)\n+{\n+\texecl_git_cmd(git_cmd, \"-h\", NULL);\n+}\n+\n int cmd_help(int argc, const char **argv, const char *prefix)\n {\n \tint nongit;\n@@ -482,6 +491,9 @@ int cmd_help(int argc, const char **argv, const char *prefix)\n \tcase HELP_FORMAT_WEB:\n \t\tshow_html_page(argv[0]);\n \t\tbreak;\n+\tcase HELP_FORMAT_USAGE:\n+\t\tshow_usage(argv[0]);\n+\t\tbreak;\n \t}\n \n \treturn 0;\n-- \n1.7.10\n"},{"id":"194378","messageId":"20120627210502.GB2292@sigill.intra.peff.net","threadId":"30919","inReplyTo":"233b27a14d16a2a1cb38b9f3e07a3a79b09a3256.1340830514.git.chris@arachsys.com","subject":"Re: [PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-06-27T21:05:02Z","receivedAt":"2012-06-27T21:05:02Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jun 27, 2012 at 09:55:13PM +0100, Chris Webb wrote:\n\n> Setting this to a URL prefix instead of a path to a local directory allows\n> git-help --web to work even when HTML docs aren't locally installed, by\n> pointing the browser at a copy accessible on the web. For example,\n> \n>     [help]\n>       format = html\n>       htmlpath = http://git-scm.com/docs\n> \n> will use the publicly available documentation on the git homepage.\n\nNice.\n\n>  \t/* Check that we have a git documentation directory. */\n> -\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n> -\t    || !S_ISREG(st.st_mode))\n> -\t\tdie(_(\"'%s': not a documentation directory.\"), html_path);\n> +\tif (prefixcmp(html_path, \"http:\")) {\n> +\t\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n> +\t\t\t\t|| !S_ISREG(st.st_mode))\n> +\t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n> +\t}\n\nI'd rather not tie this directly to http. Is there any reason not to\nallow https, for example? Can we maybe just look for strstr(\"://\")\ninstead? That's the same magic we use to differentiate URLs from paths\nwhen looking for repositories.\n\n-Peff\n"},{"id":"194380","messageId":"20120627211219.GD11498@arachsys.com","threadId":"30919","inReplyTo":"20120627210502.GB2292@sigill.intra.peff.net","subject":"Re: [PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2012-06-27T21:12:20Z","receivedAt":"2012-06-27T21:12:20Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> >  \t/* Check that we have a git documentation directory. */\n> > -\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n> > -\t    || !S_ISREG(st.st_mode))\n> > -\t\tdie(_(\"'%s': not a documentation directory.\"), html_path);\n> > +\tif (prefixcmp(html_path, \"http:\")) {\n> > +\t\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n> > +\t\t\t\t|| !S_ISREG(st.st_mode))\n> > +\t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n> > +\t}\n> \n> I'd rather not tie this directly to http. Is there any reason not to\n> allow https, for example? Can we maybe just look for strstr(\"://\")\n> instead? That's the same magic we use to differentiate URLs from paths\n> when looking for repositories.\n\nThanks, that's a much better heuristic! I'll use !strstr(html_path, \"://\")\nin a re-roll. You're quite right, this ought to also allow https://, ftp://,\netc.\n\nBest wishes,\n\nChris.\n"},{"id":"194384","messageId":"7vbok4785a.fsf@alter.siamese.dyndns.org","threadId":"30919","inReplyTo":"20120627210502.GB2292@sigill.intra.peff.net","subject":"Re: [PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-06-27T21:32:49Z","receivedAt":"2012-06-27T21:32:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Wed, Jun 27, 2012 at 09:55:13PM +0100, Chris Webb wrote:\n>\n>> Setting this to a URL prefix instead of a path to a local directory allows\n>> git-help --web to work even when HTML docs aren't locally installed, by\n>> pointing the browser at a copy accessible on the web. For example,\n>> \n>>     [help]\n>>       format = html\n>>       htmlpath = http://git-scm.com/docs\n>> \n>> will use the publicly available documentation on the git homepage.\n>\n> Nice.\n>\n>>  \t/* Check that we have a git documentation directory. */\n>> -\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n>> -\t    || !S_ISREG(st.st_mode))\n>> -\t\tdie(_(\"'%s': not a documentation directory.\"), html_path);\n>> +\tif (prefixcmp(html_path, \"http:\")) {\n>> +\t\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n>> +\t\t\t\t|| !S_ISREG(st.st_mode))\n>> +\t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n>> +\t}\n>\n> I'd rather not tie this directly to http. Is there any reason not to\n> allow https, for example? Can we maybe just look for strstr(\"://\")\n> instead? That's the same magic we use to differentiate URLs from paths\n> when looking for repositories.\n\nOne part of me says \"any non-standard html-path should be sent to\nthe browser\".  Another part of me says \"what if network is\nunavailable?  Wouldn't it be nice to fall back to use the local\ncopy?\"\n\nAnd a small voice in me responds to the latter with \"If you have a\nlocal copy anyway, why would you want to go to the network even if\nyou could?\"\n\nWhich leads me to conclude that it is the right thing to do if\nhtml_path came from the configuration, not from the compiled-in\ndefault, to always ask browser to do its thing, and let it fail if\nit has to fail---it is not Git's problem anymore at that point.\n\nIt also is the simplest.\n"},{"id":"194386","messageId":"20120627214120.GE11498@arachsys.com","threadId":"30919","inReplyTo":"7vbok4785a.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2012-06-27T21:41:21Z","receivedAt":"2012-06-27T21:41:21Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Which leads me to conclude that it is the right thing to do if\n> html_path came from the configuration, not from the compiled-in\n> default, to always ask browser to do its thing, and let it fail if\n> it has to fail---it is not Git's problem anymore at that point.\n>\n> It also is the simplest.\n\nYes, indeed! Okay, I'll re-roll it that way and go for the super-simple\napproach.\n\nCheers,\n\nChris.\n"},{"id":"194390","messageId":"20120627221106.GE2292@sigill.intra.peff.net","threadId":"30919","inReplyTo":"7vbok4785a.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-06-27T22:11:07Z","receivedAt":"2012-06-27T22:11:07Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jun 27, 2012 at 02:32:49PM -0700, Junio C Hamano wrote:\n\n> >>  \t/* Check that we have a git documentation directory. */\n> >> -\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n> >> -\t    || !S_ISREG(st.st_mode))\n> >> -\t\tdie(_(\"'%s': not a documentation directory.\"), html_path);\n> >> +\tif (prefixcmp(html_path, \"http:\")) {\n> >> +\t\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n> >> +\t\t\t\t|| !S_ISREG(st.st_mode))\n> >> +\t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n> >> +\t}\n> >\n> > I'd rather not tie this directly to http. Is there any reason not to\n> > allow https, for example? Can we maybe just look for strstr(\"://\")\n> > instead? That's the same magic we use to differentiate URLs from paths\n> > when looking for repositories.\n> \n> One part of me says \"any non-standard html-path should be sent to\n> the browser\".  Another part of me says \"what if network is\n> unavailable?  Wouldn't it be nice to fall back to use the local\n> copy?\"\n\nFallback might be nice, but I really don't want to get into interpreting\nwhat URLs mean or whether the network is up.\n\n> And a small voice in me responds to the latter with \"If you have a\n> local copy anyway, why would you want to go to the network even if\n> you could?\"\n\nOne reason is that the network version may contain more information (for\nexample, the git-scm.com versions give you links to related articles,\nand also tell you in which versions the documentation changed).\n\nSpeaking of versions, this patch is not sufficient to actually point the\nbrowser to the correct version at a site like git-scm.com. We could add\nsome kind of strbuf_expand magic like \"http://git-scm.com/%c/%v\" or\nsomething like that (where %c is the command and %v is the git version).\nBut that is probably over-engineering.\n\n> Which leads me to conclude that it is the right thing to do if\n> html_path came from the configuration, not from the compiled-in\n> default, to always ask browser to do its thing, and let it fail if\n> it has to fail---it is not Git's problem anymore at that point.\n\nI don't know that configured vs compiled-in is the right distinction\nthere, though. If I'm building a minimal git for a stripped-down machine\nand I don't want to include the HTML pages locally, I might want to set\nthe html path to a URL at build-time. That saves each user from having\nto configure it.\n\n-Peff\n"},{"id":"194392","messageId":"20120627221938.GA1742@arachsys.com","threadId":"30919","inReplyTo":"20120627221106.GE2292@sigill.intra.peff.net","subject":"Re: [PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2012-06-27T22:19:39Z","receivedAt":"2012-06-27T22:19:39Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> I don't know that configured vs compiled-in is the right distinction\n> there, though. If I'm building a minimal git for a stripped-down machine\n> and I don't want to include the HTML pages locally, I might want to set\n> the html path to a URL at build-time. That saves each user from having\n> to configure it.\n\nHow about only testing for a git documentation directory if both\nhelp.htmlpath isn't set (so we're using the compiled-in version) and the\ncompiled-in version doesn't contain ://?\n\nBest wishes,\n\nChris.\n"},{"id":"194395","messageId":"20120627225248.GB27566@sigill.intra.peff.net","threadId":"30919","inReplyTo":"20120627221938.GA1742@arachsys.com","subject":"Re: [PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-06-27T22:52:49Z","receivedAt":"2012-06-27T22:52:49Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jun 27, 2012 at 11:19:39PM +0100, Chris Webb wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > I don't know that configured vs compiled-in is the right distinction\n> > there, though. If I'm building a minimal git for a stripped-down machine\n> > and I don't want to include the HTML pages locally, I might want to set\n> > the html path to a URL at build-time. That saves each user from having\n> > to configure it.\n> \n> How about only testing for a git documentation directory if both\n> help.htmlpath isn't set (so we're using the compiled-in version) and the\n> compiled-in version doesn't contain ://?\n\nThat just seems needlessly complex. Why not just check for \"://\" and be\ndone?\n\nLet's take a step back for a moment. Why is that check even there? You\ncan always just hand the path (or URL, or whatever) to the browser\ncommand and hope it can make sense of it. If it can't, it will give you\nan error.\n\nI think the check is purely about being slightly nicer when there are no\nHTML docs at all (e.g., because you didn't bother building them, or your\nbinary distribution didn't include them). If your browser is graphical,\nwe'll spawn it with a bogus URL, and the error message will be in some\nwindow elsewhere on your desktop. Git will happily exit without a\nfurther message. By adding in that check, we can detect that situation\nand produce an error message immediately.\n\nSo one solution would be to simply remove the check entirely. It was a\nslight nicety in some situations, but expanding the definition of the\nHTML path to include full URLs means we can no longer accurately\ndetermine what exists and what does not. So we can just stop trying and\nlet the browser handle it completely.\n\nAnother option would be to introduce a new \"net\" type of help format\nwhich accepts a URL instead of a path. That would leave the existing\ncode-path untouched. But it does seem needlessly complex, as it would do\nmore or less the same thing as the \"html\" format.\n\n-Peff\n"},{"id":"194398","messageId":"7vwr2s5f9v.fsf@alter.siamese.dyndns.org","threadId":"30919","inReplyTo":"20120627225248.GB27566@sigill.intra.peff.net","subject":"Re: [PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-06-28T02:41:48Z","receivedAt":"2012-06-28T02:41:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> So one solution would be to simply remove the check entirely. It was a\n> slight nicety in some situations, but expanding the definition of the\n> HTML path to include full URLs means we can no longer accurately\n> determine what exists and what does not. So we can just stop trying and\n> let the browser handle it completely.\n\nThis, and \"://\", both sound sensible.\n\n> Another option would be to introduce a new \"net\" type of help format\n> which accepts a URL instead of a path. That would leave the existing\n> code-path untouched. But it does seem needlessly complex, as it would do\n> more or less the same thing as the \"html\" format.\n\nYeah, that does not sound like a good reason to have such a complex\nscheme.\n\nThanks.\n"},{"id":"194401","messageId":"20120628065623.GB1742@arachsys.com","threadId":"30919","inReplyTo":"7vwr2s5f9v.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2012-06-28T06:56:23Z","receivedAt":"2012-06-28T06:56:23Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Wed, Jun 27, 2012 at 11:19:39PM +0100, Chris Webb wrote:\n> \n> > How about only testing for a git documentation directory if both\n> > help.htmlpath isn't set (so we're using the compiled-in version) and the\n> > compiled-in version doesn't contain ://?\n> \n> That just seems needlessly complex. Why not just check for \"://\" and be\n> done?\n[...]\n> So one solution would be to simply remove the check entirely. It was a\n> slight nicety in some situations, but expanding the definition of the\n> HTML path to include full URLs means we can no longer accurately\n> determine what exists and what does not. So we can just stop trying and\n> let the browser handle it completely.\n\nJunio C Hamano <gitster@pobox.com> writes:\n\n> This, and \"://\", both sound sensible.\n\nI have no real preference between any of the suggestions so far: they'd all\nbe completely fine with me. Peff's :// test for a URL is much better than my\nhttp: prefix, so should replace the latter if we need a test at all, but\napart from that I don't mind at all.\n\nOkay, I'll re-send now the :// version I did in response to Peff's first\nemail purely on the basis that it doesn't change the behaviour at all for\nexisting users who don't set htmlpath at all, plus it's already sat in my\nreflog!\n\nHowever, if you'd both prefer a version in which I just take the check out\naltogether, let me know and I'll spin that instead.\n\nCheers,\n\nChris.\n"},{"id":"194411","messageId":"20120628175041.GA4731@sigill.intra.peff.net","threadId":"30919","inReplyTo":"20120628065623.GB1742@arachsys.com","subject":"Re: [PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-06-28T17:50:41Z","receivedAt":"2012-06-28T17:50:41Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jun 28, 2012 at 07:56:23AM +0100, Chris Webb wrote:\n\n> > This, and \"://\", both sound sensible.\n> \n> I have no real preference between any of the suggestions so far: they'd all\n> be completely fine with me. Peff's :// test for a URL is much better than my\n> http: prefix, so should replace the latter if we need a test at all, but\n> apart from that I don't mind at all.\n> \n> Okay, I'll re-send now the :// version I did in response to Peff's first\n> email purely on the basis that it doesn't change the behaviour at all for\n> existing users who don't set htmlpath at all, plus it's already sat in my\n> reflog!\n\nI think the \"://\" one is my preference. I just looked over your v3\nseries, and the patches look good to me.\n\n-Peff\n"},{"id":"194422","messageId":"20120628233915.GB2765@arachsys.com","threadId":"30919","inReplyTo":"20120628175041.GA4731@sigill.intra.peff.net","subject":"Re: [PATCH 2/3] Allow help.htmlpath to be an http: URL","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2012-06-28T23:39:15Z","receivedAt":"2012-06-28T23:39:15Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> I think the \"://\" one is my preference. I just looked over your v3\n> series, and the patches look good to me.\n\nThanks, and thanks for suggesting the much nicer :// heuristic.\n\nBest wishes,\n\nChris.\n"}]}