Okay, here's an updated patch to also complete ignored files when -f or --force is specified.

If you want I can rebase and make a single patch.

On Sat, Jan 4, 2025 at 7:04 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> > I was going a bit crazy trying to figure out why tab completion in
>> > *shell* wasn't working for git add when I was trying to add a new
>> > file to my repo.  Turns out pcomplete was only completing modified
>> > tracked files.  This patch changes it so after git add it also
>> > completes untracked non-ignored files.
>> Augusto and Stefan, any comments?

The (new) patch looks good to me.

FWIW, it also makes sense occasionally to `git add` ignored files
(e.g. we could want to track a `.elc` file in the test suite inside the
Emacs repository to check how we handle specific old-format `.elc`
files).


        Stefan



--
Peter Seibel
http://www.gigamonkeys.com/