Re: [PATCH v3 2/3] sparse-checkout: custom tab completion

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

 





On 1/21/22 5:08 PM, Lessley Dennington wrote:


On 1/21/22 5:07 PM, Lessley Dennington wrote:
I know it is your preference to complete only directories and
exclude filenames, but I question if the confusion such a design
causes to end-users is worth it.

I think perhaps we're a little caught up in exemplifying commands that
are unrelated to sparse-checkout. As Elijah said in [1], the documentation
states that directories and patterns are acceptable to sparse-checkout but
not files. While it is not reasonable to try to offer every pattern a user
could possibly pass to sparse-checkout, it is reasonable to offer
directories and (in my opinion) will help guide users toward correct usage
of the command.

However, since completion on directories is cone-mode-specific, I am
willing to accept the suggestion to only complete directories if we are in
a cone-mode sparse-checkout and apply it in v4 of this series.

[1]: https://lore.kernel.org/git/CABPp-BErg-RtyycXaRXYfQHEQXA4q-FU9Q6nYkSHJsqL-04oXw@xxxxxxxxxxxxxx/

In light of non-cone mode being removed in the near future (see [1]), it
actually seems it does not make sense to add different behaviors for cone
mode and non-cone mode. I also ran this by some other contributors, who
thought it would be best to complete on both files and directories so as
not to confuse users (as Junio and Szeder have indicated). So, instead of
differentiating between cone mode and non-cone mode in V4, I will plan to
remove directory completion.

[1]: https://lore.kernel.org/git/CABPp-BEwMAPHGt5xD9jDU58grbrAqCdqNY9Nh8UJGLKuLbArXQ@xxxxxxxxxxxxxx/
My apologies, I will not remove directory completion, but rather will
return to completing on both files and directories.

My apologies again, I think I mistakenly assumed Junio did not want
directory-only completion for cone mode based on this comment from [1]:

If a path that is not a directory (either because it is a file in the
current checkout, or because it is a directory only in a different branch)
is given, it might not make sense in the cone-mode for the current
checkout, but it may well make sense when a different branch is
checked out.

However, this line (which I overlooked when I was re-reading this
evening), leads me to believe that is not the case:

Are we limiting ourselves to directories only when we know we are in
the cone-mode and showing both directories and files otherwise?

It has also been pointed out to me that saying cone mode is going away is
incorrect - it is just being deprecated.

So, I will stick to my original plan of continuing to complete on
directories for cone mode and completing on both files and directories
for non-cone mode.

Again, apologies for the noise.

[1]: https://lore.kernel.org/git/xmqqv8yjz5us.fsf@gitster.g/



[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]

  Powered by Linux