aboutsummaryrefslogtreecommitdiff
path: root/t/t9301-fast-export.sh
diff options
context:
space:
mode:
authorPieter de Bie <pdebie@ai.rug.nl>2008-06-11 13:17:04 +0200
committerJunio C Hamano <gitster@pobox.com>2008-06-19 15:52:53 -0700
commitdf6a7ff7ac55d320afa1b8a59393122d6ca0f6c4 (patch)
treed970fad945945bf0966fec8c3504f8e777a36354 /t/t9301-fast-export.sh
parente449f105805ffa49ccf7cf080db897ecf65a1a0f (diff)
downloadgit-df6a7ff7ac55d320afa1b8a59393122d6ca0f6c4.tar.gz
git-df6a7ff7ac55d320afa1b8a59393122d6ca0f6c4.tar.xz
builtin-fast-export: Add importing and exporting of revision marks
This adds the --import-marks and --export-marks to fast-export. These import and export the marks used to for all revisions exported in a similar fashion to what fast-import does. The format is the same as fast-import, so you can create a bidirectional importer / exporter by using the same marks file on both sides. Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9301-fast-export.sh')
-rwxr-xr-xt/t9301-fast-export.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t9301-fast-export.sh b/t/t9301-fast-export.sh
index f09bfb111..60b5ee397 100755
--- a/t/t9301-fast-export.sh
+++ b/t/t9301-fast-export.sh
@@ -78,6 +78,30 @@ test_expect_success 'iso-8859-1' '
git cat-file commit i18n | grep "Áéí óú")
'
+test_expect_success 'import/export-marks' '
+
+ git checkout -b marks master &&
+ git fast-export --export-marks=tmp-marks HEAD &&
+ test -s tmp-marks &&
+ cp tmp-marks ~ &&
+ test $(wc -l < tmp-marks) -eq 3 &&
+ test $(
+ git fast-export --import-marks=tmp-marks\
+ --export-marks=tmp-marks HEAD |
+ grep ^commit |
+ wc -l) \
+ -eq 0 &&
+ echo change > file &&
+ git commit -m "last commit" file &&
+ test $(
+ git fast-export --import-marks=tmp-marks \
+ --export-marks=tmp-marks HEAD |
+ grep ^commit\ |
+ wc -l) \
+ -eq 1 &&
+ test $(wc -l < tmp-marks) -eq 4
+
+'
cat > signed-tag-import << EOF
tag sign-your-name