Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-10-04 03:23:13 +0300
committerJunio C Hamano <gitster@pobox.com>2019-10-04 03:28:00 +0300
commit94ba151300ca5e4345a11b00244eb3501bc569f8 (patch)
treee0927e0a3dba8e01900d4edf6c7061086c17f9c0 /t/test-lib-functions.sh
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9 (diff)
test-lib: let test_merge() perform octopus merges
Currently test_merge() only allows developers to merge in one branch. However, this restriction is artificial and there is no reason why it needs to be this way. Extend test_merge() to allow the specification of multiple branches so that octopus merges can be performed. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index e0b3f28d3a..6620ef2f34 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -228,9 +228,11 @@ test_commit () {
# can be a tag pointing to the commit-to-merge.
test_merge () {
+ label="$1" &&
+ shift &&
test_tick &&
- git merge -m "$1" "$2" &&
- git tag "$1"
+ git merge -m "$label" "$@" &&
+ git tag "$label"
}
# Efficiently create <nr> commits, each with a unique number (from 1 to <nr>