{"thread":{"id":"11287","subject":"git-browse-help?","startedAt":"2007-12-14T09:28:30Z","lastAt":"2007-12-16T07:21:04Z","messageCount":9,"participants":["Jeff King","Junio C Hamano","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"63133","messageId":"20071214092829.GA22725@coredump.intra.peff.net","threadId":"11287","inReplyTo":null,"subject":"git-browse-help?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-12-14T09:28:30Z","receivedAt":"2007-12-14T09:28:30Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The new 'git-browse-help' seems to purely be a helper script for \"git\nhelp\" (judging from the commit messages and the lack of documentation).\nShould it perhaps be \"git--browse-help\" or \"git-help--browse\" to follow\nour \"this is not for users\" convention (see add--interactive,\nfetch--tool, and rebase--interactive).\n\nI became aware of it because \"br\" used to tab-complete \"branch\" but now\ndoesn't. :) And if we're going to change it, pre-1.5.4 is the time.\n\n-Peff\n"},{"id":"63181","messageId":"7vtzmlrxc2.fsf@gitster.siamese.dyndns.org","threadId":"11287","inReplyTo":"20071214092829.GA22725@coredump.intra.peff.net","subject":"Re: git-browse-help?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-14T17:38:05Z","receivedAt":"2007-12-14T17:38:05Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> The new 'git-browse-help' seems to purely be a helper script for \"git\n> help\" (judging from the commit messages and the lack of documentation).\n> Should it perhaps be \"git--browse-help\" or \"git-help--browse\" to follow\n> our \"this is not for users\" convention (see add--interactive,\n> fetch--tool, and rebase--interactive).\n>\n> I became aware of it because \"br\" used to tab-complete \"branch\" but now\n> doesn't. :) And if we're going to change it, pre-1.5.4 is the time.\n\nGood eyes and a sensible argument.  Go wild.\n"},{"id":"63241","messageId":"20071215100811.GA1692@coredump.intra.peff.net","threadId":"11287","inReplyTo":"7vtzmlrxc2.fsf@gitster.siamese.dyndns.org","subject":"Re: git-browse-help?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-12-15T10:08:11Z","receivedAt":"2007-12-15T10:08:11Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Dec 14, 2007 at 09:38:05AM -0800, Junio C Hamano wrote:\n\n> > Should it perhaps be \"git--browse-help\" or \"git-help--browse\" to follow\n> Good eyes and a sensible argument.  Go wild.\n\nLooks like you beat me to it. Thanks.\n\n-Peff\n"},{"id":"63243","messageId":"20071215110153.GA3447@coredump.intra.peff.net","threadId":"11287","inReplyTo":"20071215100811.GA1692@coredump.intra.peff.net","subject":"Re: git-browse-help?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-12-15T11:01:53Z","receivedAt":"2007-12-15T11:01:53Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Dec 15, 2007 at 05:08:11AM -0500, Jeff King wrote:\n\n> On Fri, Dec 14, 2007 at 09:38:05AM -0800, Junio C Hamano wrote:\n> \n> > > Should it perhaps be \"git--browse-help\" or \"git-help--browse\" to follow\n> > Good eyes and a sensible argument.  Go wild.\n> \n> Looks like you beat me to it. Thanks.\n\nAlthough I would have called it \"git-help--browse\" rather than\n\"git-browse--help\" since\n\n  a) it is related to \"git help\", not \"git browse\"\n  b) there is no tab completion conflict with git-he, but there is with\n     git-br. :) This is of course because I am using the file\n     completion, but the programmable bash completion has the same\n     problem. Shawn, perhaps it should simply ignore *--* as plumbing?\n\nI can prepare a patch if \"git-help--browse\" makes more sense.\n\n-Peff\n"},{"id":"63245","messageId":"20071215111154.GB3447@coredump.intra.peff.net","threadId":"11287","inReplyTo":"20071215110153.GA3447@coredump.intra.peff.net","subject":"Re: git-browse-help?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-12-15T11:11:54Z","receivedAt":"2007-12-15T11:11:54Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Dec 15, 2007 at 06:01:53AM -0500, Jeff King wrote:\n\n>      problem. Shawn, perhaps it should simply ignore *--* as plumbing?\n\nAnd here is a patch to do that.\n\n-- >8 --\nteach bash completion to treat commands with \"--\" as plumbing\n\nThere is a convention that commands containing a double-dash\nare implementation details and not to be used by mortals. We\nshould automatically remove them from the completion\nsuggestions as plumbing.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nBTW, Junio, I remember discussion a long time ago about doing:\n\n  cover letter\n  -- >8 --\n  commit\n  ---\n  diff\n\nversus\n\n  commit\n  ---\n  cover letter\n  diff\n\nand I recall that you did not have a strong preference. I have started\nusing the former, as I find it a bit more convenient to write (and I\nthink it is more readable when you are following up a discussion rather\nthan writing a real cover letter or commenting on the patch). However,\nI wanted to confirm that you don't find it significantly more annoying.\n\n contrib/completion/git-completion.bash |    3 +--\n 1 files changed, 1 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 58e0e53..2fd32db 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -291,7 +291,7 @@ __git_commands ()\n \tfor i in $(git help -a|egrep '^ ')\n \tdo\n \t\tcase $i in\n-\t\tadd--interactive) : plumbing;;\n+\t\t*--*)             : plumbing pattern;;\n \t\tapplymbox)        : ask gittus;;\n \t\tapplypatch)       : ask gittus;;\n \t\tarchimport)       : import;;\n@@ -308,7 +308,6 @@ __git_commands ()\n \t\tdiff-tree)        : plumbing;;\n \t\tfast-import)      : import;;\n \t\tfsck-objects)     : plumbing;;\n-\t\tfetch--tool)      : plumbing;;\n \t\tfetch-pack)       : plumbing;;\n \t\tfmt-merge-msg)    : plumbing;;\n \t\tfor-each-ref)     : plumbing;;\n-- \n1.5.4.rc0.1124.g1b66f-dirty\n"},{"id":"63268","messageId":"7vhcijn4jc.fsf@gitster.siamese.dyndns.org","threadId":"11287","inReplyTo":"20071215111154.GB3447@coredump.intra.peff.net","subject":"Re: git-browse-help?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-15T19:25:59Z","receivedAt":"2007-12-15T19:25:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> BTW, Junio, I remember discussion a long time ago about doing:\n>\n>   cover letter\n>   -- >8 --\n>   commit\n>   ---\n>   diff\n>\n> versus\n>\n>   commit\n>   ---\n>   cover letter\n>   diff\n>\n> and I recall that you did not have a strong preference. I have started\n> using the former, as I find it a bit more convenient to write (and I\n> think it is more readable when you are following up a discussion rather\n> than writing a real cover letter or commenting on the patch).\n\nYeah, and it is not too inconvenient to trim it off if you use \"am -i\"\nor \"commit --amend\".  An added bonus is unlike the \"top-post\" style, the\ncover material is available when editing the final log message, so I\nactually slightly prefer \"cover -- >8 -- log --- patch\" myself.\n"},{"id":"63269","messageId":"7vabobn4i3.fsf@gitster.siamese.dyndns.org","threadId":"11287","inReplyTo":"20071215110153.GA3447@coredump.intra.peff.net","subject":"Re: git-browse-help?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-15T19:26:44Z","receivedAt":"2007-12-15T19:26:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> Although I would have called it \"git-help--browse\" rather than\n> \"git-browse--help\" since\n\nGood point.\n"},{"id":"63281","messageId":"20071215222518.GL14735@spearce.org","threadId":"11287","inReplyTo":"20071215111154.GB3447@coredump.intra.peff.net","subject":"Re: git-browse-help?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-12-15T22:25:18Z","receivedAt":"2007-12-15T22:25:18Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jeff King <peff@peff.net> wrote:\n> -- >8 --\n> teach bash completion to treat commands with \"--\" as plumbing\n> \n> There is a convention that commands containing a double-dash\n> are implementation details and not to be used by mortals. We\n> should automatically remove them from the completion\n> suggestions as plumbing.\n> \n> Signed-off-by: Jeff King <peff@peff.net>\n\nAcked-by: Shawn O. Pearce <spearce@spearce.org>\n\n\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 58e0e53..2fd32db 100755\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -291,7 +291,7 @@ __git_commands ()\n>  \tfor i in $(git help -a|egrep '^ ')\n>  \tdo\n>  \t\tcase $i in\n> -\t\tadd--interactive) : plumbing;;\n> +\t\t*--*)             : plumbing pattern;;\n>  \t\tapplymbox)        : ask gittus;;\n>  \t\tapplypatch)       : ask gittus;;\n>  \t\tarchimport)       : import;;\n> @@ -308,7 +308,6 @@ __git_commands ()\n>  \t\tdiff-tree)        : plumbing;;\n>  \t\tfast-import)      : import;;\n>  \t\tfsck-objects)     : plumbing;;\n> -\t\tfetch--tool)      : plumbing;;\n>  \t\tfetch-pack)       : plumbing;;\n>  \t\tfmt-merge-msg)    : plumbing;;\n>  \t\tfor-each-ref)     : plumbing;;\n\n-- \nShawn.\n"},{"id":"63303","messageId":"20071216072104.GA4892@sigill.intra.peff.net","threadId":"11287","inReplyTo":"7vabobn4i3.fsf@gitster.siamese.dyndns.org","subject":"Re: git-browse-help?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-12-16T07:21:04Z","receivedAt":"2007-12-16T07:21:04Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Dec 15, 2007 at 11:26:44AM -0800, Junio C Hamano wrote:\n\n> > Although I would have called it \"git-help--browse\" rather than\n> > \"git-browse--help\" since\n> \n> Good point.\n\nAnd here is the patch (I based the change-sites off of the ones in your\nprevious patch, plus a grep to double-check).\n\n-- >8 --\nrename git-browse--help to git-help--browse\n\nThe convention for helper scripts has been\ngit-$TOOL--$HELPER. Since this is a \"browse\" helper for the\n\"help\" tool, git-help--browse is a more sensible name.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n .gitignore                                 |    2 +-\n Documentation/git-help.txt                 |    4 ++--\n Makefile                                   |    2 +-\n git-browse--help.sh => git-help--browse.sh |    0 \n help.c                                     |    2 +-\n 5 files changed, 5 insertions(+), 5 deletions(-)\n rename git-browse--help.sh => git-help--browse.sh (100%)\n\ndiff --git a/.gitignore b/.gitignore\nindex aef01c5..dab5bc2 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -12,7 +12,6 @@ git-archive\n git-bisect\n git-blame\n git-branch\n-git-browse--help\n git-bundle\n git-cat-file\n git-check-attr\n@@ -52,6 +51,7 @@ git-gc\n git-get-tar-commit-id\n git-grep\n git-hash-object\n+git-help--browse\n git-http-fetch\n git-http-push\n git-imap-send\ndiff --git a/Documentation/git-help.txt b/Documentation/git-help.txt\nindex 8cd69e7..da3f718 100644\n--- a/Documentation/git-help.txt\n+++ b/Documentation/git-help.txt\n@@ -47,13 +47,13 @@ OPTIONS\n +\n The web browser can be specified using the configuration variable\n 'help.browser', or 'web.browser' if the former is not set. If none of\n-these config variables is set, the 'git-browse--help' helper script\n+these config variables is set, the 'git-help--browse' helper script\n (called by 'git-help') will pick a suitable default.\n +\n You can explicitly provide a full path to your prefered browser by\n setting the configuration variable 'browser.<tool>.path'. For example,\n you can configure the absolute path to firefox by setting\n-'browser.firefox.path'. Otherwise, 'git-browse--help' assumes the tool\n+'browser.firefox.path'. Otherwise, 'git-help--browse' assumes the tool\n is available in PATH.\n +\n Note that the script tries, as much as possible, to display the HTML\ndiff --git a/Makefile b/Makefile\nindex 62f1893..7776077 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -227,7 +227,7 @@ SCRIPT_SH = \\\n \tgit-lost-found.sh git-quiltimport.sh git-submodule.sh \\\n \tgit-filter-branch.sh \\\n \tgit-stash.sh \\\n-\tgit-browse--help.sh\n+\tgit-help--browse.sh\n \n SCRIPT_PERL = \\\n \tgit-add--interactive.perl \\\ndiff --git a/git-browse--help.sh b/git-help--browse.sh\nsimilarity index 100%\nrename from git-browse--help.sh\nrename to git-help--browse.sh\ndiff --git a/help.c b/help.c\nindex f9ce6db..1302a61 100644\n--- a/help.c\n+++ b/help.c\n@@ -331,7 +331,7 @@ static void show_info_page(const char *git_cmd)\n static void show_html_page(const char *git_cmd)\n {\n \tconst char *page = cmd_to_page(git_cmd);\n-\texecl_git_cmd(\"browse--help\", page, NULL);\n+\texecl_git_cmd(\"help--browse\", page, NULL);\n }\n \n void help_unknown_cmd(const char *cmd)\n-- \n1.5.4.rc0.1122.g899d-dirty\n"}]}