Let's say there is no content in a.c file, and then one modifies the file as follows:
#include <stdio.h>
int main()
{
printf("Hello, world\n");
}
Executing svn diff, I got this message.
--- b.c (revision 1)
+++ b.c (working copy)
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main()
+{
+ printf("Hello, world\n");
+}
Adding one more line in the code:
#include <stdio.h>
int main()
{
printf("Hello, world\n");
printf("Goodbye, world\n");
}
This is the svn diff result:
--- b.c (revision 2)
+++ b.c (working copy)
@@ -3,4 +3,5 @@
int main()
{
printf("Hello, world\n");
+ printf("Goodbye, world\n");
}
I guess for old(-) and new(+) version, the number after comma is the line of total numbers shown. However, I'm not sure about the number before comma. I think it's where the change starts, but for the first case, the new(+) version has the number 1 not 0.
How one interprets the svn diff output?