From f1f71b3d42fe158ea1eb964be3e2cb1c1afe7c52 Mon Sep 17 00:00:00 2001 From: Stricted Date: Fri, 12 Apr 2013 12:44:27 +0200 Subject: [PATCH] add new files --- git-favicon.png | Bin 0 -> 1125 bytes git-logo.png | Bin 0 -> 2412 bytes git_download.php | 99 ----- git_version.php | 13 - gitweb.css | 838 +++++++++++++++++++----------------------- index.cgi | 109 ++---- patch/gitweb.cgi.diff | 97 ----- 7 files changed, 417 insertions(+), 739 deletions(-) create mode 100644 git-favicon.png create mode 100644 git-logo.png delete mode 100644 git_download.php delete mode 100644 git_version.php delete mode 100644 patch/gitweb.cgi.diff diff --git a/git-favicon.png b/git-favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..4fa44bb051e6ed0726911f095d6991e430805242 GIT binary patch literal 1125 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 $v) { - chmod($v,0777); - $maincode=file_get_contents($v); - $maincode = str_replace('$__GIT__', '"'.$arg.'"', $maincode); // replace $__GIT__ with the git version - $fp = fopen($v, 'w'); - fwrite($fp, $maincode); - fclose($fp); - } -} -function gen_id($len = 6) -{ - $r = ''; - for($i=0; $i<$len; $i++) { - $r .= chr(rand(0, 25) + ord('a')); - } - return $r; -} -if(isset($_GET['p'])){ - if(file_exists("/home/git/".$_GET['p'])){ - $hash = shell_exec("git --git-dir=/home/git/".$_GET["p"]." rev-list -n 1 --pretty='format:%h' --header master | grep '^[0-9a-f]*$'"); - $con= shell_exec('git --git-dir=/home/git/'.$_GET["p"].' rev-list --oneline --header master | wc -l | sed "s/[ \t]//g"'); - if(!$hash){ - echo "No Download available"; - }else{ - $name=substr($_GET["p"],0,strlen($_GET["p"])-4); - echo "".$name."-".substr($hash, 0, -1)." (tar.gz)"; - } - }else{ - echo "unknown project"; - } -}elseif(isset($_GET['build'])){ - - if(file_exists("/home/git/".$_GET['build'])){ - $name=substr($_GET['build'],0,strlen($_GET['build'])-4); - if(isset($_GET['h'])){ - if(strtolower($_GET['h']) == "head") { - $hash = substr(shell_exec("git --git-dir=/home/git/".$_GET['build']." rev-list -n 1 --pretty='format:%h' --header master | grep '^[0-9a-f]*$'"), 0, -1); - }else{ - $hash = substr($_GET['h'], 0, 7); - } - }else{ - $hash = substr(shell_exec("git --git-dir=/home/git/".$_GET['build']." rev-list -n 1 --pretty='format:%h' --header master | grep '^[0-9a-f]*$'"), 0, 7); - } - $id = sha1(gen_id()); - $b = shell_exec("cd /usr/share/gitweb/dl/; git clone git://git.nexus-irc.de/".$_GET['build']); - $c = shell_exec("cd /usr/share/gitweb/dl/".$name."/; git reset ".$_GET['h']); - $con= shell_exec('git --git-dir=/home/git/'.$_GET['build'].' rev-list --oneline --header master | wc -l | sed "s/[ \t]//g"'); - if($_GET['build'] != "gitweb.git") { - scandir_replace("/usr/share/gitweb/dl/".$name,"git-".substr($con, 0, -1)."-".$hash); - } - $c = shell_exec("cd /usr/share/gitweb/dl; tar czfv ".$id." ".$name); - $d = shell_exec("rm -r /usr/share/gitweb/dl/".$name); - header("Content-Type: application/x-gzip"); - header("Content-Disposition: attachment; filename=".$name."-".$hash.".tar.gz"); - $file = readfile("/usr/share/gitweb/dl/".$id); - unlink("/usr/share/gitweb/dl/".$id); - echo $file; - }else{ - echo "unknown project"; - } -}else{ - echo ""; - echo ""; - $a = file_get_contents("http://git.nexus-irc.de/index.cgi?a=project_index2"); - $b = explode("\n",$a); - foreach($b as $id => $v) { - if($v == ""){ }else{ - $hash = shell_exec("git --git-dir=/home/git/".$v." rev-list -n 1 --pretty='format:%h' --header master | grep '^[0-9a-f]*$'"); - $con= shell_exec('git --git-dir=/home/git/'.$v.' rev-list --oneline --header master | wc -l | sed "s/[ \t]//g"'); - if(!$hash){ - echo ""; - }else{ - $name=substr($v,0,strlen($v)-4); - echo ""; - } - } - } - echo "
ProjectDownload
".$v."No Download available
".$v."".$name."-".substr($hash, 0, -1)." (tar.gz)
"; -} -?> \ No newline at end of file diff --git a/git_version.php b/git_version.php deleted file mode 100644 index f304870..0000000 --- a/git_version.php +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/gitweb.css b/gitweb.css index 417e10f..f8c24f0 100644 --- a/gitweb.css +++ b/gitweb.css @@ -1,424 +1,459 @@ -body { - font-family: sans-serif; - font-size: small; - border: solid #d9d8d1; - border-width: 1px; - margin: 10px; - background-color: #ffffff; - color: #000000; -} +/* Reset +------------------------------------------------------------------------- */ -a { - color: #0000cc; -} +/* Based on http://meyerweb.com/eric/tools/css/reset/ */ +/* v1.0 | 20080212 */ -a:hover, a:visited, a:active { - color: #880000; +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, +blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, +font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, +u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, +caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; } -span.cntrl { - border: dashed #aaaaaa; - border-width: 1px; - padding: 0px 2px 0px 2px; - margin: 0px 2px 0px 2px; -} +ol, ul { list-style: none; } -img.logo { - float: right; - border-width: 0px; -} +blockquote, q { quotes: none; } -img.avatar { - vertical-align: middle; +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; } -a.list img.avatar { - border-style: none; -} +:focus { outline: 0; } -div.page_header { - height: 25px; - padding: 8px; - font-size: 150%; - font-weight: bold; - background-color: #d9d8d1; -} +ins { text-decoration: none; } -div.page_header a:visited, a.header { - color: #0000cc; -} +del { text-decoration: line-through; } -div.page_header a:hover { - color: #880000; +table { + border-collapse: collapse; + border-spacing: 0; } -div.page_nav { - padding: 8px; -} +a { outline: none; } -div.page_nav a:visited { - color: #0000cc; -} +/* General +---------------------------------------------------------------------------- */ +@import url(../../../stylesheets/application.css); +@import url(http://fonts.googleapis.com/css?family=Ubuntu+Condensed); -div.page_path { - padding: 8px; - font-weight: bold; - border: solid #d9d8d1; - border-width: 0px 0px 1px; -} -div.page_footer { - height: 17px; - padding: 4px 8px; - background-color: #d9d8d1; +body { + background-color:#E7EBF2; font-family:"Lucida Grande", verdana, arial, helvetica, sans-serif; + font-size: 12px; + line-height: 1.5; + margin: 0; + background-color: #fff; + color: #000000; } -div.page_footer_text { - float: left; - color: #555555; - font-style: italic; -} -div#generating_info { - margin: 4px; - font-size: smaller; - text-align: center; - color: #505050; -} -div.page_body { - padding: 8px; - font-family: monospace; -} -div.title, a.title { - display: block; - padding: 6px 8px; - font-weight: bold; - background-color: #edece6; - text-decoration: none; - color: #000000; +a:link, a:visited { + color: #3B5998; + text-decoration: none; } -div.readme { - padding: 8px; +a:hover { + text-decoration: underline; } -a.title:hover { - background-color: #d9d8d1; +body > p, +body > dl { + width: 95%; + margin: 0 auto 15px auto; + border: 1px solid #D8D8D8; + padding: 5px; } -div.title_text { - padding: 6px 0px; - border: solid #d9d8d1; - border-width: 0px 0px 1px; - font-family: monospace; +td.list a[href*='a=tree'], td.list a[href*='a=blob'] { + padding-left: 20px; + display: block; + float: left; + height: 16px; + line-height: 16px; } -div.log_body { - padding: 8px 8px 8px 150px; +td.list a[href*='a=tree'] { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABq0lEQVQ4y8WTu4oUQRSGv+rtGVuxhwVFdFEEE2c3d0HYTEMTn8DEVxADQTDUF9DMwMxQMBMx8AEWzRQ3cBHd9TI91+2urjq/QbczY2IygSep4nD+79yqnCRWsYQVbWVACvDh5ZXdrLe15dwyT1TjT/sxFFeB6i+VA2B6+cb7kAI4Jf0LO087zjlQI8Y5Qvnj0sHug321XoC1bk+K9eHk6+s7wPMUgKAS88eqb4+Jfg2SHs7lZBvX2Nh+2EUCDGSAcMnJsx9f7NxfAGqXyDzRd5EJO/pMPT1gcviGTnYOVIN5pAAE8v7dLrKL8xnglFk4ws9Afko9HpH3b5Gd2mwb/lOBmgrSdYhJugDUCenxM6xv3p4HCsP8F0LxCsUhCkMURihOyM7fg0osASTFEpu9a4LjGIUCqwcoDiEUrX+E4hRUQb20RiokC1j9vckUhygU7X3QZh7NAVKYL7YBeMkRUfjVCotF2XGIwnghtrJpMywB5G0QZj9P1JNujuWJ1AHLQadRrACPkuZ0SSSWpeStWgDK6tHek5vbiOs48n++XQHurcf0rFng//6NvwG+iB9/4duaTgAAAABJRU5ErkJgggo=) center left no-repeat; } -span.age { - position: relative; - float: left; - width: 142px; - font-style: italic; +td.list a[href*='a=blob'] { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAA6ElEQVQoFQXBMW5TQRgGwNnHnoE0QbiCjoIooUmTU3AuS1BwIoTSUdJBigg3GCWOg9/++zHTop078wIAsPMrE4SL5/1aIyMjIyMjz/m0tbFECFdrPeaQQw75mz/5nZH7fN7aWILmauSYfznmmIfss8vIUx7zZWsTTXM5vpWvTk5Wq9VHQP/gtgOLa0Qpw940vAQdaG6thpOhlOkG0AEuAVGmEkAH+G4YSikxXQM6wDsAMRFAB/ihDNNUmN4DOsAbBAEAdICfpmmaAt4COoj2GgCASbIkZh1NAACznhQt2itnFgAAlF3u/gMDtJXPzQxoswAAAABJRU5ErkJgggo=) center left no-repeat; } -span.signoff { - color: #888888; +i { + font-style: normal; } -div.log_link { - padding: 0px 8px; - font-size: 70%; - font-family: sans-serif; - font-style: normal; - position: relative; - float: left; - width: 136px; +td, th { + padding: 5px; } -div.list_head { - padding: 6px 8px 4px; - border: solid #d9d8d1; - border-width: 1px 0px 0px; - font-style: italic; -} +/* Page Header +---------------------------------------------------------------------------- */ -.author_date, .author { - font-style: italic; +.page_header { + height: 50px; + line-height: 50px; + position: relative; + padding: 0 27px; + margin-bottom: 20px; + font-size: 20px; + font-family: Ubuntu Condensed; + color:White; + background: #3B5998; + border-bottom: 1px solid #dfdfdf; } -div.author_date { - padding: 8px; - border: solid #d9d8d1; - border-width: 0px 0px 1px 0px; +.page_header a:link, .page_header a:visited { + color: White; + text-decoration: none; + padding: 3px; + font-weight: bold; } -a.list { - text-decoration: none; - color: #000000; +.page_header a:hover { + font-weight: bold; + padding: 3px; + text-decoration: underline; } -a.subject, a.name { - font-weight: bold; +.page_header a:first-child { + background: transparent; } -table.tags a.subject { - font-weight: normal; +.page_header img.logo { + width:79px; + height:20px; + padding-bottom:2px; + padding-right:5px; + margin-right:5px; + vertical-align:middle } -a.list:hover { - text-decoration: underline; - color: #880000; -} +/* Page Footer +---------------------------------------------------------------------------- */ -a.text { - text-decoration: none; - color: #0000cc; +.page_footer { + height: 80px; + line-height: 80px; + padding: 0 30px; + margin-top: 15px; + background: #f1f1f1; + border-top: 2px solid #ddd; } -a.text:visited { - text-decoration: none; - color: #880000; +.page_footer_text { + color: #666; + display: inline; + float: left; } -a.text:hover { - text-decoration: underline; - color: #880000; +a.rss_logo { + float: right; + padding: 3px 1px; + width: 35px; + line-height: 10px; + border: 1px solid; + border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e; + border-radius:10px; + color: #ffffff; + background-color: #ff6600; + font-weight: bold; + font-family: sans-serif; + font-size: 80%; + text-align: center; + text-decoration: none; + margin-top: 30px; + margin-left: 5px; } -table { - padding: 8px 4px; - border-spacing: 0; +a.rss_logo:hover { + background-color: #ee5500; +} + +/* Elements +---------------------------------------------------------------------------- */ + +.project_list, +.shortlog, +.tree, +.commit_search, +.history { + width: 95%; + margin: 0 auto 15px auto; + border: 1px solid #d8d8d8; + -moz-box-shadow: 0 0 3px rgba(0,0,0,0.2); + -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.2); + box-shadow: 0 0 3px rgba(0,0,0,0.2); +} + +.project_list th, +.shortlog th, +.tree th, +.commit_search th { + color: #afafaf; + font-weight: normal; } - -table.shortlog td { - padding: 0px 8px; - vertical-align: middle; - height:20px; +.project_list th { +background-color: #F0F0F0; +padding: 10px 5px; +border-bottom: 1px solid #D5D7DB; +color: #333; } +.project_list th a { color:#333; } -img.graph { - padding: 0px; - margin: 0px; - display: block; + +.project_list tr, +.shortlog tr, +.tree tr, +.commit_search tr { + background: #eaeaea; + height: 2.5em; + text-align: left; + color: #545454; +} + +.project_list tr { + background:White; + border:1px solid #f9f9f; } -table.diff_tree { - font-family: monospace; -} -table.combined.diff_tree th { - text-align: center; +/*.project_list tr.dark, .project_list tr.light,*/ +.shortlog tr.dark, .shortlog tr.light, +.tree tr.dark, .tree tr.light, +.commit_search tr.dark, .commit_search tr.light, +.history tr.dark, .history tr.light, +.heads tr.dark, .heads tr.light { + background: #F9F9F9; /* old browsers */ + background: White; +/* background: -moz-linear-gradient(top, #F9F9F9 0%, #EFEFEF 100%); /* firefox */ +/* background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F9F9F9), color-stop(100%,#EFEFEF)); /* webkit */ +/* filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F9F9F9', endColorstr='#EFEFEF',GradientType=0 ); /* ie */ +/* background: -o-linear-gradient(top, #F9F9F9 0%, #EFEFEF 100%); */ + height: 2.5em; + border-bottom: 1px solid #e1e1e1; } -table.combined.diff_tree td { - padding-right: 24px; -} +.project_list tr:hover, +.shortlog tr:hover, +.tree tr:hover, +.commit_search tr:hover { + background:#efefef; +} -table.combined.diff_tree th.link, -table.combined.diff_tree td.link { - padding: 0px 2px; +th .header { + background: transparent; + border: 0; + padding: 0; } -table.combined.diff_tree td.nochange a { - color: #6666ff; +.tree { + width: 100%; + margin: 0; +} + +.projsearch { + position: absolute; + right: 4%; + top: 15px; + color:White; + font-family:Arial; + font-size:11px; +} + +.projsearch input[type="text"], +.search input[type="text"] { + border-radius:5px; +border:1px solid #D8D8D8; +padding:3px; } - -table.combined.diff_tree td.nochange a:hover, -table.combined.diff_tree td.nochange a:visited { - color: #d06666; +.projsearch input[type="text"] { +border: 1px solid White; } -table.blame { - border-collapse: collapse; +.commit_search { + background: #eaeaea; } -table.blame td { - padding: 0px 5px; - font-size: 100%; - vertical-align: top; +.page_nav, +.list_head, +.page_path, +.search { + width: 94%; + background: #eaeaea; + color: #545454; + border: 1px solid #d8d8d8; + padding: 5px; + margin: 0 auto 15px auto; } -th { - padding: 2px 5px; - font-size: 100%; - text-align: left; +.history { + background: #eaeaea; } -/* do not change row style on hover for 'blame' view */ -tr.light, -table.blame .light:hover { - background-color: #ffffff; +.title { + width: 95%; + padding: 5px; + margin: 0 auto 15px auto; } -tr.dark, -table.blame .dark:hover { - background-color: #f6f6f0; +.projects_list, +.tags { + width: 95%; + background: #f0f0f0; + color: #545454; + border: 1px solid #d8d8d8; + padding: 5px; + margin: 0 auto 15px auto; } -/* currently both use the same, but it can change */ -tr.light:hover, -tr.dark:hover { - background-color: #edece6; +.heads { + width: 95%; + color: #545454; + border: 1px solid #d8d8d8; + padding: 5px; + margin: 0 auto 15px auto; } -/* boundary commits in 'blame' view */ -/* and commits without "previous" */ -tr.boundary td.sha1, -tr.no-previous td.linenr { - font-weight: bold; +.header { + width: 94%; + margin: 0 auto 15px auto; + background: #eaf2f5; + border: 1px solid #bedce7; + padding: 5px; } -/* for 'blame_incremental', during processing */ -tr.color1 { background-color: #f6fff6; } -tr.color2 { background-color: #f6f6ff; } -tr.color3 { background-color: #fff6f6; } - -td { - padding: 2px 5px; - font-size: 100%; - vertical-align: top; +.header .age { + float: left; + color: #000; + font-weight: bold; + width: 10em; } -td.link, td.selflink { - padding: 2px 5px; - font-family: sans-serif; - font-size: 70%; +.title_text { + width: 94%; + background: #eaf2f5; + border: 1px solid #bedce7; + padding: 5px; + margin: 0 auto 0 auto; } -td.selflink { - padding-right: 0px; +.log_body { + width: 94%; + background: #eaf2f5; + border: 1px solid #bedce7; + border-top: 0; + padding: 5px; + margin: 0 auto 15px auto; } -td.sha1 { - font-family: monospace; +.page_body { + line-height: 1.4em; + width: 94%; + background: #f8f8f8; + border: 1px solid #d8d8d8; + padding: 5px; + margin: 15px auto 15px auto; } -.error { - color: red; - background-color: yellow; +.diff_tree { + width: 95%; + background: #f0f0f0; + border: 1px solid #d8d8d8; + padding: 5px; + margin: 0 auto 15px auto; } -td.current_head { - text-decoration: underline; +.page_body > .list_head { + width: 98.5%; } -table.diff_tree span.file_status.new { - color: #008000; +.page_body > .diff_tree { + width: 99.5%; } -table.diff_tree span.file_status.deleted { - color: #c00000; +.patch > .header { + width: 98.5%; } -table.diff_tree span.file_status.moved, -table.diff_tree span.file_status.mode_chnge { - color: #777777; -} +/* Refs +---------------------------------------------------------------------------- */ -table.diff_tree span.file_status.copied { - color: #70a070; +span.refs span { + color: #000; + padding: 0px 4px; + font-size: 10px; + font-weight: normal; + border: 1px solid; + background-color: #ffaaff; + border-color: #ffccff #ff00ee #ff00ee #ffccff; } -/* noage: "No commits" */ -table.project_list td.noage { - color: #808080; - font-style: italic; -} -table.shortlog td.noage, table.history td.noage { - color: #808080; - font-style: italic; +span.refs span.ref { + background-color: #aaaaff; + border-color: #ccccff #0033cc #0033cc #ccccff; } -/* age2: 60*60*24*2 <= age */ -table.project_list td.age2, table.blame td.age2 { - font-style: italic; -} -table.shortlog td.age2, table.history td.age2 { - font-style: italic; +span.refs span.tag { + background-color: #ffffaa; + border-color: #ffffcc #dccd00 #dccd00 #ffffcc; } -/* age1: 60*60*2 <= age < 60*60*24*2 */ -table.shortlog td.age1, table.project_list td.age1, table.history td.age1 { - color: #009900; - font-style: italic; +span.refs span.head { + background-color: #aaffaa; + border-color: #ccffcc #00cc33 #00cc33 #ccffcc; } -table.blame td.age1 { - color: #009900; - background: transparent; +span.refs a { + color: #000; } -/* age0: age < 60*60*2 */ -table.project_list td.age0 { - color: #009900; - font-style: italic; - font-weight: bold; -} -table.shortlog td.age0, table.history td.age0 { - color: #009900; - font-style: italic; - font-weight: bold; -} +/* Diffs +---------------------------------------------------------------------------- */ -table.blame td.age0 { - color: #009900; - background: transparent; - font-weight: bold; +.patchset { + overflow-x: auto; + overflow-y: hidden; } -td.pre, div.pre, div.diff { - font-family: monospace; - font-size: 12px; - white-space: pre; +.chunk_header { + background: #eaf2f5; + color: #999; } -td.mode { - font-family: monospace; +.rem , +.from_file { + background: #FF5252; } - -/* progress of blame_interactive */ -div#progress_bar { - height: 2px; - margin-bottom: -2px; - background-color: #d8d9d0; +.add , +.to_file{ + background: #3FFF3F; } -div#progress_info { - float: right; - text-align: right; +div.diff.to_file a.path, +div.diff.to_file { + color: #000000; } -/* format of (optional) objects size in 'tree' view */ -td.size { - font-family: monospace; - text-align: right; +div.diff.from_file a.path, +div.diff.from_file { + color: #000000; } - -/* styling of diffs (patchsets): commitdiff and blobdiff views */ -div.diff.header, div.diff.extended_header { white-space: normal; } - -div.diff.header { - font-weight: bold; - - background-color: #edece6; - - margin-top: 4px; - padding: 4px 0px 2px 0px; - border: solid #d9d8d1; - border-width: 1px 0px 1px 0px; -} - -div.diff.header a.path { - text-decoration: underline; -} - div.diff.extended_header, div.diff.extended_header a.path, div.diff.extended_header a.hash { @@ -434,198 +469,93 @@ div.diff.extended_header { padding: 2px 0px 2px 0px; } -div.diff a.list, -div.diff a.path, -div.diff a.hash { - text-decoration: none; -} +/* Age +---------------------------------------------------------------------------- */ -div.diff a.list:hover, -div.diff a.path:hover, -div.diff a.hash:hover { - text-decoration: underline; -} - -div.diff.to_file a.path, -div.diff.to_file { - color: #007000; -} - -div.diff.add { - color: #008800; -} - -div.diff.from_file a.path, -div.diff.from_file { - color: #aa0000; -} - -div.diff.rem { - color: #cc0000; -} - -div.diff.chunk_header a, -div.diff.chunk_header { - color: #990099; -} - -div.diff.chunk_header { - border: dotted #ffe0ff; - border-width: 1px 0px 0px 0px; - margin-top: 2px; -} - -div.diff.chunk_header span.chunk_info { - background-color: #ffeeff; -} - -div.diff.chunk_header span.section { - color: #aa22aa; -} - -div.diff.incomplete { - color: #cccccc; -} - -div.diff.nodifferences { - font-weight: bold; - color: #600000; -} - -div.index_include { - border: solid #d9d8d1; - border-width: 0px 0px 1px; - padding: 12px 8px; -} - -div.search { - font-size: 100%; - font-weight: normal; - margin: 4px 8px; - float: right; - top: 56px; - right: 12px -} - -p.projsearch { - text-align: center; -} - -td.linenr { - text-align: right; -} - -a.linenr { - color: #999999; - text-decoration: none +/* noage: "No commits" */ +.project_list td.noage { + color: #cdcdcd; } -a.rss_logo { - float: right; - padding: 3px 0px; - width: 35px; - line-height: 10px; - border: 1px solid; - border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e; - color: #ffffff; - background-color: #ff6600; - font-weight: bold; - font-family: sans-serif; - font-size: 70%; - text-align: center; - text-decoration: none; -} -a.rss_logo2 { - float: right; - padding: 3px 0px; - width: 60px; - line-height: 10px; - border: 1px solid; - border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e; - color: #ffffff; - background-color: #ff6600; - font-weight: bold; - font-family: sans-serif; - font-size: 70%; - text-align: center; - text-decoration: none; +/* age2: 60*60*24*2 <= age */ +.project_list td.age2, .blame td.age2 { + color: #545454; } -a.rss_logo:hover { - background-color: #ee5500; +/* age1: 60*60*2 <= age < 60*60*24*2 */ +.project_list td.age1 { + color: #009900; } -a.rss_logo.generic { - background-color: #ff8800; +/* age0: age < 60*60*2 */ +.project_list td.age0 { + color: #009900; + font-weight: bold; } -a.rss_logo.generic:hover { - background-color: #ee7700; -} +/* File status +---------------------------------------------------------------------------- */ -span.refs span { - padding: 0px 4px; - font-size: 70%; - font-weight: normal; - border: 1px solid; - background-color: #ffaaff; - border-color: #ffccff #ff00ee #ff00ee #ffccff; +.diff_tree span.file_status.new { + color: #008000; } -span.refs span a { - text-decoration: none; - color: inherit; +table.diff_tree span.file_status.deleted { + color: #c00000; } -span.refs span a:hover { - text-decoration: underline; +table.diff_tree span.file_status.moved, +table.diff_tree span.file_status.mode_chnge { + color: #545454; } -span.refs span.indirect { - font-style: italic; +table.diff_tree span.file_status.copied { + color: #70a070; } -span.refs span.ref { - background-color: #aaaaff; - border-color: #ccccff #0033cc #0033cc #ccccff; +span.cntrl { + border: dashed #aaaaaa; + border-width: 1px; + padding: 0px 2px 0px 2px; + margin: 0px 2px 0px 2px; } - -span.refs span.tag { - background-color: #ffffaa; - border-color: #ffffcc #ffee00 #ffee00 #ffffcc; +img.graph { + padding: 0px; + margin: 0px; + display: block; } -span.refs span.head { - background-color: #aaffaa; - border-color: #ccffcc #00cc33 #00cc33 #ccffcc; +span.match { + background: #aaffaa; + color: #000; } -span.atnight { - color: #cc0000; +td.error { + color: red; + background: yellow; } -span.match { - color: #e00000; -} +/* blob view */ -div.binary { - font-style: italic; +td.pre, div.pre, div.diff { + white-space: pre; } /* Style definition generated by highlight 2.4.5, http://www.andre-simon.de/ */ /* Highlighting theme definition: */ -.num { color:#2928ff; } +.num { color:#6ecf36; } .esc { color:#ff00ff; } -.str { color:#ff0000; } +.str { color:#ff00d3; background-color: #edc9ec } .dstr { color:#818100; } .slc { color:#838183; font-style:italic; } .com { color:#838183; font-style:italic; } .dir { color:#008200; } .sym { color:#000000; } .line { color:#555555; } -.kwa { color:#000000; font-weight:bold; } -.kwb { color:#830000; } -.kwc { color:#000000; font-weight:bold; } -.kwd { color:#010181; } +.kwa { color:#666666; font-weight:bold; } +.kwb { color:#6b3099; } +.kwc { color:#d4663d; } +.kwd { color:#2928ff; } + diff --git a/index.cgi b/index.cgi index 8d49935..480818d 100644 --- a/index.cgi +++ b/index.cgi @@ -16,7 +16,6 @@ use Encode; use Fcntl ':mode'; use File::Find qw(); use File::Basename qw(basename); -use LWP::Simple; binmode STDOUT, ':utf8'; our $t0; @@ -693,8 +692,6 @@ our %actions = ( "opml" => \&git_opml, "project_list" => \&git_project_list, "project_index" => \&git_project_index, - "project_index2" => \&git_project_index2, - "download" => \&git_download, ); # finally, we have the hash of allowed extra_options for the commands that @@ -1023,7 +1020,7 @@ sub dispatch { if (!defined($actions{$action})) { die_error(400, "Unknown action"); } - if ($action !~ m/^(?:opml|project_list|project_index2|project_index|download)$/ && + if ($action !~ m/^(?:opml|project_list|project_index)$/ && !$project) { die_error(400, "Project needed"); } @@ -2723,7 +2720,8 @@ sub git_get_last_activity { 'refs/heads') or return; my $most_recent = <$fd>; close $fd or return; - if (defined $most_recent && $most_recent =~ / (\d+) [-+][01]\d\d\d$/) { + if (defined $most_recent && + $most_recent =~ / (\d+) [-+][01]\d\d\d$/) { my $timestamp = $1; my $age = time - $timestamp; return ($age, age_string($age)); @@ -3344,7 +3342,7 @@ sub guess_file_syntax { 'h' => 'c', map { $_ => 'cpp' } qw(cxx c++ cc), map { $_ => 'php' } qw(php3 php4), - map { $_ => 'pl' } qw(perl pm cgi), # perhaps also 'cgi' + map { $_ => 'pl' } qw(perl pm), # perhaps also 'cgi' 'mak' => 'make', map { $_ => 'xml' } qw(xhtml html htm), ); @@ -3511,14 +3509,6 @@ EOF print " / $action"; } print "\n"; - } else { - if (defined($action)) { - if ($action eq 'project_list') { - } else { - print " $action"; - } - } - print "\n"; } print "\n"; @@ -3562,7 +3552,6 @@ EOF sub git_footer_html { my $feed_class = 'rss_logo'; - my $feed_class2 = 'rss_logo2'; print "
\n"; if (defined $project) { @@ -3583,16 +3572,13 @@ sub git_footer_html { -title => "$href_params{'-title'} $format feed", -class => $feed_class}, $format)."\n"; } - print $cgi->a({-href => href(project=>$project, action=>"download"), - -class => $feed_class2}, "Downloads") . "\n"; + } else { - print "\n"; + print "\n"; print $cgi->a({-href => href(project=>undef, action=>"opml"), -class => $feed_class}, "OPML") . " "; print $cgi->a({-href => href(project=>undef, action=>"project_index"), - -class => $feed_class}, "TXT") . " "; - print $cgi->a({-href => href(project=>undef, action=>"download"), - -class => $feed_class2}, "Downloads") . "\n"; + -class => $feed_class}, "TXT") . "\n"; } print "
\n"; # class="page_footer" @@ -4665,6 +4651,7 @@ sub git_project_list_body { my $cloud = git_populate_project_tagcloud(\%ctags); print git_show_project_tagcloud($cloud, 64); } + print "\n"; unless ($no_header) { print "\n"; @@ -4719,15 +4706,14 @@ sub git_project_list_body { (defined $pr->{'age_string'} ? $pr->{'age_string'} : "No commits") . "\n" . "\n" . "\n"; } - print ""; + print ""; if (defined $extra) { print "\n"; if ($check_forks) { @@ -4788,7 +4774,9 @@ sub git_shortlog_body { print "
" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary")}, "summary") . " | " . - #$cgi->a({-href => href(project=>$pr->{'path'}, action=>"bugtrack")}, "bugtrack") . " | " . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"shortlog")}, "shortlog") . " | " . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"log")}, "log") . " | " . - $cgi->a({-href => href(project=>$pr->{'path'}, action=>"tree")}, "tree") . + $cgi->a({-href => href(project=>$pr->{'path'}, action=>"tree")}, "tree") . ($pr->{'forks'} ? " | " . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"forks")}, "forks") : '') . "
  ".$count." projects found  
   ".$count." projects found  
