chiark / gitweb /
Fix import to work properly in subdirectories
[stgit] / t / t1800-import.sh
index 8c8c9a009f0184db8f73f9468cd1c3ffc8e3c35b..624e51c7b53fe045cfabcaf8aa3e6658154bc249 100755 (executable)
@@ -21,6 +21,17 @@ test_expect_success \
     stg delete ..
     '
 
+test_expect_success \
+    'Apply a patch created with "git diff" from a subdirectory' \
+    '
+    mkdir subdir && cd subdir &&
+    stg import ../../t1800-import/git-diff &&
+    [ $(git cat-file -p $(stg id) \
+        | grep -c "tree e96b1fba2160890ff600b675d7140d46b022b155") = 1 ] &&
+    stg delete .. &&
+    cd ..
+    '
+
 test_expect_success \
     'Apply a patch created with GNU diff' \
     '