Re: [PATCH v3 2/4] completion: complete 'git history --empty' values
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Aug 19, 2026, 11:13 UTC
- Message-ID
- <aoWP2OHLMDmNBBBv@pks.im>
- In-Reply-To
- <20260813-history_autocompletion-v3-2-69eed1cea93a@kernel.org>
On Thu, Aug 13, 2026 at 09:05:03PM +0200, Vincent Mailhol wrote:
Show 17 quoted lines
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 1727768487..7f3cabd595 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -2169,6 +2169,15 @@ _git_history ()
>
> if ! __git_has_doubledash; then
> case "$cur" in
> + --empty=*)
> + case "$subcommand" in
> + drop|fixup)
> + __gitcomp "drop keep abort" "" \
> + "${cur##--empty=}"
> + ;;
> + esac
> + return
> + ;;It would've been fine to just do this for every subcommand, I guess. But this version works for me, too.
Patrick