git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Felipe Gonçalves Assis" <felipeg.assis@gmail.com>
To: git@vger.kernel.org
Cc: Johannes.Schindelin@gmx.de, gitster@pobox.com,
	sunshine@sunshineco.com,
	"Felipe Gonçalves Assis" <felipegassis@gmail.com>
Subject: [PATCH v2 3/5] t3034: test option to disable renames
Date: Sun, 21 Feb 2016 19:59:03 -0300	[thread overview]
Message-ID: <1456095545-20201-4-git-send-email-felipegassis@gmail.com> (raw)
In-Reply-To: <1456095545-20201-1-git-send-email-felipegassis@gmail.com>

Signed-off-by: Felipe Gonçalves Assis <felipegassis@gmail.com>
---
 t/t3034-merge-recursive-rename-options.sh | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/t/t3034-merge-recursive-rename-options.sh b/t/t3034-merge-recursive-rename-options.sh
index 7ae7f83..a459236 100755
--- a/t/t3034-merge-recursive-rename-options.sh
+++ b/t/t3034-merge-recursive-rename-options.sh
@@ -68,6 +68,14 @@ check_find_renames_100 () {
 	rename_undetected d
 }
 
+check_no_renames () {
+	check_common &&
+	rename_undetected a &&
+	rename_undetected b &&
+	rename_undetected c &&
+	rename_undetected d
+}
+
 test_expect_success setup '
 	cat <<-\EOF >a-old &&
 	aa1
@@ -126,12 +134,30 @@ test_expect_success 'rename threshold is truncated' '
 	check_find_renames_100
 '
 
+test_expect_success 'disabled rename detection' '
+	git read-tree --reset -u HEAD &&
+	git merge-recursive --no-renames HEAD^ -- HEAD master &&
+	check_no_renames
+'
+
 test_expect_success 'last wins in --find-renames=<m> --find-renames=<n>' '
 	git read-tree --reset -u HEAD &&
 	test_must_fail git merge-recursive --find-renames=25 --find-renames=75 HEAD^ -- HEAD master &&
 	check_find_renames_75
 '
 
+test_expect_success 'last wins in --no-renames --find-renames' '
+	git read-tree --reset -u HEAD &&
+	test_must_fail git merge-recursive --no-renames --find-renames HEAD^ -- HEAD master &&
+	check_find_renames_50
+'
+
+test_expect_success 'last wins in --find-renames --no-renames' '
+	git read-tree --reset -u HEAD &&
+	git merge-recursive --find-renames --no-renames HEAD^ -- HEAD master &&
+	check_no_renames
+'
+
 test_expect_success 'assumption for further tests: trivial merge succeeds' '
 	git read-tree --reset -u HEAD &&
 	git merge-recursive HEAD -- HEAD HEAD &&
@@ -141,6 +167,8 @@ test_expect_success 'assumption for further tests: trivial merge succeeds' '
 	git merge-recursive --find-renames=75 HEAD -- HEAD HEAD &&
 	git diff --quiet --cached &&
 	git merge-recursive --find-renames=100% HEAD -- HEAD HEAD &&
+	git diff --quiet --cached &&
+	git merge-recursive --no-renames HEAD -- HEAD HEAD &&
 	git diff --quiet --cached
 '
 
-- 
2.7.1.492.gd821b20

  parent reply	other threads:[~2016-02-21 23:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-21 22:59 [PATCH v2 0/5] Tests and fixes for merge-recursive rename options Felipe Gonçalves Assis
2016-02-21 22:59 ` [PATCH v2 1/5] merge-strategies.txt: fix typo Felipe Gonçalves Assis
2016-02-21 22:59 ` [PATCH v2 2/5] t3034: add rename threshold tests Felipe Gonçalves Assis
2016-02-22 19:03   ` Junio C Hamano
2016-02-21 22:59 ` Felipe Gonçalves Assis [this message]
2016-02-21 22:59 ` [PATCH v2 4/5] t3034: test deprecated interface Felipe Gonçalves Assis
2016-02-21 22:59 ` [PATCH v2 5/5] merge-recursive: find-renames resets threshold Felipe Gonçalves Assis
2016-02-22 21:00 ` [PATCH v2 0/5] Tests and fixes for merge-recursive rename options Junio C Hamano
2016-02-22 22:16   ` Felipe Gonçalves Assis
2016-02-22 22:29     ` Junio C Hamano
2016-02-22 22:37       ` Felipe Gonçalves Assis

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

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

  git send-email \
    --in-reply-to=1456095545-20201-4-git-send-email-felipegassis@gmail.com \
    --to=felipeg.assis@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=felipegassis@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.com \
    /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.
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 NNTP newsgroup(s).