I found diff output is strange when I set --diff-cmd=diff
.
➜ svntest svn diff --diff-cmd=diff -x '' #The cmd `diff` cann't output this format, so strange
Index: a.c
===================================================================
--- a.c (revision 1)
+++ a.c (working copy)
@@ -0,0 +1 @@
+teste
➜ svntest svn diff --diff-cmd=diff -x '-i'
Index: a.c
===================================================================
0a1
> teste
I thought the two commands above essentially excute as below, am I wrong?
➜ svntest diff -L 'a.c(revision 1)' -L 'a.c(working copy)' '/Users/hilojack/www/svntest/.svn/pristine/da/da39a3ee5e6b4b0d3255bfef95601890afd80709.svn-base' '/Users/hilojack/www/svntest/a.c'
0a1
> teste
➜ svntest diff -i -L 'a.c(revision 1)' -L 'a.c(working copy)' '/Users/hilojack/www/svntest/.svn/pristine/da/da39a3ee5e6b4b0d3255bfef95601890afd80709.svn-base' '/Users/hilojack/www/svntest/a.c'
0a1
> teste
I get this from svn help diff
-x [--extensions] ARG : Default: '-u'. When Subversion is invoking an external diff program, ARG is simply passed along to the program.
The subversion will pass default params -u
to external diff program.
➜ svntest svn diff --diff-cmd=echo
Index: a.c
===================================================================
-u -L a.c (revision 1) -L a.c (working copy) /Users/hilojack/www/svntest/.svn/pristine/da/da39a3ee5e6b4b0d3255bfef95601890afd80709.svn-base /Users/hilojack/www/svntest/a.c