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

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

diff --show-function-line seems to be broken


From: bpalmer
Subject: diff --show-function-line seems to be broken
Date: Fri, 14 Jan 2005 11:31:52 -0700

I ran across a bug today when I was trying to generate a diff against
some elisp files. I use diff (GNU diffutils) 2.8.1 on cygwin running
windows xp; a friend reports it also does not work on his diff from
diffutils version 2.7 on sparc-sun-solaris2.8. 

Here's a simple test case: produce a file test.c containing just this:
int main() {
  return 2;
}

then produce a file test2.c containing just this:
int main() {
  return 3;
}

This command produces the expected output:
~/temp> diff -p file.c file2.c
*** file.c      Fri Jan 14 11:23:59 2005
--- file2.c     Fri Jan 14 11:24:06 2005
***************
*** 1,3 ****
  int main() {
!   return 2;
  }
--- 1,3 ----
  int main() {
!   return 3;
  }

However, using --show-function-line or -F does not.

~/temp> diff --show-function-line='main' file.c file2.c
2c2
<   return 2;
---
>   return 3;







reply via email to

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