Re: [PATCH] completion: improve untracked directory filtering for filename completion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SZEDER Gábor wrote:

>   $ time __git_index_files "--others --modified"
>   untracked-dir
>
>   real	0m0.537s
>   user	0m0.452s
>   sys	0m0.160s
>
> Eliminate this delay by additionally passing the '--directory
> --no-empty-directory' options to 'git ls-files' to show only the
> directory name of non-empty untracked directories instead their whole
> content:
>
>   $ time __git_index_files "--others --modified --directory --no-empty-directory"
>   untracked-dir
>
>   real	0m0.029s
>   user	0m0.020s
>   sys	0m0.004s

Nice.  This is what "git status" uses, too.

> Filename completion for 'git clean' suffers from the same delay, as it
> offers untracked files, too.  The fix could be the same, but since it
> actually makes sense to 'git clean' empty directories, in this case we
> only pass the '--directory' option to 'git ls-files'.

Also sensible.

For what it's worth,
Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]