copytrace: add test-git-rename.t

Summary:
add test for git rename, confirm it does not detect renames. After we
complete the feature, this test should fail and need to update.

Reviewed By: quark-zju

Differential Revision: D42787246

fbshipit-source-id: b65c454b3abf1cf7b25e5a501e3b4c652940a834
This commit is contained in:
Zhaolong Zhu 2023-01-27 13:01:54 -08:00 committed by Facebook GitHub Bot
parent 614a1a8a38
commit bb149840db

View File

@ -0,0 +1,30 @@
#require git no-windows
#debugruntest-compatible
$ . $TESTDIR/git.sh
$ setconfig diff.git=True
Prepare repo
$ hg init --git repo1
$ cd repo1
$ echo 1 >> a
$ hg ci -q -Am 'add a'
Test mv
$ hg mv a b
$ hg ci -Am 'mv a -> b'
$ hg diff -r.~1 -r .
diff --git a/a b/a
deleted file mode 100644
--- a/a
+++ /dev/null
@@ -1,1 +0,0 @@
-1
diff --git a/b b/b
new file mode 100644
--- /dev/null
+++ b/b
@@ -0,0 +1,1 @@
+1