diff options
author | Adam Spiers <git@adamspiers.org> | 2018-05-17 14:48:33 +0100 |
---|---|---|
committer | Adam Spiers <git@adamspiers.org> | 2018-05-17 14:48:33 +0100 |
commit | 7923bdd7e639c60434085510a982c8c56053cee0 (patch) | |
tree | a7ba9f795d7d11eff257ba221cdd2bba7e7751e6 /tests | |
parent | 5fa846de498fefaae8a1bbaa3b29a6ecdfa16ec6 (diff) | |
download | git-deps-7923bdd7e639c60434085510a982c8c56053cee0.tar.gz |
create-repo.sh: create feature branch on separate invocation
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/create-repo.sh | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/tests/create-repo.sh b/tests/create-repo.sh index f97e6e4..f837b5d 100755 --- a/tests/create-repo.sh +++ b/tests/create-repo.sh @@ -54,22 +54,33 @@ main () { edit file-a three foo # depends on file-a tag edit file-b three bar # depends on file-b tag + # Change non-overlapping part of previously changed file + edit file-a eight foo # depends on file-a tag + + # Change previously changed line + edit file-a three baz # depends on file-a-three-a tag +} + +feature () { + cd $test_repo + # Start a feature branch - git checkout -b feature + git checkout -b feature file-b-three-bar new_file file-c edit file-c four foo edit file-c ten qux # Switch back to master git checkout master - - # Change non-overlapping part of previously changed file - edit file-a eight foo # depends on file-a tag - - # Change previously changed line - edit file-a three baz # depends on file-a-three-a tag } -main +case "$1" in + feature) + feature + ;; + *) + main + ;; +esac exit 0 |