You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Adam Lackorzynski <ad...@os.inf.tu-dresden.de> on 2015/12/14 10:50:22 UTC

Missing path element with 'diff --git'

Hi,

with 'svn diff --git', the diff output is missing the last path element:

+ svn diff -r1:2 --git file:///tmp/t/repo/dir1/dir2
Index: file
===================================================================
diff --git a/dir1/file b/dir1/file
--- a/dir1/file (revision 1)
+++ b/dir1/file (revision 2)
@@ -1 +1,2 @@
 line1
+line2

It should be
diff --git a/dir1/dir2/file b/dir1/dir2/file
--- a/dir1/dir2/file 
etc.

Additionally, shouldn't the index_path also be the full path rather than
just the relative one?

This happens with both 1.9 and trunk.

Script to reproduce:
et -x
rm -rf /tmp/t
mkdir /tmp/t
svnadmin create /tmp/t/repo
cd /tmp/t
svn co file:///tmp/t/repo s
cd s
mkdir -p dir1/dir2
echo line1 > dir1/dir2/file
svn add dir1
svn ci -mcommit1 dir1
echo line2 >> dir1/dir2/file
svn ci -mcommit2 dir1
svn diff -r1:2 --git file:///tmp/t/repo/dir1/dir2


BR,
Adam