Bug 105606

Summary: kompare refuses to compare with a file containing "--- ... ---"
Product: [Applications] kompare Reporter: Willi Richert <w.richert>
Component: generalAssignee: Kompare developers <kompare-devel>
Status: CONFIRMED ---    
Severity: normal CC: adrian, bleverett, chealer, esigra, finex, gmatht, zwaardmeester
Priority: NOR    
Version: 4.1.2   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Willi Richert 2005-05-13 13:08:32 UTC
Version:           3.4 (using KDE 3.4.0-5.3.3.kde, Fedora)
Compiler:          gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
OS:                Linux (i686) release 2.6.11-1.14_FC3

Comparing a file with two consecutive "---" strings gives an error dialog saying

Keine Modelle oder keine Unterschiede vorhanden. Die Datei /tmp/kompare-test ist keine gültige diff-Datei.

Between the two "---" strings there can be any content.
Comment 1 Jeff Snyder 2005-06-06 21:44:51 UTC
This is gonna be a little spammy... I'm reassigning everything that's currently 
assigned to bruggie (who's been the default assignee for bugs since time began) 
to the new list address. 
 
Bruggie: if you're working on one or more of these atm, please snatch 'em 
back.. 
 
Everyone, esp. Joshua and Bruggie: if this genrates 33 mails, my sincere 
apologies.. 
Comment 2 John C. McCabe-Dansted 2008-04-18 09:48:00 UTC
In my case it says
"No models or no differences, this file: /home/xp/b, is not a valid diff file."

I can confirm this on 
  Kompare 3.4 (Using KDE 3.5.5-0.2.fc6 Fedora-Core)
and
  KDE 3.5.8 (Ubuntu 7.10)
Comment 3 FiNeX 2009-01-04 16:21:19 UTC
Please, could you explain how to exactly reproduce the bug?

thanks!
Comment 4 John C. McCabe-Dansted 2009-01-04 16:45:49 UTC
To reproduce:
echo "--- ---" > test
echo hi > hi
kompare test hi

Still occurs in Ubuntu 8.10 (Kompare 3.5 1, KDE 4.1.3)
Comment 5 FiNeX 2009-01-04 17:02:39 UTC
Thanks! I've reproduced it too using current trunk r905373!
Comment 6 Kevin Kofler 2009-01-04 18:51:07 UTC
That's because it thinks the file which starts with -- is a diff and thus interprets the 2 files as a diff and a target file, not as 2 files to compare.
Comment 7 Blake Leverett 2009-01-28 20:09:26 UTC
(In reply to comment #4)
> To reproduce:
> echo "--- ---" > test
> echo hi > hi
> kompare test hi

This happens to me, too, with asterisks:
 *** empty log message ***
In a .c file, I get the message "No models or no differences "...

Also, "+++ +++" causes the error to occur.  I tried a bunch of other characters besides these, but I only found the plus symbol to also cause the problem.


Comment 8 Adrián Chaves (Gallaecio) 2012-10-05 22:04:12 UTC
Still happening in Kompare 4.1.2.
Comment 9 zwaardmeester 2013-05-27 11:54:07 UTC
Please someone have a look!
Comment 10 Philippe Cloutier 2014-09-03 03:29:05 UTC
Also happens with "==="  foo  "===" (MediaWiki subsection foo).