Re: [PATCH v6 3/4] ls-files: pass through safe options for --recurse-submodules

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

 



Brandon Williams <bmwill@xxxxxxxxxx> writes:

> +static void compile_submodule_options(const struct dir_struct *dir, int show_tag)
> +{
> +	if (line_terminator == '\0')
> +		argv_array_push(&submodules_options, "-z");
> +	if (show_tag)
> +		argv_array_push(&submodules_options, "-t");
> +	if (show_valid_bit)
> +		argv_array_push(&submodules_options, "-v");
> +	if (show_cached)
> +		argv_array_push(&submodules_options, "--cached");
> +	if (show_deleted)
> +		argv_array_push(&submodules_options, "--deleted");
> +	if (show_modified)
> +		argv_array_push(&submodules_options, "--modified");
> +	if (show_others)
> +		argv_array_push(&submodules_options, "--others");
> +	if (dir->flags & DIR_SHOW_IGNORED)
> +		argv_array_push(&submodules_options, "--ignored");
> +	if (show_stage)
> +		argv_array_push(&submodules_options, "--stage");
> +	if (show_killed)
> +		argv_array_push(&submodules_options, "--killed");
> +	if (dir->flags & DIR_SHOW_OTHER_DIRECTORIES)
> +		argv_array_push(&submodules_options, "--directory");
> +	if (!(dir->flags & DIR_SHOW_OTHER_DIRECTORIES))
> +		argv_array_push(&submodules_options, "--empty-directory");
> +	if (show_unmerged)
> +		argv_array_push(&submodules_options, "--unmerged");
> +	if (show_resolve_undo)
> +		argv_array_push(&submodules_options, "--resolve-undo");
> +	if (show_eol)
> +		argv_array_push(&submodules_options, "--eol");
> +	if (debug_mode)
> +		argv_array_push(&submodules_options, "--debug");
> +}

With this and 4/4 applied, the documentation still says "--cached"
is the only supported option.

Does it really make sense to pass all of these?  I understand "-z"
and I suspect things like "-t" and "-v" that affect "how" things are
shown may also happen to work, but I am not sure how much it makes
sense for options that affect "what" things are shown.

What does it even mean to ask for say "--unmerged" to be shown, for
example, from the superproject?  Recurse into submodules whose cache
entries in the index of the superproject are unmerged, or something
else?

I am inclined to say that it is probably better to keep the
"--cached only" as documented, at least on the "what are shown"
side.

Thanks.



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