diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-08-25 16:00:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-25 16:00:32 -0700 |
commit | 1d21112a946b338feaa4df4183ea26ac5d1353d0 (patch) | |
tree | 5038b2bbaba3c88dcddd7a5e0460cbc9b873d136 /t/t9300-fast-import.sh | |
parent | 7abd8fb36d90cc68d471a04b59846d7816609116 (diff) | |
parent | 3beb4fc461e72f0b93ae233dcc1cece0046b8eb8 (diff) | |
download | git-1d21112a946b338feaa4df4183ea26ac5d1353d0.tar.gz |
Merge branch 'di/fast-import-doc'
* di/fast-import-doc:
doc/fast-import: document feature import-marks-if-exists
Diffstat (limited to 't/t9300-fast-import.sh')
-rwxr-xr-x | t/t9300-fast-import.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index f256475020..2cb4494262 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -1882,6 +1882,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 |