summaryrefslogtreecommitdiff
path: root/test/create_test_repo.sh
blob: f56d9cb5eaecf21d65e3d0b92555d2032348c8bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

mkdir -p test/test_repo

cd test/test_repo

__git () {   git "$@" 2>/dev/null ; }
_git  () { __git "$@" > /dev/null ; }

_git init -q

echo -n "FOOBAR" > testblob

_git add testblob

GIT_AUTHOR_NAME="Gall Test Suite Author"
GIT_AUTHOR_EMAIL="gall-author@gitano.org.uk"
GIT_AUTHOR_DATE="1347114766 +0000"
GIT_COMMITTER_NAME="Gall Test Suite Committer"
GIT_COMMITTER_EMAIL="gall-committer@gitano.org.uk"
GIT_COMMITTER_DATE="1347114766 +0100"

export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE
export GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL GIT_COMMITTER_DATE

_git commit -m "Initial"

echo -n "BAZMETA" > testblob

_git add testblob

_git commit -m "Second"

_git checkout -b branchy 'HEAD^'

echo -n "NEW" > secondblob

_git add secondblob
_git commit -m "branchy"

_git checkout master

_git merge branchy

_git tag -a -m "Annotated Tag. Wahey" v1.0

(cd .git; tar xf ../../signed.tar)