File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -390,22 +390,26 @@ test_expect_success 'diff --staged' '
390
390
test_expect_success ' diff partially-staged' '
391
391
init_repos &&
392
392
393
+ write_script edit-contents <<-\EOF &&
394
+ echo text >>$1
395
+ EOF
396
+
393
397
# Add file within cone
394
398
test_all_match git sparse-checkout set deep &&
395
- run_on_all ' echo > deep/testfile' &&
399
+ run_on_all ../edit-contents deep/testfile &&
396
400
test_all_match git add deep/testfile &&
397
- run_on_all ' echo a new line >> deep/testfile' &&
401
+ run_on_all ../edit-contents deep/testfile &&
398
402
399
403
test_all_match git diff &&
400
404
test_all_match git diff --staged &&
401
405
402
406
# Add file outside cone
403
407
test_all_match git reset --hard &&
404
408
run_on_all mkdir newdirectory &&
405
- run_on_all ' echo > newdirectory/testfile' &&
409
+ run_on_all ../edit-contents newdirectory/testfile &&
406
410
test_all_match git sparse-checkout set newdirectory &&
407
411
test_all_match git add newdirectory/testfile &&
408
- run_on_all ' echo a new line >> newdirectory/testfile' &&
412
+ run_on_all ../edit-contents newdirectory/testfile &&
409
413
test_all_match git sparse-checkout set &&
410
414
411
415
test_all_match git diff &&
You can’t perform that action at this time.
0 commit comments