git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCHv3] submodule deinit: require '--all' instead of '.' for all submodules

From
Junio C Hamano <gitster@pobox.com>
Date
May 4, 2016, 21:49 UTC
Message-ID
<xmqqshxxeboj.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqlh3pft91.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
>> +	if test -n "$deinit_all" && test "$#" -ne 0
>> +	then
>> +		die "$(eval_gettext "usage: $dashless [--quiet] deinit [-f|--force] (--all | [--] <path>...)")"
>
> I doubt that "usage:" wants to go thru l10n.
>
> I suspect that it is more friendly to the user to say that in prose,
> i.e.e.g. "--all and pathspec cannot be given at the same time", than
> forcing them to grok the (alternative|possibilities).
>
>> +	fi
>> +	if test $# = 0 && test -z "$deinit_all"
>>  	then
>> -		die "$(eval_gettext "Use '.' if you really want to deinitialize all submodules")"
>> +		die "$(eval_gettext "Use '--all' if you really want to deinitialize all submodules")"
>>  	fi
>
> This is good.
By the way, while it is a very good idea to die upon
	$ git submodule deinit --all no-only-this-one

it may not be too bad if we demoted the output to "info" with clean no-op exit when the user said

	$ git submodule deinit
IOW, the latter part _might_ be better if it were
	if test $# = 0 && test -z "$deinit_all"
	then
		echo >&2 "info: not deinitializing anything."
                echo >&2 "info: Use --all to deinitialize all submodules."
                exit 0
	fi

given that this is really about preventing mistakes from doing mass destruction.

Previous: Junio C HamanoNext: Stefan Beller
Message 15 of 17 in “submodule deinit: require '--all' instead of '.' for all submodules”
  1. submodule deinit: require '--all' instead of '.' for all submodulesStefan Beller, May 3, 2016
  2. Junio C HamanoMay 3, 2016
  3. Junio C HamanoMay 3, 2016
  4. Stefan BellerMay 3, 2016
  5. Junio C HamanoMay 3, 2016
  6. Stefan BellerMay 3, 2016
  7. [PATCHv2] submodule deinit: require '--all' instead of '.' for all submodulesStefan Beller, May 4, 2016
  8. Jonathan NiederMay 4, 2016
  9. [PATCHv3] submodule deinit: require '--all' instead of '.' for all submodulesStefan Beller, May 4, 2016
  10. Junio C HamanoMay 4, 2016
  11. Stefan BellerMay 4, 2016
  12. Junio C HamanoMay 4, 2016
  13. Stefan BellerMay 4, 2016
  14. Junio C HamanoMay 4, 2016
  15. Junio C HamanoMay 4, 2016
  16. Stefan BellerMay 4, 2016
  17. Junio C HamanoMay 4, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.