\n"; my $alternate = 1; - my $head = git_get_head_hash($project); + + my $graph_rand = int(rand(99999)); + my $head = git_get_head_hash($project); my $graph_hash; if (defined $allrefs && $allrefs == 1) { $graph_hash = "all"; @@ -4802,7 +4790,7 @@ sub git_shortlog_body { if (!defined $page) { $page = 0; } - my $graph_rand = int(rand(99999)); + print "\n"; print "\n"; print "\n"; @@ -4812,7 +4800,6 @@ sub git_shortlog_body { for (my $i = $from; $i <= $to; $i++) { my %co = %{$commitlist->[$i]}; my $commit = $co{'id'}; - my $ref = format_ref_marker($refs, $commit); if ($alternate) { print "\n"; @@ -4820,9 +4807,10 @@ sub git_shortlog_body { print "\n"; } $alternate ^= 1; - # git_summary() used print "\n" . + print ""; - print "\n" . + # git_summary() used print "\n" . + print "\n" . format_author_html('td', \%co, 10) . "\n" . "\n"; } if (defined $extra) { print "\n" . - "\n" . + "\n" . "\n"; } print "
Author
$co{'age_string'}$co{'age_string_date'}$co{'age_string'}$co{'age_string_date'}"; print format_subject_html($co{'title'}, $co{'title_short'}, href(action=>"commit", hash=>$commit), $ref); @@ -4830,15 +4818,17 @@ sub git_shortlog_body { "" . $cgi->a({-href => href(action=>"commit", hash=>$commit)}, "commit") . " | " . $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff") . " | " . - $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree"). " | " . - "snapshot"; - + $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree"); + my $snapshot_links = format_snapshot_links($commit); + if (defined $snapshot_links) { + print " | " . $snapshot_links; + } print "
$extra$extra
\n"; @@ -4869,7 +4859,7 @@ sub git_history_body { print "\n"; } $alternate ^= 1; - print "$co{'age_string_date'}\n" . + print "$co{'age_string_date'}\n" . # shortlog: format_author_html('td', \%co, 10) format_author_html('td', \%co, 15, 3) . ""; # originally git_history used chop_str($co{'title'}, 50) @@ -5136,48 +5126,15 @@ sub git_project_index { print "$path $owner\n"; } } -sub git_project_index2 { - my @projects = git_get_projects_list($project); - - print $cgi->header( - -type => 'text/plain', - -charset => 'utf-8', - -content_disposition => 'inline; filename="index.aux"'); - - foreach my $pr (@projects) { - if (!exists $pr->{'owner'}) { - $pr->{'owner'} = git_get_project_owner("$pr->{'path'}"); - } - - my ($path, $owner) = ($pr->{'path'}, $pr->{'owner'}); - # quote as in CGI::Util::encode, but keep the slash, and use '+' for ' ' - $path =~ s/([^a-zA-Z0-9_.\-\/ ])/sprintf("%%%02X", ord($1))/eg; - $owner =~ s/([^a-zA-Z0-9_.\-\/ ])/sprintf("%%%02X", ord($1))/eg; - $path =~ s/ /\+/g; - $owner =~ s/ /\+/g; - - print "$path\n"; - } -} -sub git_download { - my $dl = get("http://git.nexus-irc.de/git_download.php"); - git_header_html(); - print "
Downloads
\n"; - print $dl; - git_footer_html(); -} sub git_summary { my $descr = git_get_project_description($project) || "none"; my %co = parse_commit("HEAD"); my %cd = %co ? parse_date($co{'committer_epoch'}, $co{'committer_tz'}) : (); my $head = $co{'id'}; - + my $owner = git_get_project_owner($project); - - my $version = get("http://git.nexus-irc.de/git_version.php?git=".$project); - my $download = get("http://git.nexus-irc.de/git_download.php?p=".$project); - + my $refs = git_get_references(); # These get_*_list functions return one more to allow us to see if # there are more ... @@ -5192,6 +5149,7 @@ sub git_summary { git_header_html(); git_print_page_nav('summary','', $head); + print "
 
