View Ticket
Not logged in
Ticket UUID: 7541963870703f09cd5bce54b3977bb2cb8e40eb
Title: diff doesn't show newline
Status: Fixed Type: Code_Defect
Severity: Minor Priority:
Subsystem: Resolution: Fixed
Last Modified: 2012-11-06 16:35:56
Version Found In:
Description & Comments:
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.