git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] gitweb: Fix bug in git_difftree_body (was '!=' instead of 'ne')

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 3, 2007, 19:47 UTC
Message-ID
<11678536452473-git-send-email-jnareb@gmail.com>

Fix bug in git_difftree_body subroutine; it was used '!=' comparison operator for strings (file type) instead of correct 'ne'.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7f54834..05b3876 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2274,7 +2274,7 @@ sub git_difftree_body {
 			my $mode_chnge = "";
 			if ($diff{'from_mode'} != $diff{'to_mode'}) {
 				$mode_chnge = "<span class=\"file_status mode_chnge\">[changed";
-				if ($from_file_type != $to_file_type) {
+				if ($from_file_type ne $to_file_type) {
 					$mode_chnge .= " from $from_file_type to $to_file_type";
 				}
 				if (($from_mode_oct & 0777) != ($to_mode_oct & 0777)) {
-- 
1.4.4.3
Next: Jakub Narebski
Message 1 of 2 in “gitweb: Fix bug in git_difftree_body (was '!=' instead of 'ne')”
  1. 1/2 gitweb: Fix bug in git_difftree_body (was '!=' instead of 'ne')Jakub Narebski, Jan 3, 2007
  2. 2/2 gitweb: There can be empty patches (in git_patchset_body)Jakub Narebski, Jan 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.