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

[PATCH v2] completion: complete 'git worktree repair'

From
Yoichi NAKAYAMA via GitGitGadget <gitgitgadget@gmail.com>
Date
Sep 14, 2026, 19:35 UTC
Message-ID
<pull.2218.v2.git.1789414536838.gitgitgadget@gmail.com>
In-Reply-To
<pull.2218.git.1789171955370.gitgitgadget@gmail.com>
From: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>

The completion scripts do not complete the "repair" subcommand for git-worktree(1). Add support for it.

Signed-off-by: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>
---
    completion: complete 'git worktree repair'
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2218%2Fyoichi%2Fcomplete-worktree-repair-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2218/yoichi/complete-worktree-repair-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/2218
Range-diff vs v1:
 1:  84cfa0da2d ! 1:  4f3f233065 completion: complete 'git worktree repair'
     @@ Metadata
       ## Commit message ##
          completion: complete 'git worktree repair'
      
     -    Added completion support for the 'repair' subcommand of worktree. It
     -    optionally receives a list of paths to linked worktrees or paths to
     -    worktrees with broken links.
     +    The completion scripts do not complete the "repair" subcommand for
     +    git-worktree(1). Add support for it.
      
          Signed-off-by: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>
      
 contrib/completion/git-completion.bash | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 9f8b9b50ff..c3a49e2e22 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -3816,7 +3816,7 @@ __git_complete_worktree_paths ()
 
 _git_worktree ()
 {
-	local subcommands="add list lock move prune remove unlock"
+	local subcommands="add list lock move prune remove repair unlock"
 	local subcommand subcommand_idx
 
 	subcommand="$(__git_find_on_cmdline --show-idx "$subcommands")"
@@ -3866,7 +3866,7 @@ _git_worktree ()
 			;;
 		esac
 		;;
-	lock,*|remove,*|unlock,*)
+	lock,*|remove,*|repair,*|unlock,*)
 		__git_complete_worktree_paths
 		;;
 	move,*)

base-commit: 47ce80527c56f462cb97db4ca8125342204d3783
-- 
gitgitgadget
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 5 of 6 in “completion: complete 'git worktree repair'”
  1. completion: complete 'git worktree repair'Yoichi NAKAYAMA via GitGitGadget, Sep 12, 2026
  2. Patrick SteinhardtSep 14, 2026
  3. Yoichi NakayamaSep 14, 2026
  4. Patrick SteinhardtSep 23, 2026
  5. completion: complete 'git worktree repair'Yoichi NAKAYAMA via GitGitGadget, Sep 14, 2026
  6. Patrick SteinhardtSep 23, 2026

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.