Skip to content

Commit 94ba151

Browse files
Denton-Lgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5fa0f52 commit 94ba151

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t/test-lib-functions.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,11 @@ test_commit () {
228228
# can be a tag pointing to the commit-to-merge.
229229

230230
test_merge () {
231+
label="$1" &&
232+
shift &&
231233
test_tick &&
232-
git merge -m "$1" "$2" &&
233-
git tag "$1"
234+
git merge -m "$label" "$@" &&
235+
git tag "$label"
234236
}
235237

236238
# Efficiently create <nr> commits, each with a unique number (from 1 to <nr>

0 commit comments

Comments
 (0)