[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Missing path element with 'diff --git'

From: Adam Lackorzynski <adam_at_os.inf.tu-dresden.de>
Date: Mon, 14 Dec 2015 10:50:22 +0100

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
Received on 2015-12-14 10:50:39 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.