{"thread":{"id":"4961","subject":"[PATCH 3/4] gitweb.cgi: Show \"raw\" head of project link even when $hash is not defined","startedAt":"2006-07-23T20:30:08Z","lastAt":"2006-07-23T20:30:08Z","messageCount":1,"participants":["Luben Tuikov"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"24023","messageId":"20060723203008.94485.qmail@web31805.mail.mud.yahoo.com","threadId":"4961","inReplyTo":null,"subject":"[PATCH 3/4] gitweb.cgi: Show \"raw\" head of project link even when $hash is not defined","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-07-23T20:30:08Z","receivedAt":"2006-07-23T20:30:08Z","isPatch":true,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"Some callers of git_history() do not set $hash of $file_name.\nAdd code to find it, if it is not defined.\n\nSigned-off-by: Luben Tuikov <ltuikov@yahoo.com>\n---\n gitweb/gitweb.cgi |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi\nindex 7a61de4..c04283b 100755\n--- a/gitweb/gitweb.cgi\n+++ b/gitweb/gitweb.cgi\n@@ -2326,7 +2326,9 @@ sub git_history {\n \tprint \"<div>\\n\" .\n \t      $cgi->a({-href => \"$my_uri?\" . esc_param(\"p=$project;a=commit;h=$hash_base\"), -class => \"title\"}, esc_html($co{'title'})) . \"\\n\" .\n \t      \"</div>\\n\";\n+\tif (!defined $hash && defined $file_name) {\n+\t\t$hash = git_get_hash_by_path($hash_base, $file_name);\n+\t}\n \tif (defined $hash) {\n \t\tmy $ftype = git_get_type($hash);\n \n-- \n1.4.2.rc1.g9b54\n\n"}]}