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

[PATCH v2] t3200: clarify description of --set-upstream test

From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Date
Jun 17, 2018, 11:56 UTC
Message-ID
<20180617115627.32524-1-kaartic.sivaraam@gmail.com>
In-Reply-To
<xmqqin6l461s.fsf@gitster-ct.c.googlers.com>

Support for the --set-upstream option was removed in 52668846ea (builtin/branch: stop supporting the "--set-upstream" option, 2017-08-17). The change did not completely remove the command due to an issue noted in the commit's log message.

So, a test was added to ensure that a command which uses the '--set-upstream' option fails instead of silently acting as an alias for the '--set-upstream-to' option due to option parsing features.

To avoid confusion, clarify that the option is disabled intentionally in the corresponding test description.

The test is expected to be around as long as we intentionally fail on seeing the '--set-upstream' option which in turn we expect to do for a period of time after which we can be sure that existing users of '--set-upstream' are aware that the option is no longer supported.

Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
---
Changes since v1:
	- update the test description as suggested by Junio
	- updated the commit message to be clear about period upto
	  which we should be testing this.
 t/t3200-branch.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 6c0b7ea4a..e98dbfc1a 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -884,7 +884,7 @@ test_expect_success 'test --unset-upstream on a particular branch' '
 	test_must_fail git config branch.my14.merge
 '
 
-test_expect_success '--set-upstream fails' '
+test_expect_success 'disabled option --set-upstream fails' '
     test_must_fail git branch --set-upstream origin/master
 '
 
-- 
2.18.0.rc1.242.g61856ae69
Previous: Kaartic Sivaraam
Message 8 of 8 in “t3200-branch.sh: use "--set-upstream-to" in test”
  1. t3200-branch.sh: use "--set-upstream-to" in testRobert P. J. Day, Jun 5, 2018
  2. SZEDER GáborJun 5, 2018
  3. Robert P. J. DayJun 5, 2018
  4. Kaartic SivaraamJun 6, 2018
  5. t3200: clarify description of --set-upstream testKaartic Sivaraam, Jun 14, 2018
  6. Junio C HamanoJun 14, 2018
  7. Kaartic SivaraamJun 17, 2018
  8. t3200: clarify description of --set-upstream testKaartic Sivaraam, Jun 17, 2018

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.