From: Junio C Hamano Date: Wed, 25 Oct 2006 20:18:06 +0000 (-0700) Subject: Merge branch 'jc/web-blame' X-Git-Tag: v1.4.4-rc1~69 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8e95026f2942c2c485d9686736d861a6477480b5;p=git.git Merge branch 'jc/web-blame' * jc/web-blame: gitweb: spell "blame --porcelain" with -p blame: Document and add help text for -f, -n, and -p gitweb: blame porcelain: lineno and orig lineno swapped Remove git-annotate.perl and create a builtin-alias for git-blame gitweb: use blame --porcelain git-blame --porcelain blame.c: move code to output metainfo into a separate function. git-blame: --show-number (and -n) git-blame: --show-name (and -f) blame.c: whitespace and formatting clean-up. Gitweb - provide site headers and footers gitweb: blame: Mouse-over commit-8 shows author and date gitweb: blame: print commit-8 on the leading row of a commit-block Revert 954a6183756a073723a7c9fd8d2feb13132876b0 gitweb: prepare for repositories with packed refs. gitweb: make leftmost column of blame less cluttered. --- 8e95026f2942c2c485d9686736d861a6477480b5 diff --cc builtin.h index f71b9629b,2c5d900ac..4ac32d778 --- a/builtin.h +++ b/builtin.h @@@ -11,9 -11,9 +11,10 @@@ extern int mailinfo(FILE *in, FILE *out extern int split_mbox(const char **mbox, const char *dir, int allow_bare, int nr_prec, int skip); extern void stripspace(FILE *in, FILE *out); extern int write_tree(unsigned char *sha1, int missing_ok, const char *prefix); +extern void prune_packed_objects(int); extern int cmd_add(int argc, const char **argv, const char *prefix); + extern int cmd_annotate(int argc, const char **argv, const char *prefix); extern int cmd_apply(int argc, const char **argv, const char *prefix); extern int cmd_archive(int argc, const char **argv, const char *prefix); extern int cmd_cat_file(int argc, const char **argv, const char *prefix); diff --cc gitweb/gitweb.perl index bc8d8eb23,34b88ce8e..9eb19bb82 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@@ -41,12 -41,20 +41,22 @@@ our $home_link_str = "++GITWEB_HOME_LIN # replace this with something more descriptive for clearer bookmarks our $site_name = "++GITWEB_SITENAME++" || $ENV{'SERVER_NAME'} || "Untitled"; + # filename of html text to include at top of each page + our $site_header = "++GITWEB_SITE_HEADER++"; # html text to include at home page our $home_text = "++GITWEB_HOMETEXT++"; + # filename of html text to include at bottom of each page + our $site_footer = "++GITWEB_SITE_FOOTER++"; + + # URI of stylesheets + our @stylesheets = ("++GITWEB_CSS++"); + our $stylesheet; + # default is not to define style sheet, but it can be overwritten later + undef $stylesheet; -# URI of GIT logo +# URI of default stylesheet +our $stylesheet = "++GITWEB_CSS++"; +# URI of GIT logo (72x27 size) our $logo = "++GITWEB_LOGO++"; # URI of GIT favicon, assumed to be image/png type our $favicon = "++GITWEB_FAVICON++"; @@@ -900,11 -864,10 +925,10 @@@ sub git_get_projects_list if (!defined $path) { next; } - if (-e "$projectroot/$path/HEAD" && (!$export_ok || - -e "$projectroot/$path/$export_ok")) { + if (check_export_ok("$projectroot/$path")) { my $pr = { path => $path, - owner => decode("utf8", $owner, Encode::FB_DEFAULT), + owner => to_utf8($owner), }; push @list, $pr } @@@ -1435,11 -1408,20 +1471,18 @@@ EO } print "\n" . - "\n" . - "
\n" . + "\n"; + + if (-f $site_header) { + open (my $fd, $site_header); + print <$fd>; + close $fd; + } + + print "
\n" . - "" . - "\"git\"" . - "\n"; + $cgi->a({-href => esc_url($logo_url), + -title => $logo_label}, + qq()); print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / "; if (defined $project) { print $cgi->a({-href => href(action=>"summary")}, esc_html($project));