mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-25 12:24:47 +02:00
rearrange test repo generators
This commit is contained in:
parent
7bfd8155c2
commit
98c22a36fd
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ notes/go.notes
|
|||||||
TODO.notes
|
TODO.notes
|
||||||
TODO.md
|
TODO.md
|
||||||
test/testrepo/
|
test/testrepo/
|
||||||
|
test/repos/*/repo
|
@ -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
|
|
@ -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
|
|
16
test/repos/case_insensitive_checkouts.sh
Executable file
16
test/repos/case_insensitive_checkouts.sh
Executable 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
|
7
test/repos/extras/pre-commit
Normal file
7
test/repos/extras/pre-commit
Normal 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
16
test/repos/lots_of_commits.sh
Executable 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
|
@ -1,20 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -ex; rm -rf repo; mkdir repo; cd repo
|
||||||
# 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}
|
|
||||||
|
|
||||||
git init
|
git init
|
||||||
|
|
9
test/repos/pre_commit_hook.sh
Executable file
9
test/repos/pre_commit_hook.sh
Executable 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
|
@ -1,20 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -ex; rm -rf repo; mkdir repo; cd repo
|
||||||
# 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}
|
|
||||||
|
|
||||||
git init
|
git init
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user