aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSverre Rabbelier <srabbelier@gmail.com>2009-12-04 18:07:00 +0100
committerJunio C Hamano <gitster@pobox.com>2009-12-05 12:43:24 -0800
commitbc3c79aefc9cdb1127e1dfd22ad19cf6c6e94f09 (patch)
tree80ceef0c29aca1b324d3886ee7aefd0d3f4d58d6 /t
parent081751c882f8398081b94335faa23912a655fb1c (diff)
downloadgit-bc3c79aefc9cdb1127e1dfd22ad19cf6c6e94f09.tar.gz
git-bc3c79aefc9cdb1127e1dfd22ad19cf6c6e94f09.tar.xz
fast-import: add (non-)relative-marks feature
After specifying 'feature relative-marks' the paths specified with 'feature import-marks' and 'feature export-marks' are relative to an internal directory in the current repository. In git-fast-import this means that the paths are relative to the '.git/info/fast-import' directory. However, other importers may use a different location. Add 'feature non-relative-marks' to disable this behavior, this way it is possible to, for example, specify the import-marks location as relative, and the export-marks location as non-relative. Also add tests to verify this behavior. Cc: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t9300-fast-import.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index ba92775b9..a1b8c2bb9 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -1346,6 +1346,31 @@ test_expect_success 'R: multiple --import-marks= should be honoured' '
test_cmp marks.out combined.marks
'
+cat >input <<EOF
+feature relative-marks
+feature import-marks=relative.in
+feature export-marks=relative.out
+EOF
+
+test_expect_success 'R: feature relative-marks should be honoured' '
+ mkdir -p .git/info/fast-import/ &&
+ cp marks.new .git/info/fast-import/relative.in &&
+ git fast-import <input &&
+ test_cmp marks.new .git/info/fast-import/relative.out
+'
+
+cat >input <<EOF
+feature relative-marks
+feature import-marks=relative.in
+feature no-relative-marks
+feature export-marks=non-relative.out
+EOF
+
+test_expect_success 'R: feature no-relative-marks should be honoured' '
+ git fast-import <input &&
+ test_cmp marks.new non-relative.out
+'
+
cat >input << EOF
option git quiet
blob