Fossil SCM

fossil diff produces a non-working patch

Fixed

a9f7b23c2e376af… · opened 15 years, 7 months ago

Type
Code_Defect
Priority
Severity
Important
Resolution
Fixed
Subsystem
Created
Aug. 20, 2010 10:05 p.m.

Using the repo at [http://fossil.msofer.com/wip].

Checkout 17ac7d08a76ec30730903eeabb454aa69032979d, then diff from af27f155bafb13628c80786c0964a7f5cc73b1ec.

When you try to apply the patch: there are rejections.


drh added on 2010-08-21 03:41:22:
The problem seems to be that the "fossil diff" command ignores whitespace at the end of lines. IIRC, I added this "feature" when I encountered some check-ins from people using windows editors that inserted \r at the end of every line. If end-of-line whitespace is not ignored in that case, then the diff output is useless.

Maybe the right solution is to make "diff" output ignore end-of-line whitespace but create a new command for generating patches that takes end-of-line whitespace into account?


anonymous added on 2010-08-21 13:58:02:
This does not work even after asking fossil to use an external diff:

fossil set diff-command /usr/bin/diff

still produces unusable patches.

Actually, it still produces a unified diff - so apparently it is not calling the external diff at all. Same result if setting diff-command to FOO.


anonymous added on 2010-08-21 14:02:16:
What's more: this seems not to be just a whitespace-at-the-end issue: patch -l still finds (fewer) conflicts.

Keyboard Shortcuts

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