\n"; print "\n" . "\n" . @@ -5210,8 +5168,7 @@ sub git_summary { print "\n"; $url_tag = ""; } - print "\n"; - print "\n"; + # Tag cloud my $show_ctags = gitweb_check_feature('ctags'); if ($show_ctags) { @@ -5760,10 +5717,10 @@ sub git_tree { hash_base=>"HEAD", file_name=>$file_name)}, "HEAD"), } - my $snapshot_links = "1"; + my $snapshot_links = format_snapshot_links($hash); if (defined $snapshot_links) { # FIXME: Should be available when we have no hash base as well. - push @views_nav, "snapshot"; + push @views_nav, $snapshot_links; } git_print_page_nav('tree','', $hash_base, undef, undef, join(' | ', @views_nav)); @@ -5931,7 +5888,7 @@ sub git_log_generic { my $commit_hash = $base; if (defined $allrefs) { $commit_hash = "--all"; - } + } if (defined $parent) { $commit_hash = "$parent..$base"; } @@ -6079,9 +6036,9 @@ sub git_commit { "" . "\n"; diff --git a/patch/gitweb.cgi.diff b/patch/gitweb.cgi.diff deleted file mode 100644 index dd7dbee..0000000 --- a/patch/gitweb.cgi.diff +++ /dev/null @@ -1,97 +0,0 @@ ---- index.cgi 2012-08-29 01:30:10 +0000 -+++ index-graph.cgi 2012-09-07 20:12:12 +0000 -@@ -4764,13 +4768,37 @@ - - sub git_shortlog_body { - # uses global variable $project -- my ($commitlist, $from, $to, $refs, $extra) = @_; -+ my ($commitlist, $from, $to, $refs, $extra, $file_name, $file_hash, $ftype, $allrefs) = @_; - - $from = 0 unless defined $from; - $to = $#{$commitlist} if (!defined $to || $#{$commitlist} < $to); - -- print "
description" . esc_html($descr) . "
version" . esc_html($version) . "
download" . $download . "
" . $cgi->a({-href => href(action=>"tree", hash=>$co{'tree'}, hash_base=>$hash)}, "tree"); - my $snapshot_links = "1"; + my $snapshot_links = format_snapshot_links($hash); if (defined $snapshot_links) { - print " | " . "snapshot"; + print " | " . $snapshot_links; } print "
\n"; -+ print "
\n"; - my $alternate = 1; -+ my $graph_rand = int(rand(99999)); -+ -+ my $head = git_get_head_hash($project); -+ my $graph_hash; -+ if (defined $allrefs && $allrefs == 1) { -+ $graph_hash = "all"; -+ } -+ if (!defined $hash) { -+ $hash = $head; -+ } -+ if(!defined $graph_hash) { -+ $graph_hash = $hash; -+ } -+ if (!defined $page) { -+ $page = 0; -+ } -+ -+ print "\n"; -+ print "\n"; -+ print "\n"; -+ print "\n"; -+ print "\n"; -+ print "\n"; -+ - for (my $i = $from; $i <= $to; $i++) { - my %co = %{$commitlist->[$i]}; - my $commit = $co{'id'}; -@@ -4781,6 +4809,7 @@ - print "\n"; - } - $alternate ^= 1; -+ print ""; - # git_summary() used print "\n" . - print "\n" . - format_author_html('td', \%co, 10) . "
AuthorCommit
$co{'age_string'}$co{'age_string_date'}"; -@@ -5167,12 +5198,12 @@ - - # we need to request one more than 16 (0..15) to check if - # those 16 are all -- my @commitlist = $head ? parse_commits($head, 17) : (); -+ my @commitlist = $head ? parse_commits("--all", 17) : (); - if (@commitlist) { - git_print_header_div('shortlog'); - git_shortlog_body(\@commitlist, 0, 15, $refs, - $#commitlist <= 15 ? undef : -- $cgi->a({-href => href(action=>"shortlog")}, "...")); -+ $cgi->a({-href => href(action=>"shortlog")}, "..."), 0, 0, 0, 1); - } - - if (@taglist) { -@@ -5847,8 +5878,10 @@ - my ($fmt_name, $body_subr, $base, $parent, $file_name, $file_hash) = @_; - - my $head = git_get_head_hash($project); -+ my $allrefs; - if (!defined $base) { - $base = $head; -+ $allrefs = 1; - } - if (!defined $page) { - $page = 0; -@@ -5856,7 +5889,10 @@ - my $refs = git_get_references(); - - my $commit_hash = $base; -- if (defined $parent) { -+ if (defined $allrefs) { -+ $commit_hash = "--all"; -+ } -+ if (defined $parent) { - $commit_hash = "$parent..$base"; - } - my @commitlist = -@@ -5912,7 +5948,7 @@ - if (defined $file_name); - - $body_subr->(\@commitlist, 0, 99, $refs, $next_link, -- $file_name, $file_hash, $ftype); -+ $file_name, $file_hash, $ftype, $allrefs); - - git_footer_html(); - } -- 2.20.1