File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -257,9 +257,6 @@ main () {
257257 test -e " $arg_prefix " &&
258258 die " fatal: prefix '$arg_prefix ' already exists."
259259 ;;
260- split)
261- # checked later against the commit, not the working tree
262- ;;
263260 * )
264261 test -e " $arg_prefix " ||
265262 die " fatal: '$arg_prefix ' does not exist; use 'git subtree add'"
@@ -969,12 +966,6 @@ cmd_split () {
969966 else
970967 die " fatal: you must provide exactly one revision, and optionally a repository. Got: '$* '"
971968 fi
972-
973- # Now validate prefix against the commit, not the working tree
974- if ! git ls-tree -d " $rev " -- " $dir " > /dev/null
975- then
976- die " fatal: '$dir ' does not exist in commit $rev "
977- fi
978969 repository=" "
979970 if test " $# " = 2
980971 then
Original file line number Diff line number Diff line change @@ -368,28 +368,6 @@ test_expect_success 'split requires path given by option --prefix must exist' '
368368 )
369369'
370370
371- test_expect_success ' split works when prefix exists in commit but not in working tree' '
372- subtree_test_create_repo "$test_count" &&
373- (
374- cd "$test_count" &&
375-
376- # create subtree
377- mkdir pkg &&
378- echo ok >pkg/file &&
379- git add pkg &&
380- git commit -m "add pkg" &&
381- good=$(git rev-parse HEAD) &&
382-
383- # remove it from working tree in later commit
384- git rm -r pkg &&
385- git commit -m "remove pkg" &&
386-
387- # must still be able to split using the old commit
388- git subtree split --prefix=pkg "$good" >out &&
389- test -s out
390- )
391- '
392-
393371test_expect_success ' split rejects flags for add' '
394372 subtree_test_create_repo "$test_count" &&
395373 subtree_test_create_repo "$test_count/sub proj" &&
You can’t perform that action at this time.
0 commit comments