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>
Denton Liu committed
Oct 3, 2019 at 17:23 UTC
94ba151300ca5e4345a11b00244eb3501bc569f8
1 file changed
+4
-2
t/test-lib-functions.sh
+4
-2
@@ -228,9 +228,11 @@ test_commit () {
228
# can be a tag pointing to the commit-to-merge.
229
230
test_merge () {
231
+ label="$1" &&
232
+ shift &&
233
test_tick &&
232
- git merge -m "$1" "$2" &&
233
- git tag "$1"
234
+ git merge -m "$label" "$@" &&
235
+ git tag "$label"
236
}
237
238
# Efficiently create <nr> commits, each with a unique number (from 1 to <nr>