git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Denton Liu <liu.denton@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Allan Caffee <allan.caffee@gmail.com>,
	Noam Postavsky <npostavs@users.sourceforge.net>,
	Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 1/5] test-lib: let test_merge() perform octopus merges
Date: Thu, 3 Oct 2019 17:23:13 -0700	[thread overview]
Message-ID: <e77af8cde5380c3ba43f074232a50a262ef79791.1570148053.git.liu.denton@gmail.com> (raw)
In-Reply-To: <cover.1570148053.git.liu.denton@gmail.com>

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>
---
 t/test-lib-functions.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 87bf3a2287..b299ecc326 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>
-- 
2.23.0.565.g1cc52d20df


  reply	other threads:[~2019-10-04  0:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 10:26 [BUG/PATCH 0/5] t4214: cleanup and demonstrate graph bug Denton Liu
2019-09-25 10:27 ` [BUG/PATCH 1/5] test-lib: let test_merge() perform octopus merges Denton Liu
2019-09-25 10:27 ` [BUG/PATCH 2/5] t4214: use test_merge Denton Liu
2019-09-25 10:27 ` [BUG/PATCH 3/5] t4214: generate expect in their own test cases Denton Liu
2019-09-25 10:27 ` [BUG/PATCH 4/5] t4214: explicitly list tags in log Denton Liu
2019-09-25 10:27 ` [BUG/PATCH 5/5] t4214: demonstrate octopus graph coloring failure Denton Liu
2019-09-25 17:09 ` [BUG/PATCH 0/5] t4214: cleanup and demonstrate graph bug Denton Liu
2019-09-26 20:23   ` Jeff King
2019-10-03 22:16     ` Junio C Hamano
2019-10-04  0:23 ` [PATCH v2 " Denton Liu
2019-10-04  0:23   ` Denton Liu [this message]
2019-10-04  0:23   ` [PATCH v2 2/5] t4214: use test_merge Denton Liu
2019-10-04  0:23   ` [PATCH v2 3/5] t4214: generate expect in their own test cases Denton Liu
2019-10-04  0:23   ` [PATCH v2 4/5] t4214: explicitly list tags in log Denton Liu
2019-10-04  0:23   ` [PATCH v2 5/5] t4214: demonstrate octopus graph coloring failure Denton Liu
2019-10-04  5:50   ` [PATCH v2 0/5] t4214: cleanup and demonstrate graph bug Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e77af8cde5380c3ba43f074232a50a262ef79791.1570148053.git.liu.denton@gmail.com \
    --to=liu.denton@gmail.com \
    --cc=allan.caffee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=npostavs@users.sourceforge.net \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).