bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

diff and dos line endings


From: Toshio
Subject: diff and dos line endings
Date: Fri, 08 Apr 2005 19:54:33 -0400

While working with quilt on a project which used dos line endings, I
found a bug with the way diff --show-c-function works.

If you do a diff -u --show-c-function test.c.bak test.c with the
included files, you'll see that diff -u generates the following line in
its output::
  @@ -4,5 +4,5 @@ int tester()^M

This line causes problems for patch (GNU version 2.5.4) which doesn't
understand the \r\n at the end of that line.

The included diffutils-2.8.1-funclf.patch includes a small change to the
characters that can stop the detection of functions for the --show-c-
function that make diff produce output with only a \n at the end of the
line.

-Toshio
-- 

________S_________U_________B_________L_________I_________M_________E________
     t  o  s  h  i  o  @  t  i  k  i  -  l  o  u  n  g  e  .  c  o  m
                                                                GA->ME 1999

Attachment: test.c
Description: Text Data

Attachment: test.c.bak
Description: application/trash

Attachment: diffutils-2.8.1-funclf.patch
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]