aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2018-05-17 17:28:54 +0100
committerAdam Spiers <git@adamspiers.org>2018-05-17 17:28:54 +0100
commit1d623dba4fffd6de02ad56c74edfa2ac96efbe76 (patch)
treeda07b57ad86e69450e7a893570df8d8dc36605b4 /tests
parent0c601035d65d5040daa1f48369d75c647a61ba52 (diff)
downloadgit-deps-1d623dba4fffd6de02ad56c74edfa2ac96efbe76.tar.gz
create-repo.sh: add backporting use case
Diffstat (limited to 'tests')
-rwxr-xr-xtests/create-repo.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/create-repo.sh b/tests/create-repo.sh
index f837b5d..31e957e 100755
--- a/tests/create-repo.sh
+++ b/tests/create-repo.sh
@@ -70,7 +70,22 @@ feature () {
edit file-c four foo
edit file-c ten qux
- # Switch back to master
+ git checkout master
+}
+
+# For demonstrating a backporting use-case
+port () {
+ cd $test_repo
+
+ # Add some more commits to master
+ edit file-b four qux
+ edit file-a two wibble
+ edit file-a nine wobble
+
+ # Start a stable branch
+ git checkout -b stable file-a-three-foo
+ edit file-a three blah
+
git checkout master
}
@@ -78,6 +93,10 @@ case "$1" in
feature)
feature
;;
+ port)
+ main
+ port
+ ;;
*)
main
;;