Fossil SCM

diff doesn't show newline

Fixed

7541963870703f0… · opened 13 years, 5 months ago

Type
Code_Defect
Priority
Severity
Minor
Resolution
Fixed
Subsystem
Created
Nov. 6, 2012 7:50 a.m.

Pretty easy to reproduce, but rather irritating when you can't get back any status as to what exactly changed.

% printf "some file with\nno trailing newline on the last line" > foo.hpp
% fs ci -m "Test file with no trailing space" foo.hpp
% echo >> foo.hpp
% fs status
EDITED     foo.hpp
% fs diff --brief foo.hpp
CHANGED  foo.hpp
% fs di foo.hpp
% 

Even fossil gdiff doesn't show the normal diff(1) output:

% printf "foo\nhere" >> t1
% printf "foo\nhere\n" >> t2
% diff -u t1 t2 
--- t1  2012-11-05 23:47:39.000000000 -0800
+++ t2  2012-11-05 23:47:44.000000000 -0800
@@ -1,2 +1,2 @@
 foo
-here
\ No newline at end of file
+here

While it makes sense that it wouldn't, the UI also doesn't show the newly added newline in the UI's diff.

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button