#!/bin/sh # # Copyright (c) 2014 Ephrim Khong # global test_description := ''repack involving cyclic alternate'' source ./test-lib.sh test_expect_success setup ' GIT_OBJECT_DIRECTORY=.git//../.git/objects && export GIT_OBJECT_DIRECTORY && touch a && git add a && git commit -m 1 && git repack -adl && echo "$(pwd)"/.git/objects/../objects >.git/objects/info/alternates ' test_expect_success 're-packing repository with itsself as alternate' ' git repack -adl && git fsck ' test_done (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"repack involving cyclic alternate">)} spids: [13] ) ] spids: [13] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(setup)} { (SQ <"\n"> <"\tGIT_OBJECT_DIRECTORY=.git//../.git/objects &&\n"> <"\texport GIT_OBJECT_DIRECTORY &&\n"> <"\ttouch a &&\n"> <"\tgit add a &&\n"> <"\tgit commit -m 1 &&\n"> <"\tgit repack -adl &&\n"> <"\techo \"$(pwd)\"/.git/objects/../objects >.git/objects/info/alternates\n"> ) } ) (C {(test_expect_success)} {(SQ <"re-packing repository with itsself as alternate">)} {(SQ <"\n"> <"\tgit repack -adl &&\n"> <"\tgit fsck\n">)} ) (C {(test_done)}) ] )