login
Header Space

 
 

[PATCH 1/2] t7001: add test for git-mv dir1 dir2/

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jon Smirl <jonsmirl@...>, <git@...>, <junkio@...>
Date: Wednesday, July 26, 2006 - 1:41 pm

If dir2 already exists, git-mv should move dir1 _into_dir2/.
Noticed by Jon Smirl.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---

	Jon, this was your problem, right?

 t/t7001-mv.sh |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index d78c56a..322eaad 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -59,4 +59,19 @@ test_expect_success \
      git-diff-tree -r -M --name-status  HEAD^ HEAD | \
      grep -E "^R100.+path0/README.+path2/README"'
 
+test_expect_success \
+    'moving whole subdirectory into subdirectory' \
+    'git-mv path2 path1'
+
+test_expect_success \
+    'commiting the change' \
+    'git-commit -m dir-move -a'
+
+test_expect_success \
+    'checking the commit' \
+    'git-diff-tree -r -M --name-status  HEAD^ HEAD | \
+     grep -E "^R100.+path2/COPYING.+path1/path2/COPYING" &&
+     git-diff-tree -r -M --name-status  HEAD^ HEAD | \
+     grep -E "^R100.+path2/README.+path1/path2/README"'
+
 test_done
-- 
1.4.2.rc2.g96f2-dirty

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Johannes Schindelin, (Wed Jul 26, 1:41 pm)
Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Josef Weidendorfer, (Wed Jul 26, 2:39 pm)
Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Petr Baudis, (Thu Jul 27, 9:30 pm)
[PATCH] Teach git-apply about '-R', Johannes Schindelin, (Fri Jul 28, 6:14 am)
Re: [PATCH] Teach git-apply about '-R', Junio C Hamano, (Fri Jul 28, 11:36 am)
Re: [PATCH] Teach git-apply about '-R', Johannes Schindelin, (Fri Jul 28, 11:50 am)
Re: [PATCH] Teach git-apply about '-R', Junio C Hamano, (Fri Jul 28, 3:20 pm)
Re: [PATCH] Teach git-apply about '-R', Johannes Schindelin, (Fri Jul 28, 3:36 pm)
Re: [PATCH] Teach git-apply about '-R', Linus Torvalds, (Fri Jul 28, 11:14 am)
[PATCH v2] Teach git-apply about '-R', Johannes Schindelin, (Fri Jul 28, 11:46 am)
Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Junio C Hamano, (Thu Jul 27, 10:41 pm)
Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Petr Baudis, (Thu Jul 27, 10:56 pm)
Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Junio C Hamano, (Fri Jul 28, 12:48 am)
Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Petr Baudis, (Fri Jul 28, 11:47 am)
Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Junio C Hamano, (Wed Jul 26, 3:05 pm)
Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Johannes Schindelin, (Wed Jul 26, 2:47 pm)
Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Junio C Hamano, (Wed Jul 26, 2:23 pm)
Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Junio C Hamano, (Wed Jul 26, 2:58 pm)
Re: [PATCH 1/2] t7001: add test for git-mv dir1 dir2/, Junio C Hamano, (Wed Jul 26, 3:31 pm)
speck-geostationary