Re: [PATCH v5 0/3] completion of 'git [-C <dir>] diff'

Elijah Newren <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <CABPp-BFdwxTvkcWKNP0-Lk+mqQLnULoYuLHZe0aot4VYfHnjSw@mail.gmail.com>
On Fri, Aug 7, 2026 at 9:19 AM Junio C Hamano <[email protected]> wrote:
>
> 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.

Looks good to me!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.