summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.css
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2007-05-07 01:10:04 +0200
committerJunio C Hamano <junkio@cox.net>2007-05-07 18:20:18 -0700
commited224deac9436215f8c0b098baa0aecfcff1c293 (patch)
treefd3c326cfb4afeb698469bf4a4b100c04da87eaf /gitweb/gitweb.css
parent78bc403aaffe4dc7854da118e977685b38bdc5b7 (diff)
downloadgit-ed224deac9436215f8c0b098baa0aecfcff1c293.tar.gz
gitweb: Add combined diff support to git_difftree_body
You have to pass all parents as final parameters of git_difftree_body subroutine; the number of parents of a diff must be equal to the number derived from parsing git-diff-tree output, raw combined diff for git_difftree_body to display combined diff correctly (but it is not checked). Currently the possibility of displaying diffree of combined diff is not used in gitweb code; git_difftree_body is always caled for ordinary diff, and with only one parent. Description of output for combined diff: ---------------------------------------- The difftree table for combined diff starts with a cell with pathname of changed blob (changed file), which if possible is hidden link (class="list") to the 'blob' view of final version (if it exists), like for difftree for ordinary diff. If file was deleted in the final commit then filename is not hyperlinked. There is no cell with single file status (new, deleted, mode change, rename), as for combined diff as there is no single status: different parents might have different status. If git_difftree_body was called from git_commitdiff (for 'commitdiff' action) there is inner link to anchor to appropriate fragment (patch) in patchset body; the "patch" link does not replace "diff" link like for ordinary diff. Each of "diff" links is in separate cell, contrary to output for ordinary diff in which all links are (at least for now) in a single cell. For each parent, if file was not present we leave cell empty. If file was deleted in the result, we provide link to 'blob' view. Otherwise we provide link to 'commitdiff' view, even if patch (diff) consist only of extended diff header, and contents is not changed (pure rename, pure mode change). The only difference is that link to "blobdiff" view with no contents change is with 'nochange' class. At last, there is provided link to current version of file as "blob" link, if the file was not deleted in the result, and lik to history of a file, if there exists one. (The link to file history might be confused, at least for now, by renames.) Note that git-diff-tree raw output dor combined diff does not provide filename before change for renames and copies; we use git_get_path_by_hash to get "src" filename for renames (this means additional call to git-ls-tree for a _whole_ tree). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb/gitweb.css')
-rw-r--r--gitweb/gitweb.css17
1 files changed, 17 insertions, 0 deletions
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 2b023bd98a..e795b70b2b 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -181,6 +181,23 @@ table.diff_tree {
font-family: monospace;
}
+table.combined.diff_tree td {
+ padding-right: 24px;
+}
+
+table.combined.diff_tree td.link {
+ padding: 0px 2px;
+}
+
+table.combined.diff_tree td.nochange a {
+ color: #6666ff;
+}
+
+table.combined.diff_tree td.nochange a:hover,
+table.combined.diff_tree td.nochange a:visited {
+ color: #d06666;
+}
+
table.blame {
border-collapse: collapse;
}