git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] t9300: Add a test covering 'sub/testname' to 'sub/testname/testfile' renaming

From
Techlive Zheng <techlivezheng@gmail.com>
Date
Aug 8, 2012, 19:42 UTC
Message-ID
<1344454971-19559-1-git-send-email-techlivezheng@gmail.com>
This test would fail at the moment.
---
 t/t9300-fast-import.sh | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 2fcf269..2a8368e 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -1039,6 +1039,37 @@ test_expect_success \
 	 git diff-tree -M -r M3^ M3 >actual &&
 	 compare_diff_raw expect actual'
 
+cat >input <<INPUT_END
+blob
+mark :1
+data 10
+test file
+
+reset refs/heads/M4
+commit refs/heads/M4
+mark :2
+committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+data 8
+initial
+M 100644 :1 testname
+
+commit refs/heads/M5
+mark :3
+committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+data 8
+initial
+from refs/heads/M4
+M 100644 :1 testname/testfile
+D testname
+
+INPUT_END
+
+test_expect_success \
+	'M: rename file into new subdirectory with same name' \
+	'git fast-import <input &&
+	 git checkout M5 &&
+	 test -d testname && test -f testname/testfile'
+
 ###
 ### series N
 ###
-- 
1.7.11.4
Next: Techlive Zheng
Message 1 of 3 in “t9300: Add a test covering 'sub/testname' to 'sub/testname/testfile' renaming”
  1. 1/2 t9300: Add a test covering 'sub/testname' to 'sub/testname/testfile' renamingTechlive Zheng, Aug 8, 2012
  2. 2/2 fast-import: Handle 'sub/testname' to 'sub/testname/testfile' renaming correctlyTechlive Zheng, Aug 8, 2012
  3. Junio C HamanoAug 8, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.