File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,21 @@ test_expect_success 'Import empty patch with sign-off' '
213
213
stg top | grep -v -e "empty"
214
214
'
215
215
216
+ test_expect_success ' Import with root directory' '
217
+ mkdir -p dir0/dir1/dir2 &&
218
+ echo "hello" >dir0/dir1/dir2/file.txt &&
219
+ stg add dir0/dir1/dir2/file.txt &&
220
+ stg new -rm "dirs" &&
221
+ echo "bye" >>dir0/dir1/dir2/file.txt &&
222
+ git diff --relative=dir0/dir1 >relative.diff &&
223
+ stg reset --hard &&
224
+ command_error stg import --directory=dir0/dir1/dir2 <relative.diff 2>err &&
225
+ grep "error: dir0/dir1/dir2/dir2/file.txt: does not exist in index" err &&
226
+ stg import --name from-relative --3way --directory=dir0/dir1 <relative.diff &&
227
+ stg show from-relative | grep "bye" &&
228
+ stg delete dirs from-relative
229
+ '
230
+
216
231
test_expect_success ' Import series from stdin' '
217
232
echo "some.patch" |
218
233
stg import --series &&
You can’t perform that action at this time.
0 commit comments