git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/3] t3034: test deprecated interface

From
FAFelipe Gonçalves Assis <felipeg.assis@gmail.com>
Date
Feb 23, 2016, 23:48 UTC
Message-ID
<1456271292-4652-4-git-send-email-felipegassis@gmail.com>
In-Reply-To
<1456271292-4652-1-git-send-email-felipegassis@gmail.com>
From: Felipe Gonçalves Assis <felipeg.assis@gmail.com>
--find-renames= and --rename-threshold= should be aliases.
Signed-off-by: Felipe Gonçalves Assis <felipegassis@gmail.com>
---
 t/t3034-merge-recursive-rename-options.sh | 46 +++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
diff --git a/t/t3034-merge-recursive-rename-options.sh b/t/t3034-merge-recursive-rename-options.sh
index c07a4cb..96d8767 100755
--- a/t/t3034-merge-recursive-rename-options.sh
+++ b/t/t3034-merge-recursive-rename-options.sh
@@ -260,4 +260,50 @@ test_expect_success '--find-renames rejects non-numbers' '
 	git diff --quiet --cached
 '
 
+test_expect_success 'rename-threshold=<n> is a synonym for find-renames=<n>' '
+	git read-tree --reset -u HEAD &&
+	test_must_fail git merge-recursive --rename-threshold=$th0 $tail &&
+	check_threshold_0
+'
+
+test_expect_success 'last wins in --no-renames --rename-threshold=<n>' '
+	git read-tree --reset -u HEAD &&
+	test_must_fail git merge-recursive --no-renames --rename-threshold=$th0 $tail &&
+	check_threshold_0
+'
+
+test_expect_success 'last wins in --rename-threshold=<n> --no-renames' '
+	git read-tree --reset -u HEAD &&
+	git merge-recursive --rename-threshold=$th0 --no-renames $tail &&
+	check_no_renames
+'
+
+test_expect_success '--rename-threshold=<n> rejects negative argument' '
+	git read-tree --reset -u HEAD &&
+	test_must_fail git merge-recursive --rename-threshold=-25 \
+		HEAD -- HEAD HEAD &&
+	git diff --quiet --cached
+'
+
+test_expect_success '--rename-threshold=<n> rejects non-numbers' '
+	git read-tree --reset -u HEAD &&
+	test_must_fail git merge-recursive --rename-threshold=0xf \
+		HEAD -- HEAD HEAD &&
+	git diff --quiet --cached
+'
+
+test_expect_success 'last wins in --rename-threshold=<m> --find-renames=<n>' '
+	git read-tree --reset -u HEAD &&
+	test_must_fail git merge-recursive \
+		--rename-threshold=$th0 --find-renames=$th2 $tail &&
+	check_threshold_2
+'
+
+test_expect_success 'last wins in --find-renames=<m> --rename-threshold=<n>' '
+	git read-tree --reset -u HEAD &&
+	test_must_fail git merge-recursive \
+		--find-renames=$th2 --rename-threshold=$th0 $tail &&
+	check_threshold_0
+'
+
 test_done
-- 
2.7.1.492.gd821b20
Previous: Felipe Gonçalves Assis
Message 7 of 7 in “Tests for merge-recursive rename options”
  1. 0/3 Tests for merge-recursive rename optionsFelipe Gonçalves Assis, Feb 23, 2016
  2. 1/3 t3034: add rename threshold testsFelipe Gonçalves Assis, Feb 23, 2016
  3. Eric SunshineFeb 24, 2016
  4. Eric SunshineFeb 24, 2016
  5. Felipe Gonçalves AssisFeb 24, 2016
  6. 2/3 t3034: test option to disable renamesFelipe Gonçalves Assis, Feb 23, 2016
  7. 3/3 t3034: test deprecated interfaceFelipe Gonçalves Assis, Feb 23, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.