From 982916a05ab73f8ca113d45a6ddabcd09f481de5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 11 Feb 2019 22:22:43 +0300 Subject: Implement git repository working tree fix up for package checkout on Windows --- tests/common/git/init | 96 ++++++++++++++++++++++++++++++++ tests/common/git/pack | 1 + tests/common/git/state0/libbar.tar | Bin 81920 -> 81920 bytes tests/common/git/state0/libfoo.tar | Bin 327680 -> 327680 bytes tests/common/git/state0/libfox.tar | Bin 143360 -> 143360 bytes tests/common/git/state0/links.tar | Bin 0 -> 276480 bytes tests/common/git/state0/style-basic.tar | Bin 71680 -> 71680 bytes tests/common/git/state0/style.tar | Bin 143360 -> 143360 bytes tests/common/git/state1/libbaz.tar | Bin 61440 -> 61440 bytes tests/common/git/state1/libfoo.tar | Bin 409600 -> 409600 bytes tests/common/git/state1/libfox.tar | Bin 143360 -> 143360 bytes tests/common/git/state1/style-basic.tar | Bin 71680 -> 71680 bytes tests/common/git/state1/style.tar | Bin 143360 -> 143360 bytes 13 files changed, 97 insertions(+) create mode 100644 tests/common/git/state0/links.tar (limited to 'tests/common') diff --git a/tests/common/git/init b/tests/common/git/init index 4fac21e..5153175 100755 --- a/tests/common/git/init +++ b/tests/common/git/init @@ -42,6 +42,18 @@ fi # cd state0 +rm -f -r links.git/.git +rm -f links.git/.gitmodules +rm -f links.git/bl +rm -f links.git/lc +rm -f links.git/pg +rm -f links.git/bs +rm -f links.git/bf +rm -f links.git/tl +rm -f links.git/td +rm -f links.git/ts +rm -f -r links.git/doc/style + rm -f -r libfoo.git/.git rm -f libfoo.git/.gitmodules rm -f libfoo.git/README @@ -156,6 +168,86 @@ git -C libfox.git submodule add ../libbar.git libbar git -C libfox.git submodule update --init --recursive # Recursive for safety. git -C libfox.git commit -am 'Create' +# Create master branch for links.git, adding style.git as a submodule. +# +git -C links.git init + +cat <links.git/manifest +: 1 +name: links +version: 0.0.1 +summary: links +license: MIT +url: http://example.org +email: pkg@example.org +EOF + +git -C links.git add '*' +git -C links.git submodule add ../style.git doc/style +git -C links.git submodule update --init --recursive # Updates doc/style/basic. +git -C links.git commit -am 'Create' +git -C links.git tag -a 'v0.0.1' -m 'Tag version 0.0.1' + +# Increase links version and add symlinks. +# +cat <links.git/manifest +: 1 +name: links +version: 1.0.0-a.0.z +summary: links +license: MIT +url: http://example.org +email: pkg@example.org +EOF + +ln -s tests links.git/ts # Directory symlink. +ln -s ts/TODO links.git/td # File symlink via directory symlink. +ln -s td links.git/tl # Symlink symlink. +ln -s doc/style/buildfile links.git/bf # Submodule file symlink. +ln -s doc/style/basic links.git/bs # Submodule directory symlink. +ln -s bs/page.css links.git/pg # Symlink via submodule directory symlink. + +git -C links.git add '*' +git -C links.git commit -am 'Add symlinks' +git -C links.git tag -a 'v1.0.0-alpha' -m 'Tag version 1.0.0-alpha' + +# Increase links version and add dangling symlink. +# +cat <links.git/manifest +: 1 +name: links +version: 1.0.1 +summary: links +license: MIT +url: http://example.org +email: pkg@example.org +EOF + +ln -s lc links.git/bl # Dangling symlink. + +git -C links.git add '*' +git -C links.git commit -am 'Add dangling symlinks' +git -C links.git tag -a 'v1.0.1' -m 'Tag version 1.0.1' + +# Increase links version and add cyclic symlink. +# +cat <links.git/manifest +: 1 +name: links +version: 1.0.2 +summary: links +license: MIT +url: http://example.org +email: pkg@example.org +EOF + +ln -s bl links.git/lc # Cyclic symlink. + +git -C links.git add '*' +git -C links.git commit -am 'Add cyclic symlinks' +git -C links.git tag -a 'v1.0.2' -m 'Tag version 1.0.2' + + # Create the modified state of the repositories, replacing libbar.git submodule # of libfoo with the newly created libbaz.git repository. Also advance master # branches and tags for libfoo.git and it's submodule style.git. @@ -169,6 +261,10 @@ for d in ../state0/*.git; do cp -r $d . done +# Drop the links.git repository. +# +rm -f -r links.git/ + # Create libbaz.git repository. # rm -f -r libbaz.git/.git diff --git a/tests/common/git/pack b/tests/common/git/pack index f9d9772..fd0b49c 100755 --- a/tests/common/git/pack +++ b/tests/common/git/pack @@ -15,6 +15,7 @@ function error () { info "$*"; exit 1; } projects=(\ state0/libfoo state0/libfox state0/libbar state0/style state0/style-basic \ + state0/links \ state1/libfoo state1/libfox state1/libbaz state1/style state1/style-basic) for p in "${projects[@]}"; do diff --git a/tests/common/git/state0/libbar.tar b/tests/common/git/state0/libbar.tar index 2e1a3ad..027112c 100644 Binary files a/tests/common/git/state0/libbar.tar and b/tests/common/git/state0/libbar.tar differ diff --git a/tests/common/git/state0/libfoo.tar b/tests/common/git/state0/libfoo.tar index 6a0cc8a..96a9f5b 100644 Binary files a/tests/common/git/state0/libfoo.tar and b/tests/common/git/state0/libfoo.tar differ diff --git a/tests/common/git/state0/libfox.tar b/tests/common/git/state0/libfox.tar index a73f460..fc2c391 100644 Binary files a/tests/common/git/state0/libfox.tar and b/tests/common/git/state0/libfox.tar differ diff --git a/tests/common/git/state0/links.tar b/tests/common/git/state0/links.tar new file mode 100644 index 0000000..33c5dbf Binary files /dev/null and b/tests/common/git/state0/links.tar differ diff --git a/tests/common/git/state0/style-basic.tar b/tests/common/git/state0/style-basic.tar index 36d0dcd..8b57bd0 100644 Binary files a/tests/common/git/state0/style-basic.tar and b/tests/common/git/state0/style-basic.tar differ diff --git a/tests/common/git/state0/style.tar b/tests/common/git/state0/style.tar index 7b48a9d..56e29f0 100644 Binary files a/tests/common/git/state0/style.tar and b/tests/common/git/state0/style.tar differ diff --git a/tests/common/git/state1/libbaz.tar b/tests/common/git/state1/libbaz.tar index 1b35ec4..7acf277 100644 Binary files a/tests/common/git/state1/libbaz.tar and b/tests/common/git/state1/libbaz.tar differ diff --git a/tests/common/git/state1/libfoo.tar b/tests/common/git/state1/libfoo.tar index ab694f7..532e974 100644 Binary files a/tests/common/git/state1/libfoo.tar and b/tests/common/git/state1/libfoo.tar differ diff --git a/tests/common/git/state1/libfox.tar b/tests/common/git/state1/libfox.tar index a6ef40e..ec49a86 100644 Binary files a/tests/common/git/state1/libfox.tar and b/tests/common/git/state1/libfox.tar differ diff --git a/tests/common/git/state1/style-basic.tar b/tests/common/git/state1/style-basic.tar index 7b7a6c5..1946606 100644 Binary files a/tests/common/git/state1/style-basic.tar and b/tests/common/git/state1/style-basic.tar differ diff --git a/tests/common/git/state1/style.tar b/tests/common/git/state1/style.tar index e6243f4..769b6d5 100644 Binary files a/tests/common/git/state1/style.tar and b/tests/common/git/state1/style.tar differ -- cgit v1.1