{"thread":{"id":"24664","subject":"Lost in Space","startedAt":"2010-08-07T21:47:13Z","lastAt":"2010-08-17T22:42:06Z","messageCount":3,"participants":["Erick Mattos","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"147399","messageId":"AANLkTikiVQCMKjftWfrKbK-K+Gv45CTunxjULGc1==Zb@mail.gmail.com","threadId":"24664","inReplyTo":null,"subject":"Lost in Space","fromName":"Erick Mattos","fromEmail":"erick.mattos@gmail.com","sentAt":"2010-08-07T21:47:13Z","receivedAt":"2010-08-07T21:47:13Z","isPatch":false,"sender":{"key":"erick.mattos@gmail.com","avatar":"https://avatars.githubusercontent.com/u/134001?v=4"},"body":"What's up to:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/151402/focus=151414\nhttp://thread.gmane.org/gmane.comp.version-control.git/151440/\n\nR9 knows?  :-)\n"},{"id":"147400","messageId":"20100807215647.GB2969@burratino","threadId":"24664","inReplyTo":"AANLkTikiVQCMKjftWfrKbK-K+Gv45CTunxjULGc1==Zb@mail.gmail.com","subject":"[PATCH v3] gitweb: clarify search results page when no matching commit found","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-07T21:56:47Z","receivedAt":"2010-08-07T21:56:47Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"When searching commits for a string that never occurs, the results\npage looks something like this:\n\n\tprojects / foo.git / search                                 \\o/\n\tsummary | ... | tree          [commit] search: [ kfjdkas ] [ ]re\n\tfirst ⋅ prev ⋅ next\n\n\tMerge branch 'maint'\n\n\tFoo: a demonstration project\n\nWithout a list of hits to compare it to, the header describing the\ncommit named by the hash parameter (usually HEAD) may itself look\nlike a hit.  Add some text (“No match.”) to replace the empty\nlist of hits and avoid this confusion.\n\nWhile at it, remove some nearby dead code, left behind from a\nsimplification a few years ago (v1.5.4-rc0~276^2~4, 2007-11-01).\n\nNoticed-by: Erick Mattos <erick.mattos@gmail.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nAcked-by: Jakub Narebski <jnareb@gmail.com>\n---\nchanges relative to v2[1]:\n - better newline placement in the produced HTML.\n\nErick Mattos wrote:\n\n> What's up to:\n> \n> http://thread.gmane.org/gmane.comp.version-control.git/151402/focus=151414\n\nHopefully third time’s the charm.  Test reports welcome as always.\n\n gitweb/gitweb.perl |    9 +++++----\n 1 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 8b02767..4efeebc 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -6521,12 +6521,13 @@ sub git_search {\n \t\t\t$paging_nav .= \" &sdot; next\";\n \t\t}\n \n-\t\tif ($#commitlist >= 100) {\n-\t\t}\n-\n \t\tgit_print_page_nav('','', $hash,$co{'tree'},$hash, $paging_nav);\n \t\tgit_print_header_div('commit', esc_html($co{'title'}), $hash);\n-\t\tgit_search_grep_body(\\@commitlist, 0, 99, $next_link);\n+\t\tif ($page == 0 && !@commitlist) {\n+\t\t\tprint \"<p>No match.</p>\\n\";\n+\t\t} else {\n+\t\t\tgit_search_grep_body(\\@commitlist, 0, 99, $next_link);\n+\t\t}\n \t}\n \n \tif ($searchtype eq 'pickaxe') {\n-- \n1.7.2.1.544.ga752d.dirty\n"},{"id":"148312","messageId":"AANLkTimqfCAy6N2w_DPvu5KBe6_8L2zrS91R43LP53J4@mail.gmail.com","threadId":"24664","inReplyTo":"AANLkTikiVQCMKjftWfrKbK-K+Gv45CTunxjULGc1==Zb@mail.gmail.com","subject":"Re: Lost in Space","fromName":"Erick Mattos","fromEmail":"erick.mattos@gmail.com","sentAt":"2010-08-17T22:42:06Z","receivedAt":"2010-08-17T22:42:06Z","isPatch":false,"sender":{"key":"erick.mattos@gmail.com","avatar":"https://avatars.githubusercontent.com/u/134001?v=4"},"body":"Hi,\n\n2010/8/7 Jonathan Nieder <jrnieder@gmail.com>\n>\n> When searching commits for a string that never occurs, the results\n> page looks something like this:\n>\n>        projects / foo.git / search                                 \\o/\n>        summary | ... | tree          [commit] search: [ kfjdkas ] [ ]re\n>        first ⋅ prev ⋅ next\n>\n>        Merge branch 'maint'\n>\n>        Foo: a demonstration project\n>\n> Without a list of hits to compare it to, the header describing the\n> commit named by the hash parameter (usually HEAD) may itself look\n> like a hit.  Add some text (“No match.”) to replace the empty\n> list of hits and avoid this confusion.\n>\n> While at it, remove some nearby dead code, left behind from a\n> simplification a few years ago (v1.5.4-rc0~276^2~4, 2007-11-01).\n>\n> Noticed-by: Erick Mattos <erick.mattos@gmail.com>\n> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n> Acked-by: Jakub Narebski <jnareb@gmail.com>\n> ---\n> changes relative to v2[1]:\n>  - better newline placement in the produced HTML.\n>\n> Erick Mattos wrote:\n>\n> > What's up to:\n> >\n> > http://thread.gmane.org/gmane.comp.version-control.git/151402/focus=151414\n>\n> Hopefully third time’s the charm.  Test reports welcome as always.\n\nNice to see this one in not ignored anymore!\n\nBut what about http://thread.gmane.org/gmane.comp.version-control.git/151440/\n ?!?\n\nI am personally not bothered by being ignored but ignoring the fact\nthat without this little patch there is a test which is testing\nnothing and a necessary check which is not being tested is certainly\nnot good at all.\n\nTwo lines can not be so hard to be accepted without a huge hammer and\nso much unpleasant yelling!\n\nPlease let's close this issue.\n\nRegards to all\n"}]}