From 7923bdd7e639c60434085510a982c8c56053cee0 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Thu, 17 May 2018 14:48:33 +0100 Subject: create-repo.sh: create feature branch on separate invocation --- tests/create-repo.sh | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'tests') 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 -- cgit