From: Luben Tuikov <ltuikov@yahoo.com>
To: git@vger.kernel.org
Subject: [PATCH 3/4] gitweb.cgi: Show "raw" head of project link even when $hash is not defined
Date: Sun, 23 Jul 2006 13:30:08 -0700 (PDT) [thread overview]
Message-ID: <20060723203008.94485.qmail@web31805.mail.mud.yahoo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 237 bytes --]
Some callers of git_history() do not set $hash of $file_name.
Add code to find it, if it is not defined.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
gitweb/gitweb.cgi | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 963471848-p3.patch --]
[-- Type: text/inline; name="p3.patch", Size: 537 bytes --]
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 7a61de4..c04283b 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -2326,7 +2326,9 @@ sub git_history {
print "<div>\n" .
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$hash_base"), -class => "title"}, esc_html($co{'title'})) . "\n" .
"</div>\n";
+ if (!defined $hash && defined $file_name) {
+ $hash = git_get_hash_by_path($hash_base, $file_name);
+ }
if (defined $hash) {
my $ftype = git_get_type($hash);
--
1.4.2.rc1.g9b54
reply other threads:[~2006-07-23 20:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060723203008.94485.qmail@web31805.mail.mud.yahoo.com \
--to=ltuikov@yahoo.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox