{"thread":{"id":"11220","subject":"Re: [PATCH 0/3] git-help -i (info): finishing touches","startedAt":"2007-12-10T10:06:51Z","lastAt":"2007-12-11T05:27:26Z","messageCount":3,"participants":["Junio C Hamano","Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"62559","messageId":"7v8x42n9s4.fsf@gitster.siamese.dyndns.org","threadId":"11220","inReplyTo":"1197279969-10613-1-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 0/3] git-help -i (info): finishing touches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-10T10:06:51Z","receivedAt":"2007-12-10T10:06:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> This series attempts to add finishing touches to \"git help -i\" (info)\n> support.\n\nSide note.  The patches I sent out are queued for 'next', and I'll push\nit out shortly.  I am hoping, after this series graduates to 'master',\nto be able to tag v1.5.4-rc0 and declare 'master' as feature complete\nfor now, and see everybody move to bugfix-only mode.\n\nCurrently, the man pages are sorted in $(wildcard) order in the main\nmenu, but I think:\n\n * make git(7) the first node after Top;\n\n * order the commands in the main @menu to follow the command-list.txt\n   categorization, and show Porcelains and then Plumbings, just like\n   git(7) does;\n\nwould make the organization better, but I did not do that tonight.  I'd\nleave that as an exercise to interested readers.\n\nI also briefly considered rolling the manual pages into git.info which\nis built from the user manual, but I decided against it for now.  I\nthink the current organization of the user manual is good as a\nstandalone document, and making the manual set as its appendix is\npossible but not necessary.  I can be persuaded differently, though.\n"},{"id":"62650","messageId":"200712110622.51583.chriscool@tuxfamily.org","threadId":"11220","inReplyTo":"7v8x42n9s4.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 0/3] git-help -i (info): finishing touches","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2007-12-11T05:22:51Z","receivedAt":"2007-12-11T05:22:51Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le lundi 10 décembre 2007, Junio C Hamano a écrit :\n> Junio C Hamano <gitster@pobox.com> writes:\n> > This series attempts to add finishing touches to \"git help -i\" (info)\n> > support.\n\nIt looks like the patch series you talk about was not sent to the list.\n\nIn the last patch there is:\n\ndiff --git a/help.c b/help.c\nindex 9d7ad6f..c96b167 100644\n--- a/help.c\n+++ b/help.c\n@@ -286,6 +286,7 @@ static void show_man_page(const char *git_cmd)\n static void show_info_page(const char *git_cmd)\n {\n        const char *page = cmd_to_page(git_cmd);\n+       setenv(\"INFOPATH\", GIT_INFO_PATH, 1);\n        execlp(\"info\", \"info\", \"gitman\", page, NULL);\n }\n\nBut I wonder if something like this would be better:\n\ndiff --git a/help.c b/help.c\nindex c96b167..933d850 100644\n--- a/help.c\n+++ b/help.c\n@@ -255,23 +255,23 @@ static const char *cmd_to_page(const char *git_cmd)\n        }\n }\n\n-static void setup_man_path(void)\n+static void prepend_to_env_path(const char *name, const char *value)\n {\n        struct strbuf new_path;\n-       const char *old_path = getenv(\"MANPATH\");\n+       const char *old_path = getenv(name);\n\n        strbuf_init(&new_path, 0);\n\n        /* We should always put ':' after our path. If there is no\n-        * old_path, the ':' at the end will let 'man' to try\n-        * system-wide paths after ours to find the manual page. If\n+        * old_path, the ':' at the end will let some commands\n+        * like 'man' to try system-wide paths after ours. If\n         * there is old_path, we need ':' as delimiter. */\n-       strbuf_addstr(&new_path, GIT_MAN_PATH);\n+       strbuf_addstr(&new_path, value);\n        strbuf_addch(&new_path, ':');\n        if (old_path)\n                strbuf_addstr(&new_path, old_path);\n\n-       setenv(\"MANPATH\", new_path.buf, 1);\n+       setenv(name, new_path.buf, 1);\n\n        strbuf_release(&new_path);\n }\n@@ -279,14 +279,14 @@ static void setup_man_path(void)\n static void show_man_page(const char *git_cmd)\n {\n        const char *page = cmd_to_page(git_cmd);\n-       setup_man_path();\n+       prepend_to_env_path(\"MANPATH\", GIT_MAN_PATH);\n        execlp(\"man\", \"man\", page, NULL);\n }\n\n static void show_info_page(const char *git_cmd)\n {\n        const char *page = cmd_to_page(git_cmd);\n-       setenv(\"INFOPATH\", GIT_INFO_PATH, 1);\n+       prepend_to_env_path(\"INFOPATH\", GIT_INFO_PATH);\n        execlp(\"info\", \"info\", \"gitman\", page, NULL);\n }\n\nTell me if you want a proper path.\n\nChristian.\n"},{"id":"62653","messageId":"7vprxdhkch.fsf@gitster.siamese.dyndns.org","threadId":"11220","inReplyTo":"200712110622.51583.chriscool@tuxfamily.org","subject":"Re: [PATCH 0/3] git-help -i (info): finishing touches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-11T05:27:26Z","receivedAt":"2007-12-11T05:27:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <chriscool@tuxfamily.org> writes:\n\n> Le lundi 10 décembre 2007, Junio C Hamano a écrit :\n>> Junio C Hamano <gitster@pobox.com> writes:\n>> > This series attempts to add finishing touches to \"git help -i\" (info)\n>> > support.\n>\n> It looks like the patch series you talk about was not sent to the list.\n\nHmph, it appears that there was a misconfiguration on my part to drive\nsend-email.  Look into 'next' branch.\n\n> In the last patch there is:\n>\n> diff --git a/help.c b/help.c\n> index 9d7ad6f..c96b167 100644\n> --- a/help.c\n> +++ b/help.c\n> @@ -286,6 +286,7 @@ static void show_man_page(const char *git_cmd)\n>  static void show_info_page(const char *git_cmd)\n>  {\n>         const char *page = cmd_to_page(git_cmd);\n> +       setenv(\"INFOPATH\", GIT_INFO_PATH, 1);\n>         execlp(\"info\", \"info\", \"gitman\", page, NULL);\n>  }\n>\n> But I wonder if something like this would be better:\n\nI do not think so, as MANPATH has that funky semantics of \"appending the\nsystem path where a single colon separates an empty path component from\nthe rest.\" but I do not think there is anything like that in INFOPATH.\n"}]}