From: Jakub Narebski <jnareb@gmail.com>
To: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/7] gitweb: show "no difference" message for empty diff
Date: Wed, 18 Apr 2007 15:52:47 +0200 [thread overview]
Message-ID: <200704181552.48363.jnareb@gmail.com> (raw)
In-Reply-To: <11766699702663-git-send-email-mkoegler@auto.tuwien.ac.at>
On Sun, Apr 15, 2007, Martin Koegler wrote:
> Currently, gitweb shows only header and footer, if no differences are
> found. This patch adds a "No differences found" message for the html
> output.
>
> Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
> ---
> $patch_idx does not work, so I need a new variable.
Nice work.
> The css style for the no difference message is useable. If somebody
> does not like, feel free to send a patch with a better layout.
I like it, although I'd rather have "quieter" CSS style for the
"No differences found" message. But it is I think a matter of taste.
Below your patch with my changes.
-- >8 --
From: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Subject: [PATCH 1/7] gitweb: Show "no difference" message for empty diff
Currently, gitweb shows only header and footer, if no differences are
found. This patch adds a "No differences found" message for the html
output.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
gitweb/gitweb.css | 4 ++++
gitweb/gitweb.perl | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 5e40292..2b023bd 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -387,6 +387,10 @@ div.diff.incomplete {
color: #cccccc;
}
+div.diff.nodifferences {
+ font-weight: bold;
+ color: #600000;
+}
div.index_include {
border: solid #d9d8d1;
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c48b35a..cbd8d03 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2398,6 +2398,7 @@ sub git_patchset_body {
my ($fd, $difftree, $hash, $hash_parent) = @_;
my $patch_idx = 0;
+ my $patch_number = 0;
my $patch_line;
my $diffinfo;
my (%from, %to);
@@ -2419,6 +2420,7 @@ sub git_patchset_body {
# git diff header
#assert($patch_line =~ m/^diff /) if DEBUG;
#assert($patch_line !~ m!$/$!) if DEBUG; # is chomp-ed
+ $patch_number++;
push @diff_header, $patch_line;
# extended diff header
@@ -2581,6 +2583,7 @@ sub git_patchset_body {
} continue {
print "</div>\n"; # class="patch"
}
+ print "<div class=\"diff nodifferences\">No differences found</div>\n" if (!$patch_number);
print "</div>\n"; # class="patchset"
}
--
1.5.1
next prev parent reply other threads:[~2007-04-18 23:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <437446e84f3aea71f74fea7ea66db4c1c326fb6b.1176659094.git.mkoegler@auto.tuwien.ac.at>
2007-04-15 20:46 ` [PATCH 1/7] gitweb: show "no difference" message for empty diff Martin Koegler
2007-04-18 13:52 ` Jakub Narebski [this message]
[not found] ` <201e30b3f69b40aec4f52ca16a22206f7db1c17d.1176659094.git.mkoegler@auto.tuwien.ac.at>
2007-04-15 20:46 ` [PATCH 3/7] gitweb: support filename prefix in git_patchset_body/git_difftree_body Martin Koegler
2007-04-27 10:55 ` Jakub Narebski
2007-04-28 8:22 ` Martin Koegler
[not found] ` <85de402216e82cc0f220df9d27370a33538a232a.1176659094.git.mkoegler@auto.tuwien.ac.at>
2007-04-15 20:46 ` [PATCH 4/7] gitweb: Add treediff view Martin Koegler
2007-04-16 20:20 ` Martin Koegler
[not found] ` <481946c2e3cff09ed4a623b1b20b9889666aedb0.1176659095.git.mkoegler@auto.tuwien.ac.at>
2007-04-15 20:46 ` [PATCH 5/7] gitweb: Prototyp for selecting diffs in JavaScript Martin Koegler
2007-05-18 8:49 ` Petr Baudis
2007-05-19 7:57 ` Martin Koegler
2007-05-19 8:27 ` Petr Baudis
[not found] ` <083c27614411a8fd7edafef8f5cba91625c88453.1176659095.git.mkoegler@auto.tuwien.ac.at>
2007-04-15 20:46 ` [PATCH 6/7] gitweb: pass root directory as empty file parameter Martin Koegler
[not found] ` <aba7141dc09643b4d6233f1bfb15677163991a27.1176659095.git.mkoegler@auto.tuwien.ac.at>
2007-04-15 20:46 ` [PATCH 7/7] gitweb: Adapt gitweb.js to new git_treeview calling convention Martin Koegler
[not found] ` <a209e0308fc80ef0623baef8dca49e61b7bafaab.1176659094.git.mkoegler@auto.tuwien.ac.at>
2007-04-15 20:46 ` [PATCH 2/7] gitweb: Support comparing blobs with different names Martin Koegler
2007-04-20 10:34 ` Jakub Narebski
2007-04-20 11:24 ` Junio C Hamano
2007-04-20 20:49 ` Jakub Narebski
2007-04-21 12:23 ` [PATCH 0/4] git-diff: use mode for tree:name syntax (was: Re: [PATCH 2/7] gitweb: Support comparing blobs with different names) Martin Koegler
2007-04-16 20:18 ` [PATCH 2/7] gitweb: Support comparing blobs with different names Martin Koegler
2007-04-29 21:35 ` Jakub Narebski
2007-04-30 5:27 ` Martin Koegler
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=200704181552.48363.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=mkoegler@auto.tuwien.ac.at \
/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;
as well as URLs for NNTP newsgroup(s).