Re: [PATCH v5 0/3] completion of 'git [-C <dir>] diff'
On Fri, Aug 7, 2026 at 9:19 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
>
> The primary motivation for this topic is that the command-line
> completion of 'git diff' does not handle paths (unlike 'git status'
> and 'git add') and instead relies on the default behavior of Bash
> command-line completion, which completes files in $PWD; this does
> not work at all with the '-C <directory>' option.
>
> This series teaches the completion machinery to complete revisions
> (unless '--' exists), then tracked paths, and then untracked paths,
> before letting the Bash default kick in. This way, we correctly
> complete 'git diff' command line even when '-C <directory>' is in
> effect.
>
> The v5 iteration addresses two points identified by Elijah in v4.
> Hopefully this will be the "small and final" reroll.