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
| Linus Torvalds | Re: Linux 2.6.26-rc4 |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Greg Kroah-Hartman | [PATCH 019/196] DMA: Convert from class_device to device for DMA engine |
| Justin Piszcz | Linux Software RAID 5 Performance Optimizations: 2.6.19.1: (211MB/s read & 195... |
git: | |
| Li Frank-B20596 | why not TortoiseGit |
| Peter Stahlir | Git as a filesystem |
| Abdelrazak Younes | Git-windows and git-svn? |
| Wincent Colaiuta | Possible to make a totally empty repository for remote access? |
| rezidue | Speed Problems |
| Pieter Verberne | pkg_add keeps giving errors |
| Sam Fourman Jr. | Expat in OpenBSD -current |
| Damian Gerow | Oddly high load average |
| Eric W. Biederman | [PATCH 0/10] sysfs network namespace support |
| Volker Armin Hemmann | build error with 2.6.27.6+reiser4+ehci-hub patch. ERROR: "mii_ethtool_gset" [drive... |
| Andy Furniss | WARNING: at net/ipv4/tcp_input.c |
| Patrick McHardy | Re: [LARTC] ifb and ppp |
