X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft9300-fast-import.sh;h=1a6c06631c1c2a8fc29b66c9265541b54e8a9715;hb=2f9e2e75874e0f0722382106e2e189cc3f95cc7d;hp=ab9493478cdaf4036bf1b79988cc2fac0fa22f4b;hpb=6c447f633cedd6e2366151b0b82b1731f8c1ee1d;p=git.git diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index ab9493478..1a6c06631 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -391,6 +391,105 @@ test_expect_success \ test `git rev-parse master` = `git rev-parse TEMP_TAG^`' rm -f .git/TEMP_TAG +git gc 2>/dev/null >/dev/null +git prune 2>/dev/null >/dev/null + +cat >input < $GIT_COMMITTER_DATE +data </dev/null >/dev/null +git prune 2>/dev/null >/dev/null + +cat >input < $GIT_COMMITTER_DATE +data </dev/null >/dev/null +git prune 2>/dev/null >/dev/null + +cat >input < $GIT_COMMITTER_DATE +data <input < $GIT_COMMITTER_DATE +data <input <> $GIT_COMMITTER_DATE +data <input <input < $GIT_COMMITTER_DATE +data <output && test_cmp expect output' +cat >input < 1112912473 -0700 +data < 1112912473 -0700 +data <expect +g/b/f +g/b/h +EOF + +test_expect_success \ + 'L: nested tree copy does not corrupt deltas' \ + 'git fast-import tmp && + cat tmp | cut -f 2 >actual && + test_cmp expect actual && + git fsck `git rev-parse L2`' + +git update-ref -d refs/heads/L2 + ### ### series M ### @@ -1949,6 +2089,53 @@ test_expect_success 'R: --import-marks-if-exists' ' test_cmp expect io.marks ' +test_expect_success 'R: feature import-marks-if-exists' ' + rm -f io.marks && + >expect && + + git fast-import --export-marks=io.marks <<-\EOF && + feature import-marks-if-exists=not_io.marks + EOF + test_cmp expect io.marks && + + blob=$(echo hi | git hash-object --stdin) && + + echo ":1 $blob" >io.marks && + echo ":1 $blob" >expect && + echo ":2 $blob" >>expect && + + git fast-import --export-marks=io.marks <<-\EOF && + feature import-marks-if-exists=io.marks + blob + mark :2 + data 3 + hi + + EOF + test_cmp expect io.marks && + + echo ":3 $blob" >>expect && + + git fast-import --import-marks=io.marks \ + --export-marks=io.marks <<-\EOF && + feature import-marks-if-exists=not_io.marks + blob + mark :3 + data 3 + hi + + EOF + test_cmp expect io.marks && + + >expect && + + git fast-import --import-marks-if-exists=not_io.marks \ + --export-marks=io.marks <<-\EOF + feature import-marks-if-exists=io.marks + EOF + test_cmp expect io.marks +' + cat >input << EOF feature import-marks=marks.out feature export-marks=marks.new @@ -2264,6 +2451,48 @@ test_expect_success 'R: quiet option results in no stats being output' ' test_cmp empty output ' +test_expect_success 'R: feature done means terminating "done" is mandatory' ' + echo feature done | test_must_fail git fast-import && + test_must_fail git fast-import --done expect <<-\EOF && + OBJID + :000000 100644 OBJID OBJID A hello.c + :000000 100644 OBJID OBJID A hello2.c + EOF + git fast-import <<-EOF && + commit refs/heads/done-ends + committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE + data <actual && + test_cmp expect actual +' + cat >input <