1 # This script makes several versions of a small test repository that
2 # can be used for testing the format version upgrade code.
8 export LANG LC_ALL PAGER TZ
12 unset COMMIT_AUTHOR_EMAIL
13 unset COMMIT_AUTHOR_NAME
14 unset GIT_ALTERNATE_OBJECT_DIRECTORIES
16 GIT_AUTHOR_EMAIL
=author@example.com
17 GIT_AUTHOR_NAME
='A U Thor'
18 unset GIT_COMMITTER_DATE
19 GIT_COMMITTER_EMAIL
=committer@example.com
20 GIT_COMMITTER_NAME
='C O Mitter'
23 unset GIT_EXTERNAL_DIFF
25 unset GIT_OBJECT_DIRECTORY
26 unset SHA1_FILE_DIRECTORIES
27 unset SHA1_FILE_DIRECTORY
28 export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
29 export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
33 for ver
in 1.1 1.0 0.19 0.12 0.8; do
34 if [ -e $ver.
tar.gz
]; then continue; fi
36 # Get the required stgit version.
39 git archive
--format=tar --prefix=stgit-
$ver/ v
$ver
42 # Set up a repository.
48 git commit
-m 'Initial commit'
53 PATH
=..
/stgit-
$ver:$PATH
57 stg branch
--description='cool branch' || \
58 echo 'cool branch' > .git
/patches
/master
/description
60 for i
in 0 1 2 3 4; do
61 stg new p
$i -m "Patch $i"
66 stg branch
--protect || \
67 echo "'stg branch --protect' not available"
70 # Reduce the number of small files.
75 tar zcf
$ver.
tar.gz
$ver