* [PATCH] completion: complete 'git worktree repair'
@ 2026-09-12 0:12 Yoichi NAKAYAMA via GitGitGadget
2026-09-14 6:29 ` Patrick Steinhardt
2026-09-14 19:35 ` [PATCH v2] " Yoichi NAKAYAMA via GitGitGadget
0 siblings, 2 replies; 6+ messages in thread
From: Yoichi NAKAYAMA via GitGitGadget @ 2026-09-12 0:12 UTC (permalink / raw)
To: git; +Cc: Yoichi NAKAYAMA, Yoichi NAKAYAMA
From: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>
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.
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-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2218/yoichi/complete-worktree-repair-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2218
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] completion: complete 'git worktree repair'
2026-09-12 0:12 [PATCH] completion: complete 'git worktree repair' Yoichi NAKAYAMA via GitGitGadget
@ 2026-09-14 6:29 ` Patrick Steinhardt
2026-09-14 12:08 ` Yoichi Nakayama
2026-09-14 19:35 ` [PATCH v2] " Yoichi NAKAYAMA via GitGitGadget
1 sibling, 1 reply; 6+ messages in thread
From: Patrick Steinhardt @ 2026-09-14 6:29 UTC (permalink / raw)
To: Yoichi NAKAYAMA via GitGitGadget; +Cc: git, Yoichi NAKAYAMA
On Sat, Sep 12, 2026 at 12:12:35AM +0000, Yoichi NAKAYAMA via GitGitGadget wrote:
> From: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>
>
> 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.
We typically write commit messages in imperative mood, as if instructing
the code to change. We also briefly describe the status quo, even though
it's not as important in this particular case. An example could be:
Our Bash completion does not know to complete the "repair" subcommand
for git-worktree(1). Add support for it.
One could also try to add in your bit about worktree paths, but that's
something that's quite obviously visible from the diff anyway. So this
may or may not be valuable.
Other than that the patch looks good to me.
Thanks!
Patrick
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] completion: complete 'git worktree repair'
2026-09-14 6:29 ` Patrick Steinhardt
@ 2026-09-14 12:08 ` Yoichi Nakayama
2026-09-23 13:06 ` Patrick Steinhardt
0 siblings, 1 reply; 6+ messages in thread
From: Yoichi Nakayama @ 2026-09-14 12:08 UTC (permalink / raw)
To: Patrick Steinhardt; +Cc: Yoichi NAKAYAMA via GitGitGadget, git
On Mon, Sep 14, 2026 at 3:29 PM Patrick Steinhardt <ps@pks.im> wrote:
>
> On Sat, Sep 12, 2026 at 12:12:35AM +0000, Yoichi NAKAYAMA via GitGitGadget wrote:
> > From: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>
> >
> > 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.
>
> We typically write commit messages in imperative mood, as if instructing
> the code to change. We also briefly describe the status quo, even though
> it's not as important in this particular case. An example could be:
>
> Our Bash completion does not know to complete the "repair" subcommand
> for git-worktree(1). Add support for it.
>
> One could also try to add in your bit about worktree paths, but that's
> something that's quite obviously visible from the diff anyway. So this
> may or may not be valuable.
Thank you for your comment.
Since this is not limited to bash, it also adds completion support
for zsh and tcsh via git-completion.{zsh,tcsh}.
So I'd like to modify the body of the commit message as follows:
The completion scripts do not complete the "repair" subcommand for
git-worktree(1). Add support for it.
Thanks
> Other than that the patch looks good to me.
>
> Thanks!
>
> Patrick
--
Yoichi NAKAYAMA
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] completion: complete 'git worktree repair'
2026-09-12 0:12 [PATCH] completion: complete 'git worktree repair' Yoichi NAKAYAMA via GitGitGadget
2026-09-14 6:29 ` Patrick Steinhardt
@ 2026-09-14 19:35 ` Yoichi NAKAYAMA via GitGitGadget
2026-09-23 12:57 ` Patrick Steinhardt
1 sibling, 1 reply; 6+ messages in thread
From: Yoichi NAKAYAMA via GitGitGadget @ 2026-09-14 19:35 UTC (permalink / raw)
To: git; +Cc: Patrick Steinhardt, Yoichi Nakayama, Yoichi NAKAYAMA,
Yoichi NAKAYAMA
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] completion: complete 'git worktree repair'
2026-09-14 19:35 ` [PATCH v2] " Yoichi NAKAYAMA via GitGitGadget
@ 2026-09-23 12:57 ` Patrick Steinhardt
0 siblings, 0 replies; 6+ messages in thread
From: Patrick Steinhardt @ 2026-09-23 12:57 UTC (permalink / raw)
To: Yoichi NAKAYAMA via GitGitGadget; +Cc: git, Yoichi Nakayama
On Mon, Sep 14, 2026 at 07:35:36PM +0000, Yoichi NAKAYAMA via GitGitGadget wrote:
> 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>
Thanks, this looks good to me!
Patrick
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] completion: complete 'git worktree repair'
2026-09-14 12:08 ` Yoichi Nakayama
@ 2026-09-23 13:06 ` Patrick Steinhardt
0 siblings, 0 replies; 6+ messages in thread
From: Patrick Steinhardt @ 2026-09-23 13:06 UTC (permalink / raw)
To: Yoichi Nakayama; +Cc: Yoichi NAKAYAMA via GitGitGadget, git
On Mon, Sep 14, 2026 at 09:08:15PM +0900, Yoichi Nakayama wrote:
> On Mon, Sep 14, 2026 at 3:29 PM Patrick Steinhardt <ps@pks.im> wrote:
> >
> > On Sat, Sep 12, 2026 at 12:12:35AM +0000, Yoichi NAKAYAMA via GitGitGadget wrote:
> > > From: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>
> > >
> > > 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.
> >
> > We typically write commit messages in imperative mood, as if instructing
> > the code to change. We also briefly describe the status quo, even though
> > it's not as important in this particular case. An example could be:
> >
> > Our Bash completion does not know to complete the "repair" subcommand
> > for git-worktree(1). Add support for it.
> >
> > One could also try to add in your bit about worktree paths, but that's
> > something that's quite obviously visible from the diff anyway. So this
> > may or may not be valuable.
>
> Thank you for your comment.
> Since this is not limited to bash, it also adds completion support
> for zsh and tcsh via git-completion.{zsh,tcsh}.
> So I'd like to modify the body of the commit message as follows:
>
> The completion scripts do not complete the "repair" subcommand for
> git-worktree(1). Add support for it.
Ah, fair. We know to reuse the Bash completion scripts for both of
these.
Patrick
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-09-23 13:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-12 0:12 [PATCH] completion: complete 'git worktree repair' Yoichi NAKAYAMA via GitGitGadget
2026-09-14 6:29 ` Patrick Steinhardt
2026-09-14 12:08 ` Yoichi Nakayama
2026-09-23 13:06 ` Patrick Steinhardt
2026-09-14 19:35 ` [PATCH v2] " Yoichi NAKAYAMA via GitGitGadget
2026-09-23 12:57 ` Patrick Steinhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox