Git fork
1#!/bin/sh
2#
3# Copyright (c) 2014 Ephrim Khong
4#
5
6test_description='repack involving cyclic alternate'
7
8. ./test-lib.sh
9
10test_expect_success setup '
11 GIT_OBJECT_DIRECTORY=.git//../.git/objects &&
12 export GIT_OBJECT_DIRECTORY &&
13 touch a &&
14 git add a &&
15 git commit -m 1 &&
16 git repack -adl &&
17 echo "$(pwd)"/.git/objects/../objects >.git/objects/info/alternates
18'
19
20test_expect_success 're-packing repository with itself as alternate' '
21 git repack -adl &&
22 git fsck
23'
24
25test_done