1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-23 12:18:51 +02:00

rearrange test repo generators

This commit is contained in:
Jesse Duffield 2018-08-12 15:54:59 +10:00
parent 7bfd8155c2
commit 98c22a36fd
9 changed files with 51 additions and 92 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ notes/go.notes
TODO.notes
TODO.md
test/testrepo/
test/repos/*/repo

View File

@ -1,30 +0,0 @@
#!/bin/bash
# this script makes a repo with lots of commits
# call this command from the test directory:
# ./lots_of_commits.sh; cd testrepo; gg; cd ..
# -e means exit if something fails
# -x means print out simple commands before running them
set -ex
reponame="case_insensitive_checkouts"
rm -rf ${reponame}
mkdir ${reponame}
cd ${reponame}
git init
touch foo
git add foo
git commit -m "init"
git branch -a
git branch test
git branch TEST
git checkout TEST
git checkout TeST
git checkout TesT
git checkout TEsT
git branch -a

View File

@ -1,30 +0,0 @@
#!/bin/bash
# this script makes a repo with lots of commits
# call this command from the test directory:
# ./lots_of_commits.sh; cd testrepo; gg; cd ..
# -e means exit if something fails
# -x means print out simple commands before running them
set -ex
reponame="lots_of_commits"
rm -rf ${reponame}
mkdir ${reponame}
cd ${reponame}
git init
i=2
end=100
while [ $i -le $end ]; do
echo "file${i}" > file${i}
git add file${i}
git commit -m file${i}
i=$(($i+1))
done
echo "unstaged change" > file100

View File

@ -0,0 +1,16 @@
#!/bin/bash
set -ex; rm -rf repo; mkdir repo; cd repo
git init
touch foo
git add foo
git commit -m "init"
git branch -a
git branch test
git branch TEST
git checkout TEST
git checkout TeST
git checkout TesT
git checkout TEsT
git branch -a

View File

@ -0,0 +1,7 @@
#!/bin/bash
echo "test1"
sleep 1
echo "test2"
sleep 1
echo "test3"

16
test/repos/lots_of_commits.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
set -ex; rm -rf repo; mkdir repo; cd repo
git init
i=2
end=100
while [ $i -le $end ]; do
echo "file${i}" > file${i}
git add file${i}
git commit -m file${i}
i=$(($i+1))
done
echo "unstaged change" > file100

View File

@ -1,20 +1,5 @@
#!/bin/bash
# this script will make a repo with a master and develop branch, where we end up
# on the master branch and if we try and merge master we get a merge conflict
# call this command from the test directory:
# ./merge_conflict.sh; cd testrepo; gg; cd ..
# -e means exit if something fails
# -x means print out simple commands before running them
set -ex
reponame="merge_conflict"
rm -rf ${reponame}
mkdir ${reponame}
cd ${reponame}
set -ex; rm -rf repo; mkdir repo; cd repo
git init

9
test/repos/pre_commit_hook.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -ex; rm -rf repo; mkdir repo; cd repo
git init
cp ../pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
echo "file" > file
git add file

View File

@ -1,20 +1,5 @@
#!/bin/bash
# this script will make a repo with a master and develop branch, where we end up
# on the master branch and if we try and merge master we get a merge conflict
# call this command from the test directory:
# ./generate_basic_repo.sh; cd testrepo; gg; cd ..
# -e means exit if something fails
# -x means print out simple commands before running them
set -ex
reponame="unicode_characters"
rm -rf ${reponame}
mkdir ${reponame}
cd ${reponame}
set -ex; rm -rf repo; mkdir repo; cd repo
git init