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

[PATCH] t9902: Be more specific when completing git-checkout

From
Torsten Bögershausen <tboegi@web.de>
Date
Dec 20, 2012, 17:31 UTC
Message-ID
<201212201831.03590.tboegi@web.de>

t9902 is trying to complete e.g. "git --version check" into "git --version checkout"

If there are other binaries like "git-check-email" or "git-check-ignore" in the PATH one test case failes

By using "checkou" instead of "check" the test becomes more future proof.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 t/t9902-completion.sh | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 3cd53f8..0e0e2d1 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -192,19 +192,19 @@ test_expect_success 'general options' '
 '
 
 test_expect_success 'general options plus command' '
-	test_completion "git --version check" "checkout " &&
-	test_completion "git --paginate check" "checkout " &&
-	test_completion "git --git-dir=foo check" "checkout " &&
-	test_completion "git --bare check" "checkout " &&
+	test_completion "git --version checkou" "checkout " &&
+	test_completion "git --paginate checkou" "checkout " &&
+	test_completion "git --git-dir=foo checkou" "checkout " &&
+	test_completion "git --bare checkou" "checkout " &&
 	test_completion "git --help des" "describe " &&
-	test_completion "git --exec-path=foo check" "checkout " &&
-	test_completion "git --html-path check" "checkout " &&
-	test_completion "git --no-pager check" "checkout " &&
-	test_completion "git --work-tree=foo check" "checkout " &&
-	test_completion "git --namespace=foo check" "checkout " &&
-	test_completion "git --paginate check" "checkout " &&
-	test_completion "git --info-path check" "checkout " &&
-	test_completion "git --no-replace-objects check" "checkout "
+	test_completion "git --exec-path=foo checkou" "checkout " &&
+	test_completion "git --html-path checkou" "checkout " &&
+	test_completion "git --no-pager checkou" "checkout " &&
+	test_completion "git --work-tree=foo checkou" "checkout " &&
+	test_completion "git --namespace=foo checkou" "checkout " &&
+	test_completion "git --paginate checkou" "checkout " &&
+	test_completion "git --info-path checkou" "checkout " &&
+	test_completion "git --no-replace-objects checkou" "checkout "
 '
 
 test_expect_success 'setup for ref completion' '
-- 
1.8.0
Message 1 of 1 in “t9902: Be more specific when completing git-checkout”
  1. t9902: Be more specific when completing git-checkoutTorsten Bögershausen, Dec 20, 2012

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.