]> Lady’s Gitweb - Gitweb/commit
gitweb: Provide links to commitdiff to each parent in 'commitdiff' view
authorJakub Narebski <redacted>
Fri, 8 Jun 2007 11:24:56 +0000 (13:24 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
commit57e25ee7cb4a124c341a506baa3310f639c34abed7ed4d12280ef34e0a558f1f
tree37c47169de78681e0604bbdb099be2d8eee31768d3ee7bf26b3a2f6eb183836a
parent341673be3584cdc7b2f34cd2c77b2d423c15a10db567ef141b550a95cbed5eb0
gitweb: Provide links to commitdiff to each parent in 'commitdiff' view

Since commit-fb1dde4a we show combined diff for merges in 'commitdiff'
view, and since commit-208ecb2e also in 'commit' view. Sometimes
though one would want to see diff to one of merge commit parents. It
is easy in 'commit' view: in the commit header part there are "diff"
links for each of parent header. This commit adds such links also for
'commitdiff' view.

Add to difftree / whatchanged table row with "1", "2", ... links to
'commitdiff' view for diff with n-th parent for merge commits, as a
table header.  This is visible only in 'comitdiff' view, and only for
a merge commit (comit with more than one parent).

To save space links are shown as "n", where "n" is number of a parent,
and not as for example shortened (to 7 characters) sha1 of a parent
commit.  To make it easier to discover what links is for, each link
has 'title' attribute explaining the link.

Note that one would need to remember that difftree table in 'commit'
view has one less column (it doesn't have "patch" link column), if one
would want to add such table header also in 'commit' view.

Example output:
                          1       2       3
  Makefile      patch | diff1 | diff2 | diff3 | blob | history
  cache.h       patch | diff1 | diff2 | diff3 | blob | history

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.css
gitweb.perl
This page took 0.18434 seconds and 4 git commands to generate.